Code Review
/
pti
/
o2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update DeploymentManagerInfo attributes
[pti/o2.git]
/
o2ims
/
adapter
/
clients
/
ocloud_client.py
diff --git
a/o2ims/adapter/clients/ocloud_client.py
b/o2ims/adapter/clients/ocloud_client.py
index
4e8430f
..
f601bbc
100644
(file)
--- a/
o2ims/adapter/clients/ocloud_client.py
+++ b/
o2ims/adapter/clients/ocloud_client.py
@@
-301,7
+301,7
@@
class StxClientImp(object):
subcloud_stxclient = self.getSubcloudClient(
subcloud.subcloud_id)
systems = subcloud_stxclient.isystem.list()
subcloud_stxclient = self.getSubcloudClient(
subcloud.subcloud_id)
systems = subcloud_stxclient.isystem.list()
- logger.debug('s
ystems
:' + str(systems[0].to_dict()))
+ logger.debug('s
ubcloud system
:' + str(systems[0].to_dict()))
pools.append(systems[0])
except Exception as ex:
logger.warning('Failed get cgstclient of subcloud %s: %s' %
pools.append(systems[0])
except Exception as ex:
logger.warning('Failed get cgstclient of subcloud %s: %s' %
@@
-591,12
+591,12
@@
class StxClientImp(object):
'more than one system exists in the account.')
return isystems[0]
'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
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",
def _hostconverter(host):
selected_keys = [
"hostname", "personality", "id", "mgmt_ip", "mgmt_mac",
@@
-612,7
+612,7
@@
class StxClientImp(object):
setattr(host, 'name', host.hostname)
return host
setattr(host, 'name', host.hostname)
return host
- @
staticmethod
+ @staticmethod
def _labelconverter(label):
selected_keys = [
"uuid", "label_key", "label_value", "host_uuid"
def _labelconverter(label):
selected_keys = [
"uuid", "label_key", "label_value", "host_uuid"
@@
-628,7
+628,7
@@
class StxClientImp(object):
setattr(label, 'created_at', None)
return label
setattr(label, 'created_at', None)
return label
- @
staticmethod
+ @staticmethod
def _cpuconverter(cpu):
selected_keys = [
"cpu", "core", "thread", "allocated_function", "numa_node",
def _cpuconverter(cpu):
selected_keys = [
"cpu", "core", "thread", "allocated_function", "numa_node",
@@
-642,7
+642,7
@@
class StxClientImp(object):
'-', 1)[0] + '-cpu-'+str(cpu.cpu))
return cpu
'-', 1)[0] + '-cpu-'+str(cpu.cpu))
return cpu
- @
staticmethod
+ @staticmethod
def _memconverter(mem):
selected_keys = [
"memtotal_mib", "memavail_mib", "vm_hugepages_use_1G",
def _memconverter(mem):
selected_keys = [
"memtotal_mib", "memavail_mib", "vm_hugepages_use_1G",
@@
-660,7
+660,7
@@
class StxClientImp(object):
'-mem-node-'+str(mem.numa_node))
return mem
'-mem-node-'+str(mem.numa_node))
return mem
- @
staticmethod
+ @staticmethod
def _ethconverter(eth):
selected_keys = [
"name", "namedisplay", "dev_id", "pdevice", "capabilities",
def _ethconverter(eth):
selected_keys = [
"name", "namedisplay", "dev_id", "pdevice", "capabilities",
@@
-678,7
+678,7
@@
class StxClientImp(object):
setattr(eth, 'created_at', None)
return eth
setattr(eth, 'created_at', None)
return eth
- @
staticmethod
+ @staticmethod
def _ifconverter(ifs):
selected_keys = [
"ifname", "iftype", "imac", "vlan_id", "imtu",
def _ifconverter(ifs):
selected_keys = [
"ifname", "iftype", "imac", "vlan_id", "imtu",
@@
-694,7
+694,7
@@
class StxClientImp(object):
setattr(ifs, 'created_at', None)
return ifs
setattr(ifs, 'created_at', None)
return ifs
- @
staticmethod
+ @staticmethod
def _devconverter(dev):
selected_keys = [
"name", "pdevice", "pciaddr", "pvendor_id", "pvendor",
def _devconverter(dev):
selected_keys = [
"name", "pdevice", "pciaddr", "pvendor_id", "pvendor",
@@
-708,7
+708,7
@@
class StxClientImp(object):
setattr(dev, 'name', dev.host_uuid.split('-', 1)[0] + '-'+dev.name)
return dev
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)
def _k8sconverter(cluster):
setattr(cluster, 'name', cluster.cloud_name +
'.' + cluster.cluster_name)
@@
-721,7
+721,7
@@
class StxClientImp(object):
cluster.name + '/' + str(cluster.uuid))
return cluster
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,
def _k8shasher(cluster):
return str(hash((cluster.cluster_name, cluster.cloud_name,
cluster.cluster_api_endpoint, cluster.admin_user,