Skip to content

Commit cd2d711

Browse files
authored
Implement SSVM storage network IP to API response and GUI details tab (#11979)
* Implement SSVM storage network IP to API response and GUI details tab * remove network mention from attribute name * remove network from serialized name * fix parameter name in the UI
1 parent 416568a commit cd2d711

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("storageip")
130+
@Param(description = "the ip address for the system VM on the storage network")
131+
private String storageIp;
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 getStorageIp() {
363+
return storageIp;
364+
}
365+
366+
public void setStorageIp(String storageIp) {
367+
this.storageIp = storageIp;
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
@@ -1884,6 +1884,8 @@ public SystemVmResponse createSystemVmResponse(VirtualMachine vm) {
18841884
vmResponse.setPublicNetmask(singleNicProfile.getIPv4Netmask());
18851885
vmResponse.setGateway(singleNicProfile.getIPv4Gateway());
18861886
}
1887+
} else if (network.getTrafficType() == TrafficType.Storage) {
1888+
vmResponse.setStorageIp(singleNicProfile.getIPv4Address());
18871889
}
18881890
}
18891891
}

ui/public/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,6 +2438,7 @@
24382438
"label.storagepool.tooltip": "Destination Storage Pool. Volume should be located in this Storage Pool",
24392439
"label.storagetags": "Storage tags",
24402440
"label.storagetype": "Storage type",
2441+
"label.storageip": "Storage IP address",
24412442
"label.strict": "Strict",
24422443
"label.subdomainaccess": "Subdomain access",
24432444
"label.submit": "Submit",

ui/public/locales/pt_BR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,7 @@
15841584
"label.storagepool": "Pool de armazenamento",
15851585
"label.storagetags": "Tags de armazenamento",
15861586
"label.storagetype": "Tipo de armazenamento",
1587+
"label.storageip": "Endere\u00e7o IP na rede de armazenamento",
15871588
"label.strict": "Rigoroso",
15881589
"label.subdomainaccess": "acesso ao subdom\u00ednio",
15891590
"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', 'storageip'],
3030
resourceType: 'SystemVm',
3131
filters: () => {
3232
const filters = ['starting', 'running', 'stopping', 'stopped', 'destroyed', 'expunging', 'migrating', 'error', 'unknown', 'shutdown']

0 commit comments

Comments
 (0)