mirror of https://github.com/apache/cloudstack.git
set `displayName` to `name` by default (#9719)
* set `desplayName` to `name` by default * list by displayname instead of name * back to using name * Update api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java --------- Co-authored-by: Daan Hoogland <dahn@apache.org>
This commit is contained in:
parent
45d623ec0d
commit
25eacaa1ff
|
|
@ -56,7 +56,6 @@ import org.apache.cloudstack.context.CallContext;
|
|||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.cloud.agent.api.LogLevel;
|
||||
import com.cloud.event.EventTypes;
|
||||
|
|
@ -74,6 +73,7 @@ import com.cloud.template.VirtualMachineTemplate;
|
|||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.net.Dhcp;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
import com.cloud.utils.StringUtils;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VmDetailConstants;
|
||||
|
||||
|
|
@ -298,6 +298,9 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd implements SecurityG
|
|||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
if (StringUtils.isEmpty(displayName)) {
|
||||
displayName = name;
|
||||
}
|
||||
return displayName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.cloud.utils.StringUtils;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
import org.apache.cloudstack.api.ApiArgValidator;
|
||||
|
|
@ -159,6 +160,9 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction,
|
|||
/////////////////////////////////////////////////////
|
||||
|
||||
public String getDisplayName() {
|
||||
if (StringUtils.isBlank(displayName)) {
|
||||
displayName = name;
|
||||
}
|
||||
return displayName;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue