Skip to content

Commit 1e300b0

Browse files
committed
CLOUDSTACK-6530: Make more networking entities implement Displayable interface.
1 parent ebc2b8b commit 1e300b0

22 files changed

Lines changed: 137 additions & 28 deletions

api/src/com/cloud/network/IpAddress.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.Date;
2020

2121
import org.apache.cloudstack.acl.ControlledEntity;
22+
import org.apache.cloudstack.api.Displayable;
2223
import org.apache.cloudstack.api.Identity;
2324
import org.apache.cloudstack.api.InternalIdentity;
2425

@@ -35,7 +36,7 @@
3536
* - DomainId = domain of the account owner.
3637
* - Allocated = time it was allocated.
3738
*/
38-
public interface IpAddress extends ControlledEntity, Identity, InternalIdentity {
39+
public interface IpAddress extends ControlledEntity, Identity, InternalIdentity, Displayable {
3940
enum State {
4041
Allocating, // The IP Address is being propagated to other network elements and is not ready for use yet.
4142
Allocated, // The IP address is in used.
@@ -85,6 +86,7 @@ enum Purpose {
8586

8687
Long getNetworkId();
8788

89+
@Override
8890
boolean isDisplay();
8991

9092
}

api/src/com/cloud/network/RemoteAccessVpn.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
package com.cloud.network;
1818

1919
import org.apache.cloudstack.acl.ControlledEntity;
20+
import org.apache.cloudstack.api.Displayable;
2021
import org.apache.cloudstack.api.Identity;
2122
import org.apache.cloudstack.api.InternalIdentity;
2223

23-
public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Identity {
24+
public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Identity, Displayable {
2425
enum State {
2526
Added, Running, Removed
2627
}
@@ -39,5 +40,6 @@ enum State {
3940

4041
State getState();
4142

43+
@Override
4244
boolean isDisplay();
4345
}

api/src/com/cloud/network/Site2SiteVpnConnection.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
import java.util.Date;
2020

2121
import org.apache.cloudstack.acl.ControlledEntity;
22+
import org.apache.cloudstack.api.Displayable;
2223
import org.apache.cloudstack.api.InternalIdentity;
2324

24-
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity {
25+
public interface Site2SiteVpnConnection extends ControlledEntity, InternalIdentity, Displayable {
2526
enum State {
2627
Pending, Connected, Disconnected, Error,
2728
}
@@ -43,5 +44,6 @@ enum State {
4344

4445
public boolean isPassive();
4546

47+
@Override
4648
boolean isDisplay();
4749
}

api/src/com/cloud/network/Site2SiteVpnGateway.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@
1919
import java.util.Date;
2020

2121
import org.apache.cloudstack.acl.ControlledEntity;
22+
import org.apache.cloudstack.api.Displayable;
2223
import org.apache.cloudstack.api.Identity;
2324
import org.apache.cloudstack.api.InternalIdentity;
2425

2526

26-
public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity {
27+
public interface Site2SiteVpnGateway extends ControlledEntity, Identity, InternalIdentity, Displayable {
2728
public long getAddrId();
2829

2930
public long getVpcId();
3031

3132
public Date getRemoved();
3233

34+
@Override
3335
boolean isDisplay();
3436
}

api/src/com/cloud/network/as/AutoScaleVmGroup.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
import java.util.Date;
2121

2222
import org.apache.cloudstack.acl.ControlledEntity;
23+
import org.apache.cloudstack.api.Displayable;
2324
import org.apache.cloudstack.api.InternalIdentity;
2425

25-
public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
26+
public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity, Displayable {
2627

2728
String State_New = "new";
2829
String State_Revoke = "revoke";
@@ -53,6 +54,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
5354

5455
String getUuid();
5556

57+
@Override
5658
boolean isDisplay();
5759

5860
}

api/src/com/cloud/network/as/AutoScaleVmProfile.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
import java.util.List;
2121

2222
import org.apache.cloudstack.acl.ControlledEntity;
23+
import org.apache.cloudstack.api.Displayable;
2324
import org.apache.cloudstack.api.InternalIdentity;
2425

2526
import com.cloud.utils.Pair;
2627

2728
/**
2829
* AutoScaleVmProfile
2930
*/
30-
public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity {
31+
public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity, Displayable {
3132

3233
@Override
3334
public long getId();
@@ -48,6 +49,7 @@ public interface AutoScaleVmProfile extends ControlledEntity, InternalIdentity {
4849

4950
public long getAutoScaleUserId();
5051

52+
@Override
5153
boolean isDisplay();
5254

5355
}

api/src/com/cloud/network/rules/HealthCheckPolicy.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
// under the License.
1717
package com.cloud.network.rules;
1818

19+
import org.apache.cloudstack.api.Displayable;
1920
import org.apache.cloudstack.api.Identity;
2021
import org.apache.cloudstack.api.InternalIdentity;
2122

2223
/**
2324
*/
24-
public interface HealthCheckPolicy extends InternalIdentity, Identity {
25+
public interface HealthCheckPolicy extends InternalIdentity, Identity, Displayable {
2526

2627
public long getLoadBalancerId();
2728

@@ -39,9 +40,7 @@ public interface HealthCheckPolicy extends InternalIdentity, Identity {
3940

4041
public boolean isRevoke();
4142

42-
/**
43-
* @return
44-
*/
43+
@Override
4544
boolean isDisplay();
4645

4746
}

api/src/com/cloud/network/rules/StickinessPolicy.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@
1818

1919
import java.util.List;
2020

21+
import org.apache.cloudstack.api.Displayable;
2122
import org.apache.cloudstack.api.Identity;
2223
import org.apache.cloudstack.api.InternalIdentity;
2324

2425
import com.cloud.utils.Pair;
2526

2627
/**
2728
*/
28-
public interface StickinessPolicy extends InternalIdentity, Identity {
29+
public interface StickinessPolicy extends InternalIdentity, Identity, Displayable {
2930

3031
public long getLoadBalancerId();
3132

@@ -39,9 +40,7 @@ public interface StickinessPolicy extends InternalIdentity, Identity {
3940

4041
public List<Pair<String, String>> getParams(); /* get params in Map <string,String> format */
4142

42-
/**
43-
* @return
44-
*/
43+
@Override
4544
boolean isDisplay();
4645

4746
}

api/src/com/cloud/network/vpc/NetworkACL.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717

1818
package com.cloud.network.vpc;
1919

20+
import org.apache.cloudstack.api.Displayable;
2021
import org.apache.cloudstack.api.InternalIdentity;
2122

22-
public interface NetworkACL extends InternalIdentity {
23+
public interface NetworkACL extends InternalIdentity, Displayable {
2324
public static final long DEFAULT_DENY = 1;
2425
public static final long DEFAULT_ALLOW = 2;
2526

@@ -34,5 +35,6 @@ public interface NetworkACL extends InternalIdentity {
3435

3536
String getName();
3637

38+
@Override
3739
boolean isDisplay();
3840
}

api/src/com/cloud/network/vpc/NetworkACLItem.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818

1919
import java.util.List;
2020

21+
import org.apache.cloudstack.api.Displayable;
2122
import org.apache.cloudstack.api.InternalIdentity;
2223

23-
public interface NetworkACLItem extends InternalIdentity {
24+
public interface NetworkACLItem extends InternalIdentity, Displayable {
2425

2526
String getUuid();
2627

@@ -73,6 +74,7 @@ enum Action {
7374
*/
7475
TrafficType getTrafficType();
7576

77+
@Override
7678
boolean isDisplay();
7779

7880
}

0 commit comments

Comments
 (0)