/** * Initialize the object properties based on the DB object. * Common code between plugin calls and DBSync. */ public void setProperties(ModelController controller, VMInstanceVO instance) { ContrailManager manager = controller.getManager(); _instanceName = instance.getInstanceName(); _active = isActiveInstance(instance); try { _projectId = manager.getProjectId(instance.getDomainId(), instance.getAccountId()); } catch (IOException ex) { s_logger.warn("project read", ex); throw new CloudRuntimeException(ex); } _initialized = true; }
new FirewallRuleVO(null, ip.getId(), 0, 65535, NetUtils.ALL_PROTO.toString(), nic.getNetworkId(), vm.getAccountId(), vm.getDomainId(), Purpose.StaticNat, null, null, null, null, null); result.add(staticNatRule);
boolean defaultHasDns = getDefaultHasDns(networkHasDnsCache, userNic); VspDhcpVMOption dhcpOption = _nuageVspEntityBuilder.buildVmDhcpOption(userNic, defaultHasDns, networkHasDns); dhcpOptionsPerDomain.put(userVm.getDomainId(), dhcpOption);