Skip to content

Commit 549d2dd

Browse files
committed
Implement SSVM storage network IP to API response and GUI details tab
1 parent b99a030 commit 549d2dd

File tree

5 files changed

+17
-1
lines changed

5 files changed

+17
-1
lines changed

api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ public class SystemVmResponse extends BaseResponseWithAnnotations {
126126
@Param(description = "the public netmask for the system VM")
127127
private String publicNetmask;
128128

129+
@SerializedName("storagenetworkip")
130+
@Param(description = "the ip for the system VM on the storage network")
131+
private String storageNetworkIp;
132+
129133
@SerializedName("templateid")
130134
@Param(description = "the template ID for the system VM")
131135
private String templateId;
@@ -355,6 +359,14 @@ public void setPublicNetmask(String publicNetmask) {
355359
this.publicNetmask = publicNetmask;
356360
}
357361

362+
public String getStorageNetworkIp() {
363+
return storageNetworkIp;
364+
}
365+
366+
public void setStorageNetworkIp(String storageNetworkIp) {
367+
this.storageNetworkIp = storageNetworkIp;
368+
}
369+
358370
public String getTemplateId() {
359371
return templateId;
360372
}

server/src/main/java/com/cloud/api/ApiResponseHelper.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,6 +1880,8 @@ public SystemVmResponse createSystemVmResponse(VirtualMachine vm) {
18801880
vmResponse.setPublicNetmask(singleNicProfile.getIPv4Netmask());
18811881
vmResponse.setGateway(singleNicProfile.getIPv4Gateway());
18821882
}
1883+
} else if (network.getTrafficType() == TrafficType.Storage) {
1884+
vmResponse.setStorageNetworkIp(singleNicProfile.getIPv4Address());
18831885
}
18841886
}
18851887
}

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,6 +2414,7 @@
24142414
"label.storagepool.tooltip": "Destination Storage Pool. Volume should be located in this Storage Pool",
24152415
"label.storagetags": "Storage tags",
24162416
"label.storagetype": "Storage type",
2417+
"label.storagenetworkip": "Storage network IP",
24172418
"label.strict": "Strict",
24182419
"label.subdomainaccess": "Subdomain access",
24192420
"label.submit": "Submit",

ui/public/locales/pt_BR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,6 +1583,7 @@
15831583
"label.storagepool": "Pool de armazenamento",
15841584
"label.storagetags": "Tags de armazenamento",
15851585
"label.storagetype": "Tipo de armazenamento",
1586+
"label.storagenetworkip": "IP na rede de storage",
15861587
"label.strict": "Rigoroso",
15871588
"label.subdomainaccess": "acesso ao subdom\u00ednio",
15881589
"label.submit": "Enviar",

ui/src/config/section/infra/systemVms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default {
2626
permission: ['listSystemVms'],
2727
searchFilters: ['name', 'zoneid', 'podid', 'hostid', 'systemvmtype', 'storageid', 'arch'],
2828
columns: ['name', 'state', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'version', 'hostname', 'arch', 'zonename'],
29-
details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate'],
29+
details: ['name', 'id', 'agentstate', 'systemvmtype', 'publicip', 'privateip', 'linklocalip', 'gateway', 'hostname', 'arch', 'version', 'zonename', 'created', 'activeviewersessions', 'isdynamicallyscalable', 'hostcontrolstate', 'storagenetworkip'],
3030
resourceType: 'SystemVm',
3131
filters: () => {
3232
const filters = ['starting', 'running', 'stopping', 'stopped', 'destroyed', 'expunging', 'migrating', 'error', 'unknown', 'shutdown']

0 commit comments

Comments
 (0)