From 4be9b5cd079beb124a7fe45a6b84a990631b45c0 Mon Sep 17 00:00:00 2001 From: erikbocks Date: Fri, 31 Oct 2025 12:02:02 -0300 Subject: [PATCH 1/4] Implement SSVM storage network IP to API response and GUI details tab --- .../cloudstack/api/response/SystemVmResponse.java | 12 ++++++++++++ .../main/java/com/cloud/api/ApiResponseHelper.java | 2 ++ ui/public/locales/en.json | 1 + ui/public/locales/pt_BR.json | 1 + ui/src/config/section/infra/systemVms.js | 2 +- 5 files changed, 17 insertions(+), 1 deletion(-) 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 7b1784fc7673..5b4610835330 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 @@ -126,6 +126,10 @@ public class SystemVmResponse extends BaseResponseWithAnnotations { @Param(description = "the public netmask for the system VM") private String publicNetmask; + @SerializedName("storagenetworkip") + @Param(description = "the ip for the system VM on the storage network") + private String storageNetworkIp; + @SerializedName("templateid") @Param(description = "the template ID for the system VM") private String templateId; @@ -355,6 +359,14 @@ public void setPublicNetmask(String publicNetmask) { this.publicNetmask = publicNetmask; } + public String getStorageNetworkIp() { + return storageNetworkIp; + } + + public void setStorageNetworkIp(String storageNetworkIp) { + this.storageNetworkIp = storageNetworkIp; + } + public String getTemplateId() { return templateId; } diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 8cc10ce41673..7ec24559a92b 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -1880,6 +1880,8 @@ public SystemVmResponse createSystemVmResponse(VirtualMachine vm) { vmResponse.setPublicNetmask(singleNicProfile.getIPv4Netmask()); vmResponse.setGateway(singleNicProfile.getIPv4Gateway()); } + } else if (network.getTrafficType() == TrafficType.Storage) { + vmResponse.setStorageNetworkIp(singleNicProfile.getIPv4Address()); } } } diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index d29bab3521a1..a5115490d64a 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -2426,6 +2426,7 @@ "label.storagepool.tooltip": "Destination Storage Pool. Volume should be located in this Storage Pool", "label.storagetags": "Storage tags", "label.storagetype": "Storage type", +"label.storagenetworkip": "Storage network IP", "label.strict": "Strict", "label.subdomainaccess": "Subdomain access", "label.submit": "Submit", diff --git a/ui/public/locales/pt_BR.json b/ui/public/locales/pt_BR.json index 4346f1f0bb7f..769929cdce0b 100644 --- a/ui/public/locales/pt_BR.json +++ b/ui/public/locales/pt_BR.json @@ -1583,6 +1583,7 @@ "label.storagepool": "Pool de armazenamento", "label.storagetags": "Tags de armazenamento", "label.storagetype": "Tipo de armazenamento", +"label.storagenetworkip": "IP na rede de storage", "label.strict": "Rigoroso", "label.subdomainaccess": "acesso ao subdom\u00ednio", "label.submit": "Enviar", diff --git a/ui/src/config/section/infra/systemVms.js b/ui/src/config/section/infra/systemVms.js index 6e135ccdd36a..78e4823529f3 100644 --- a/ui/src/config/section/infra/systemVms.js +++ b/ui/src/config/section/infra/systemVms.js @@ -26,7 +26,7 @@ export default { permission: ['listSystemVms'], searchFilters: ['name', 'zoneid', 'podid', 'hostid', 'systemvmtype', 'storageid', 'arch'], columns: ['name', 'state', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'version', 'hostname', 'arch', 'zonename'], - details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate'], + details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate', 'storagenetworkip'], resourceType: 'SystemVm', filters: () => { const filters = ['starting', 'running', 'stopping', 'stopped', 'destroyed', 'expunging', 'migrating', 'error', 'unknown', 'shutdown'] From 9941c97922950d8797f4f809d948ac25c2e8da18 Mon Sep 17 00:00:00 2001 From: erikbocks Date: Fri, 19 Dec 2025 14:53:10 -0300 Subject: [PATCH 2/4] remove network mention from attribute name --- .../cloudstack/api/response/SystemVmResponse.java | 12 ++++++------ .../main/java/com/cloud/api/ApiResponseHelper.java | 2 +- ui/public/locales/en.json | 2 +- ui/public/locales/pt_BR.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) 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 5b4610835330..436d92c831b0 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 @@ -127,8 +127,8 @@ public class SystemVmResponse extends BaseResponseWithAnnotations { private String publicNetmask; @SerializedName("storagenetworkip") - @Param(description = "the ip for the system VM on the storage network") - private String storageNetworkIp; + @Param(description = "the ip address for the system VM on the storage network") + private String storageIp; @SerializedName("templateid") @Param(description = "the template ID for the system VM") @@ -359,12 +359,12 @@ public void setPublicNetmask(String publicNetmask) { this.publicNetmask = publicNetmask; } - public String getStorageNetworkIp() { - return storageNetworkIp; + public String getStorageIp() { + return storageIp; } - public void setStorageNetworkIp(String storageNetworkIp) { - this.storageNetworkIp = storageNetworkIp; + public void setStorageIp(String storageIp) { + this.storageIp = storageIp; } public String getTemplateId() { diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 7ec24559a92b..af151ebdc4c1 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -1881,7 +1881,7 @@ public SystemVmResponse createSystemVmResponse(VirtualMachine vm) { vmResponse.setGateway(singleNicProfile.getIPv4Gateway()); } } else if (network.getTrafficType() == TrafficType.Storage) { - vmResponse.setStorageNetworkIp(singleNicProfile.getIPv4Address()); + vmResponse.setStorageIp(singleNicProfile.getIPv4Address()); } } } diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index a5115490d64a..30f9573bf71d 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -2426,7 +2426,7 @@ "label.storagepool.tooltip": "Destination Storage Pool. Volume should be located in this Storage Pool", "label.storagetags": "Storage tags", "label.storagetype": "Storage type", -"label.storagenetworkip": "Storage network IP", +"label.storageip": "Storage IP address", "label.strict": "Strict", "label.subdomainaccess": "Subdomain access", "label.submit": "Submit", diff --git a/ui/public/locales/pt_BR.json b/ui/public/locales/pt_BR.json index 769929cdce0b..12f5ddc2a489 100644 --- a/ui/public/locales/pt_BR.json +++ b/ui/public/locales/pt_BR.json @@ -1583,7 +1583,7 @@ "label.storagepool": "Pool de armazenamento", "label.storagetags": "Tags de armazenamento", "label.storagetype": "Tipo de armazenamento", -"label.storagenetworkip": "IP na rede de storage", +"label.storageip": "Endere\u00e7o IP na rede de armazenamento", "label.strict": "Rigoroso", "label.subdomainaccess": "acesso ao subdom\u00ednio", "label.submit": "Enviar", From c86b18d9c227c270b417764cf18acb6801e6fc76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20B=C3=B6ck?= <89930804+erikbocks@users.noreply.github.com> Date: Fri, 26 Dec 2025 08:28:07 -0300 Subject: [PATCH 3/4] remove network from serialized name --- .../org/apache/cloudstack/api/response/SystemVmResponse.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 436d92c831b0..622a31d9b952 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 @@ -126,7 +126,7 @@ public class SystemVmResponse extends BaseResponseWithAnnotations { @Param(description = "the public netmask for the system VM") private String publicNetmask; - @SerializedName("storagenetworkip") + @SerializedName("storageip") @Param(description = "the ip address for the system VM on the storage network") private String storageIp; From b712d2ac36442a18a31457af89235338715351d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20B=C3=B6ck?= <89930804+erikbocks@users.noreply.github.com> Date: Fri, 26 Dec 2025 08:29:22 -0300 Subject: [PATCH 4/4] fix parameter name in the UI --- ui/src/config/section/infra/systemVms.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/config/section/infra/systemVms.js b/ui/src/config/section/infra/systemVms.js index 78e4823529f3..4a5879b17626 100644 --- a/ui/src/config/section/infra/systemVms.js +++ b/ui/src/config/section/infra/systemVms.js @@ -26,7 +26,7 @@ export default { permission: ['listSystemVms'], searchFilters: ['name', 'zoneid', 'podid', 'hostid', 'systemvmtype', 'storageid', 'arch'], columns: ['name', 'state', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'version', 'hostname', 'arch', 'zonename'], - details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate', 'storagenetworkip'], + details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate', 'storageip'], resourceType: 'SystemVm', filters: () => { const filters = ['starting', 'running', 'stopping', 'stopped', 'destroyed', 'expunging', 'migrating', 'error', 'unknown', 'shutdown']