mirror of https://github.com/apache/cloudstack.git
1) Return associatedIpAddress in listPublicIpAddresses command.
2) Disabled create/deleteNetworkOffering API commands
This commit is contained in:
parent
d013846bf1
commit
d427cdae1e
|
|
@ -59,6 +59,9 @@ public class IPAddressResponse extends BaseResponse {
|
|||
@SerializedName("isstaticnat") @Param(description="true if this ip is for static nat, false otherwise")
|
||||
private Boolean staticNat;
|
||||
|
||||
@SerializedName("associatednetworkid") @Param(description="the ID of the Network associated with the IP address")
|
||||
private Long associatedNetworkId;
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
|
@ -155,4 +158,12 @@ public class IPAddressResponse extends BaseResponse {
|
|||
this.staticNat = staticNat;
|
||||
}
|
||||
|
||||
public Long getAssociatedNetworkId() {
|
||||
return associatedNetworkId;
|
||||
}
|
||||
|
||||
public void setAssociatedNetworkId(Long networkId) {
|
||||
this.associatedNetworkId = networkId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,4 +63,6 @@ public interface IpAddress extends ControlledEntity {
|
|||
State getState();
|
||||
|
||||
boolean readyToUse();
|
||||
|
||||
Long getAssociatedNetworkId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,9 +235,9 @@ removeVpnUser=com.cloud.api.commands.RemoveVpnUserCmd;15
|
|||
listVpnUsers=com.cloud.api.commands.ListVpnUsersCmd;15
|
||||
|
||||
#### network offering commands
|
||||
createNetworkOffering=com.cloud.api.commands.CreateNetworkOfferingCmd;1
|
||||
#### createNetworkOffering=com.cloud.api.commands.CreateNetworkOfferingCmd;1
|
||||
updateNetworkOffering=com.cloud.api.commands.UpdateNetworkOfferingCmd;1
|
||||
deleteNetworkOffering=com.cloud.api.commands.DeleteNetworkOfferingCmd;1
|
||||
#### deleteNetworkOffering=com.cloud.api.commands.DeleteNetworkOfferingCmd;1
|
||||
listNetworkOfferings=com.cloud.api.commands.ListNetworkOfferingsCmd;15
|
||||
|
||||
#### network commands
|
||||
|
|
|
|||
|
|
@ -610,6 +610,8 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
|
||||
ipResponse.setForVirtualNetwork(forVirtualNetworks);
|
||||
ipResponse.setStaticNat(ipAddress.isOneToOneNat());
|
||||
|
||||
ipResponse.setAssociatedNetworkId(ipAddress.getAssociatedNetworkId());
|
||||
|
||||
// show this info to admin only
|
||||
Account account = UserContext.current().getAccount();
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ public class IPAddressVO implements IpAddress {
|
|||
return allocatedToAccountId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getAssociatedNetworkId() {
|
||||
return associatedNetworkId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,4 +121,9 @@ public class PublicIp implements IpAddress {
|
|||
public String getMacAddress() {
|
||||
return macAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getAssociatedNetworkId() {
|
||||
return _addr.getAssociatedNetworkId();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue