response.setObjectName("networkacl");
return response;
}
public UserVmData newUserVmData(UserVm userVm) {
UserVmData userVmData = new UserVmData();
userVmData.setId(userVm.getId());
userVmData.setName(userVm.getHostName());
userVmData.setCreated(userVm.getCreated());
userVmData.setGuestOsId(userVm.getGuestOSId());
userVmData.setHaEnable(userVm.isHaEnabled());
if (userVm.getState() != null) {
userVmData.setState(userVm.getState().toString());
}
if (userVm.getDisplayName() != null) {
userVmData.setDisplayName(userVm.getDisplayName());
} else {
userVmData.setDisplayName(userVm.getHostName());
}
userVmData.setInstanceName(userVm.getInstanceName());
userVmData.setDomainId(userVm.getDomainId());
if (userVm.getHypervisorType() != null) {
userVmData.setHypervisor(userVm.getHypervisorType().toString());
}
if (userVm.getPassword() != null) {
userVmData.setPassword(userVm.getPassword());
}
return userVmData;
}