1) Return associatedIpAddress in listPublicIpAddresses command.

2) Disabled create/deleteNetworkOffering API commands
This commit is contained in:
alena 2010-12-16 12:04:55 -08:00
parent d013846bf1
commit d427cdae1e
6 changed files with 23 additions and 2 deletions

View File

@ -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;
}
}

View File

@ -63,4 +63,6 @@ public interface IpAddress extends ControlledEntity {
State getState();
boolean readyToUse();
Long getAssociatedNetworkId();
}

View File

@ -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

View File

@ -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();

View File

@ -108,6 +108,7 @@ public class IPAddressVO implements IpAddress {
return allocatedToAccountId;
}
@Override
public Long getAssociatedNetworkId() {
return associatedNetworkId;
}

View File

@ -121,4 +121,9 @@ public class PublicIp implements IpAddress {
public String getMacAddress() {
return macAddress;
}
@Override
public Long getAssociatedNetworkId() {
return _addr.getAssociatedNetworkId();
}
}