'more than one system exists in the account.')
return isystems[0]
- @ staticmethod
+ @staticmethod
def _respoolconverter(res_pool):
setattr(res_pool, 'name', res_pool.region_name)
return res_pool
- @ staticmethod
+ @staticmethod
def _hostconverter(host):
selected_keys = [
"hostname", "personality", "id", "mgmt_ip", "mgmt_mac",
setattr(host, 'name', host.hostname)
return host
- @ staticmethod
+ @staticmethod
def _labelconverter(label):
selected_keys = [
"uuid", "label_key", "label_value", "host_uuid"
setattr(label, 'created_at', None)
return label
- @ staticmethod
+ @staticmethod
def _cpuconverter(cpu):
selected_keys = [
"cpu", "core", "thread", "allocated_function", "numa_node",
'-', 1)[0] + '-cpu-'+str(cpu.cpu))
return cpu
- @ staticmethod
+ @staticmethod
def _memconverter(mem):
selected_keys = [
"memtotal_mib", "memavail_mib", "vm_hugepages_use_1G",
'-mem-node-'+str(mem.numa_node))
return mem
- @ staticmethod
+ @staticmethod
def _ethconverter(eth):
selected_keys = [
"name", "namedisplay", "dev_id", "pdevice", "capabilities",
setattr(eth, 'created_at', None)
return eth
- @ staticmethod
+ @staticmethod
def _ifconverter(ifs):
selected_keys = [
"ifname", "iftype", "imac", "vlan_id", "imtu",
setattr(ifs, 'created_at', None)
return ifs
- @ staticmethod
+ @staticmethod
def _devconverter(dev):
selected_keys = [
"name", "pdevice", "pciaddr", "pvendor_id", "pvendor",
setattr(dev, 'name', dev.host_uuid.split('-', 1)[0] + '-'+dev.name)
return dev
- @ staticmethod
+ @staticmethod
def _k8sconverter(cluster):
setattr(cluster, 'name', cluster.cloud_name +
'.' + cluster.cluster_name)
cluster.name + '/' + str(cluster.uuid))
return cluster
- @ staticmethod
+ @staticmethod
def _k8shasher(cluster):
return str(hash((cluster.cluster_name, cluster.cloud_name,
cluster.cluster_api_endpoint, cluster.admin_user,