def build(self, pdo=None, uuid=None, conn_url=None): if not pdo: pdo = RunningSoftwareBuilder.create_pdo() osh = RunningSoftwareBuilder.build(self, pdo, cit=ManagerBuilder.CIT) ovm_reportage.set_non_empty( osh.setStringAttribute, ('uuid', uuid), ('connection_url', conn_url)) return osh
def build(self, pdo=None, cit=None): pdo = pdo or Builder.create_pdo() builder = modeling.HostBuilder(ObjectStateHolder(cit or self.CIT)) set_non_empty(builder.setStringAttribute, ('name', pdo.name), ('host_key', pdo.host_key)) if pdo.host_key: builder.setBoolAttribute('host_iscomplete', True) if pdo.is_virtual: builder.setAsVirtual(pdo.is_virtual) return builder.build()
def build(self, pdo, cit=CIT): pdo = self.__update_product_info(pdo, self.PRODUCT_NAME, self.DRED_PRODUCT_NAME, self.VENDOR) osh = ObjectStateHolder(cit) ovm_reportage.set_non_empty( osh.setStringAttribute, ('discovered_product_name', pdo.dred_product_name), ('product_name', pdo.product_name), ('vendor', pdo.vendor), ('name', pdo.name), ('credentials_id', pdo.credentials_id), ('application_ip', pdo.app_ip and str(pdo.app_ip)), ('version', pdo.version), ('description', pdo.description)) ovm_reportage.set_non_empty(osh.setIntegerAttribute, ('application_port', pdo.app_port)) return osh
def build(self, pdo, cit=None): cit = cit or self.CIT software_pdo = pdo.software_pdo osh = RunningSoftwareBuilder.build(self, software_pdo, cit) set_non_empty(osh.setStringAttribute, ('connection_state', pdo.connection_state), ('connection_url', pdo.connection_url), ('hypervisor_name', pdo.name), ('status', pdo.status)) set_non_empty(osh.setBoolAttribute, ('enabled_for_live_migration', False), ('maintenance_mode', pdo.in_maintenance_mode), # always disabled as VmWare technology ('vmotion_enabled', False)) return osh
def build(self, pdo, cit=None): cit = cit or self.CIT software_pdo = pdo.software_pdo osh = RunningSoftwareBuilder.build(self, software_pdo, cit) set_non_empty(osh.setStringAttribute, ('connection_state', pdo.connection_state), ('connection_url', pdo.connection_url), ('hypervisor_name', pdo.name), ('status', pdo.status)) set_non_empty( osh.setBoolAttribute, ('enabled_for_live_migration', False), ('maintenance_mode', pdo.in_maintenance_mode), # always disabled as VmWare technology ('vmotion_enabled', False)) return osh
def build(self, pdo, cit=None): osh = ObjectStateHolder(cit or self.CIT) domain = pdo.domain_pdo cpu = pdo.cpu_pdo ovm_reportage.set_non_empty( osh.setStringAttribute, ("name", pdo.name), ("xen_domain_name", domain.name), ("xen_domain_on_restart", pdo.on_restart), ("xen_domain_on_crash", pdo.on_crash), ("xen_domain_on_poweroff", pdo.on_poweroff), ("xen_domain_state", domain.state), ("xen_domain_type", "Para-Virtualized"), ("host_biosuuid", domain.uuid and domain.uuid.upper()), ) ovm_reportage.set_non_empty( osh.setIntegerAttribute, ("xen_domain_vcpus", cpu.vcpus_count), ("xen_domain_id", domain.id), ("xen_cores_per_socket", cpu.cores_per_socket_count), ("xen_threads_per_core", cpu.threads_per_core), ("xen_cpu_count", cpu.count), ) ovm_reportage.set_non_empty( osh.setLongAttribute, ("xen_domain_memory", domain.memory_in_kb), ("xen_domain_max_memory", domain.max_memory_in_kb), ("xen_max_free_memory", pdo.max_free_memory_in_kb), ("xen_free_memory", pdo.free_memory_in_kb), ("xen_hvm_memory", pdo.hvm_memory_in_kb), ("xen_para_memory", pdo.para_memory_in_kb), ) return osh
def build(self, pdo, cit=None): osh = ObjectStateHolder(cit or self.CIT) domain = pdo.domain_pdo cpu = pdo.cpu_pdo ovm_reportage.set_non_empty( osh.setStringAttribute, ('name', pdo.name), ('xen_domain_name', domain.name), ('xen_domain_on_restart', pdo.on_restart), ('xen_domain_on_crash', pdo.on_crash), ('xen_domain_on_poweroff', pdo.on_poweroff), ('xen_domain_state', domain.state), ('xen_domain_type', 'Para-Virtualized'), ('host_biosuuid', domain.uuid and domain.uuid.upper())) ovm_reportage.set_non_empty( osh.setIntegerAttribute, ('xen_domain_vcpus', cpu.vcpus_count), ('xen_domain_id', domain.id), ('xen_cores_per_socket', cpu.cores_per_socket_count), ('xen_threads_per_core', cpu.threads_per_core), ('xen_cpu_count', cpu.count)) ovm_reportage.set_non_empty( osh.setLongAttribute, ('xen_domain_memory', domain.memory_in_kb), ('xen_domain_max_memory', domain.max_memory_in_kb), ('xen_max_free_memory', pdo.max_free_memory_in_kb), ('xen_free_memory', pdo.free_memory_in_kb), ('xen_hvm_memory', pdo.hvm_memory_in_kb), ('xen_para_memory', pdo.para_memory_in_kb)) return osh