mirror of https://github.com/apache/cloudstack.git
bug 6241: returning the vm display name for a host of cases
status 6241: resolved fixed
This commit is contained in:
parent
843cfc8793
commit
dff7e5c58f
|
|
@ -125,7 +125,8 @@ public class CreateIPForwardingRuleCmd extends BaseCmd {
|
|||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.PRIVATE_PORT.getName(), firewallRule.getPrivatePort()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.PROTOCOL.getName(), firewallRule.getProtocol()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_NAME.getName(), userVM.getName()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_ID.getName(), userVM.getId().toString()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_DISPLAYNAME.getName(), userVM.getDisplayName()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_ID.getName(), Long.toString(userVM.getId())));
|
||||
|
||||
forwardingTag[0] = ruleData;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ public class ListPortForwardingRulesCmd extends BaseCmd {
|
|||
if (userVM != null) {
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_ID.getName(), userVM.getId().toString()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_NAME.getName(), userVM.getName()));
|
||||
ruleData.add(new Pair<String, Object>(BaseCmd.Properties.VIRTUAL_MACHINE_DISPLAYNAME.getName(), userVM.getDisplayName()));
|
||||
}
|
||||
|
||||
forwardingTag[i++] = ruleData;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
package com.cloud.async.executor;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -74,6 +75,7 @@ public class UpdatePortForwardingRuleExecutor extends BaseAsyncJobExecutor {
|
|||
UserVmVO userVM = userVMs.get(0);
|
||||
resultObject.setVirtualMachineId(userVM.getId());
|
||||
resultObject.setVirtualMachineName(userVM.getName());
|
||||
resultObject.setVirtualMachineDisplayName(userVM.getDisplayName());
|
||||
}
|
||||
|
||||
resultObject.setId(firewallRule.getId());
|
||||
|
|
|
|||
|
|
@ -27,6 +27,17 @@ public class UpdatePortForwardingRuleResultObject {
|
|||
@Param(name="vmname")
|
||||
private String virtualMachineName;
|
||||
|
||||
@Param(name="vmdisplayname")
|
||||
private String virtualMachineDisplayName;
|
||||
|
||||
public String getVirtualMachineDisplayName(){
|
||||
return this.virtualMachineDisplayName;
|
||||
}
|
||||
|
||||
public void setVirtualMachineDisplayName(String name){
|
||||
this.virtualMachineDisplayName = name;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue