diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java index 311de5547c1..8510554cec2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java @@ -353,6 +353,7 @@ public class ApiConstants { public static final String TARGET_IQN = "targetiqn"; public static final String TEMPLATE_FILTER = "templatefilter"; public static final String TEMPLATE_ID = "templateid"; + public static final String TEMPLATE_NAME = "templatename"; public static final String ISO_ID = "isoid"; public static final String TIMEOUT = "timeout"; public static final String TIMEZONE = "timezone"; @@ -601,8 +602,10 @@ public class ApiConstants { public static final String END_POINT = "endpoint"; public static final String REGION_ID = "regionid"; public static final String VPC_OFF_ID = "vpcofferingid"; + public static final String VPC_OFF_NAME = "vpcofferingname"; public static final String NETWORK = "network"; public static final String VPC_ID = "vpcid"; + public static final String VPC_NAME = "vpcname"; public static final String GATEWAY_ID = "gatewayid"; public static final String CAN_USE_FOR_DEPLOY = "canusefordeploy"; public static final String RESOURCE_IDS = "resourceids"; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java index 5bd57b449ee..0a4a456aed2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java @@ -77,6 +77,10 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView @Param(description = "the Pod ID for the router") private String podId; + @SerializedName(ApiConstants.POD_NAME) + @Param(description = "the Pod name for the router", since = "4.13.2") + private String podName; + @SerializedName(ApiConstants.HOST_ID) @Param(description = "the host ID for the router") private String hostId; @@ -145,6 +149,10 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView @Param(description = "the template ID for the router") private String templateId; + @SerializedName(ApiConstants.TEMPLATE_NAME) + @Param(description = "the template name for the router", since = "4.13.2") + private String templateName; + @SerializedName(ApiConstants.CREATED) @Param(description = "the date and time the router was created") private Date created; @@ -278,6 +286,10 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView this.podId = podId; } + public void setPodName(String podName) { + this.podName = podName; + } + public void setHostId(String hostId) { this.hostId = hostId; } @@ -330,6 +342,10 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView this.templateId = templateId; } + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + public void setCreated(Date created) { this.created = created; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java index 8d87f06a8e4..f66a61a111a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java @@ -136,8 +136,13 @@ public class IPAddressResponse extends BaseResponse implements ControlledEntityR private String purpose; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC the ip belongs to") + @Param(description = "VPC id the ip belongs to") private String vpcId; + + @SerializedName(ApiConstants.VPC_NAME) + @Param(description = "VPC name the ip belongs to", since = "4.13.2") + private String vpcName; + @SerializedName(ApiConstants.TAGS) @Param(description = "the list of resource tags associated with ip address", responseObject = ResourceTagResponse.class) private List tags; @@ -277,6 +282,10 @@ public class IPAddressResponse extends BaseResponse implements ControlledEntityR this.vpcId = vpcId; } + public void setVpcName(String vpcName) { + this.vpcName = vpcName; + } + public void setTags(List tags) { this.tags = tags; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java index 413497fcd24..be2faa796d6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java @@ -58,9 +58,13 @@ public class PrivateGatewayResponse extends BaseResponse implements ControlledEn private String broadcastUri; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC the private gateaway belongs to") + @Param(description = "VPC id the private gateway belongs to") private String vpcId; + @SerializedName(ApiConstants.VPC_NAME) + @Param(description = "VPC name the private gateway belongs to", since = "4.13.2") + private String vpcName; + @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) @Param(description = "the physical network id") private String physicalNetworkId; @@ -130,6 +134,10 @@ public class PrivateGatewayResponse extends BaseResponse implements ControlledEn this.vpcId = vpcId; } + public void setVpcName(String vpcName) { + this.vpcName = vpcName; + } + public void setAddress(String address) { this.address = address; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java index e7194d73e91..cdd8e4f3d87 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java @@ -42,6 +42,10 @@ public class Site2SiteVpnGatewayResponse extends BaseResponse implements Control @Param(description = "the vpc id of this gateway") private String vpcId; + @SerializedName(ApiConstants.VPC_NAME) + @Param(description = "the vpc name of this gateway", since = "4.13.2") + private String vpcName; + @SerializedName(ApiConstants.ACCOUNT) @Param(description = "the owner") private String accountName; @@ -82,6 +86,10 @@ public class Site2SiteVpnGatewayResponse extends BaseResponse implements Control this.vpcId = vpcId; } + public void setVpcName(String vpcName) { + this.vpcName = vpcName; + } + public void setRemoved(Date removed) { this.removed = removed; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java index 3fb17db7532..934e84fe9d0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java @@ -78,6 +78,10 @@ public class SystemVmResponse extends BaseResponse { @Param(description = "the Pod ID for the system VM") private String podId; + @SerializedName("podname") + @Param(description = "the Pod name for the system VM", since = "4.13.2") + private String podName; + @SerializedName("hostid") @Param(description = "the host ID for the system VM") private String hostId; @@ -130,6 +134,10 @@ public class SystemVmResponse extends BaseResponse { @Param(description = "the template ID for the system VM") private String templateId; + @SerializedName("templatename") + @Param(description = "the template name for the system VM", since = "4.13.2") + private String templateName; + @SerializedName("created") @Param(description = "the date and time the system VM was created") private Date created; @@ -243,10 +251,18 @@ public class SystemVmResponse extends BaseResponse { return podId; } + public String getPodName() { + return podName; + } + public void setPodId(String podId) { this.podId = podId; } + public void setPodName(String podName) { + this.podName = podName; + } + public String getHostId() { return hostId; } @@ -323,10 +339,18 @@ public class SystemVmResponse extends BaseResponse { return templateId; } + public String getTemplateName() { + return templateName; + } + public void setTemplateId(String templateId) { this.templateId = templateId; } + public void setTemplateName(String templateName) { + this.templateName = templateName; + } + public Date getCreated() { return created; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java index b8b0189602b..44eaba7f313 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java @@ -298,6 +298,10 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co @Param(description = "OS type id of the vm", since = "4.4") private String osTypeId; + @SerializedName(ApiConstants.OS_DISPLAY_NAME) + @Param(description = "OS name of the vm", since = "4.13.2") + private String osDisplayName; + @SerializedName(ApiConstants.BOOT_MODE) @Param(description = "Guest vm Boot Mode") private String bootMode; @@ -854,6 +858,10 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co this.osTypeId = osTypeId; } + public void setOsDisplayName(String osDisplayName) { + this.osDisplayName = osDisplayName; + } + public Set getTagIds() { return tagIds; } @@ -882,6 +890,10 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co return osTypeId; } + public String getOsDisplayName() { + return osDisplayName; + } + public String getBootType() { return bootType; } public void setBootType(String bootType) { this.bootType = bootType; } @@ -889,5 +901,4 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co public String getBootMode() { return bootMode; } public void setBootMode(String bootMode) { this.bootMode = bootMode; } - } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java index 61ed88b142c..9c9f059384e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java @@ -67,6 +67,10 @@ public class VpcResponse extends BaseResponse implements ControlledEntityRespons @Param(description = "vpc offering id the VPC is created from") private String vpcOfferingId; + @SerializedName(ApiConstants.VPC_OFF_NAME) + @Param(description = "vpc offering name the VPC is created from", since = "4.13.2") + private String vpcOfferingName; + @SerializedName(ApiConstants.CREATED) @Param(description = "the date this VPC was created") private Date created; @@ -184,6 +188,10 @@ public class VpcResponse extends BaseResponse implements ControlledEntityRespons this.vpcOfferingId = vpcOfferingId; } + public void setVpcOfferingName(final String vpcOfferingName) { + this.vpcOfferingName = vpcOfferingName; + } + public List getNetworks() { return networks; } diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 69678fd8c96..bc5cbcb99b9 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -875,6 +875,7 @@ public class ApiResponseHelper implements ResponseGenerator { Vpc vpc = ApiDBUtils.findVpcById(ipAddr.getVpcId()); if (vpc != null) { ipResponse.setVpcId(vpc.getUuid()); + ipResponse.setVpcName(vpc.getName()); } } @@ -1378,11 +1379,13 @@ public class ApiResponseHelper implements ResponseGenerator { HostPodVO pod = ApiDBUtils.findPodById(vm.getPodIdToDeployIn()); if (pod != null) { vmResponse.setPodId(pod.getUuid()); + vmResponse.setPodName(pod.getName()); } } VMTemplateVO template = ApiDBUtils.findTemplateById(vm.getTemplateId()); if (template != null) { vmResponse.setTemplateId(template.getUuid()); + vmResponse.setTemplateName(template.getName()); } vmResponse.setCreated(vm.getCreated()); @@ -2901,6 +2904,7 @@ public class ApiResponseHelper implements ResponseGenerator { VpcOffering voff = ApiDBUtils.findVpcOfferingById(vpc.getVpcOfferingId()); if (voff != null) { response.setVpcOfferingId(voff.getUuid()); + response.setVpcOfferingName(voff.getName()); } response.setCidr(vpc.getCidr()); response.setRestartRequired(vpc.isRestartRequired()); @@ -2973,6 +2977,7 @@ public class ApiResponseHelper implements ResponseGenerator { if (result.getVpcId() != null) { Vpc vpc = ApiDBUtils.findVpcById(result.getVpcId()); response.setVpcId(vpc.getUuid()); + response.setVpcName(vpc.getName()); } DataCenter zone = ApiDBUtils.findZoneById(result.getZoneId()); @@ -3163,6 +3168,7 @@ public class ApiResponseHelper implements ResponseGenerator { Vpc vpc = ApiDBUtils.findVpcById(result.getVpcId()); if (vpc != null) { response.setVpcId(vpc.getUuid()); + response.setVpcName(vpc.getName()); } response.setRemoved(result.getRemoved()); response.setForDisplay(result.isDisplay()); diff --git a/server/src/main/java/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java index 8252a2a5a18..413ff2a5614 100644 --- a/server/src/main/java/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java +++ b/server/src/main/java/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java @@ -30,11 +30,14 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.utils.CloudStackVersion; +import com.cloud.api.ApiDBUtils; import com.cloud.api.ApiResponseHelper; import com.cloud.api.query.vo.DomainRouterJoinVO; +import com.cloud.dc.HostPodVO; import com.cloud.network.Networks.TrafficType; import com.cloud.network.router.VirtualRouter; import com.cloud.network.router.VirtualRouter.Role; +import com.cloud.storage.VMTemplateVO; import com.cloud.user.Account; import com.cloud.user.AccountManager; import com.cloud.utils.db.GenericDaoBase; @@ -46,7 +49,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase 0) { TrafficType ty = router.getTrafficType(); diff --git a/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java b/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java index 21c6786f305..80c433ad71c 100644 --- a/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java +++ b/server/src/main/java/com/cloud/api/query/dao/UserVmJoinDaoImpl.java @@ -47,6 +47,7 @@ import com.cloud.api.ApiResponseHelper; import com.cloud.api.query.vo.UserVmJoinVO; import com.cloud.gpu.GPU; import com.cloud.service.ServiceOfferingDetailsVO; +import com.cloud.storage.GuestOS; import com.cloud.user.Account; import com.cloud.user.AccountManager; import com.cloud.user.User; @@ -68,7 +69,7 @@ public class UserVmJoinDaoImpl extends GenericDaoBaseWithTagInformation { private static final Logger s_logger = Logger.getLogger(VirtualNetworkApplianceManagerImpl.class); private static final String CONNECTIVITY_TEST = "connectivity.test"; + private static final String BACKUP_ROUTER_EXCLUDED_TESTS = "gateways_check.py"; @Inject private EntityManager _entityMgr; @Inject private DataCenterDao _dcDao; @@ -1632,7 +1633,11 @@ Configurable, StateListener