projects
/
osm
/
LCM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LCM Helm connector integration
[osm/LCM.git]
/
osm_lcm
/
lcm_utils.py
diff --git
a/osm_lcm/lcm_utils.py
b/osm_lcm/lcm_utils.py
index
2779a25
..
a6ce5bd
100644
(file)
--- a/
osm_lcm/lcm_utils.py
+++ b/
osm_lcm/lcm_utils.py
@@
-97,7
+97,7
@@
class TaskRegistry(LcmBase):
# NS/NSI: "services" VIM/WIM/SDN: "accounts"
topic_service_list = ['ns', 'nsi']
# NS/NSI: "services" VIM/WIM/SDN: "accounts"
topic_service_list = ['ns', 'nsi']
- topic_account_list = ['vim', 'wim', 'sdn']
+ topic_account_list = ['vim', 'wim', 'sdn'
, 'k8scluster', 'k8srepo'
]
# Map topic to InstanceID
topic2instid_dict = {
# Map topic to InstanceID
topic2instid_dict = {
@@
-110,7
+110,9
@@
class TaskRegistry(LcmBase):
'nsi': 'nsilcmops',
'vim': 'vim_accounts',
'wim': 'wim_accounts',
'nsi': 'nsilcmops',
'vim': 'vim_accounts',
'wim': 'wim_accounts',
- 'sdn': 'sdns'}
+ 'sdn': 'sdns',
+ 'k8scluster': 'k8sclusters',
+ 'k8srepo': 'k8srepos'}
def __init__(self, worker_id=None, db=None, logger=None):
self.task_registry = {
def __init__(self, worker_id=None, db=None, logger=None):
self.task_registry = {
@@
-119,6
+121,8
@@
class TaskRegistry(LcmBase):
"vim_account": {},
"wim_account": {},
"sdn": {},
"vim_account": {},
"wim_account": {},
"sdn": {},
+ "k8scluster": {},
+ "k8srepo": {},
}
self.worker_id = worker_id
self.db = db
}
self.worker_id = worker_id
self.db = db
@@
-232,7
+236,7
@@
class TaskRegistry(LcmBase):
# NS/NSI: Use op_id as '_id'
elif self._is_service_type_HA(topic):
_id = op_id
# NS/NSI: Use op_id as '_id'
elif self._is_service_type_HA(topic):
_id = op_id
- # VIM/SDN/WIM: Split op_id to get Account ID and Operation Index, use Account ID as '_id'
+ # VIM/SDN/WIM
/K8SCLUSTER
: Split op_id to get Account ID and Operation Index, use Account ID as '_id'
elif self._is_account_type_HA(topic):
_id, _ = self._get_account_and_op_HA(op_id)
return _id
elif self._is_account_type_HA(topic):
_id, _ = self._get_account_and_op_HA(op_id)
return _id
@@
-254,7
+258,7
@@
class TaskRegistry(LcmBase):
_filter = {instance_id_label: instance_id,
'operationState': 'PROCESSING',
'startTime.lt': starttime_this_op}
_filter = {instance_id_label: instance_id,
'operationState': 'PROCESSING',
'startTime.lt': starttime_this_op}
- # VIM/WIM/SDN
+ # VIM/WIM/SDN
/K8scluster
elif self._is_account_type_HA(topic):
_, op_index = self._get_account_and_op_HA(op_id)
_ops = db_lcmop['_admin']['operations']
elif self._is_account_type_HA(topic):
_, op_index = self._get_account_and_op_HA(op_id)
_ops = db_lcmop['_admin']['operations']
@@
-303,7
+307,7
@@
class TaskRegistry(LcmBase):
the task in this instance of LCM, without querying the DB.
"""
the task in this instance of LCM, without querying the DB.
"""
- # Backward compatibility for VIM/WIM/SDN without op_id
+ # Backward compatibility for VIM/WIM/SDN
/k8scluster
without op_id
if self._is_account_type_HA(topic) and op_id is None:
return True
if self._is_account_type_HA(topic) and op_id is None:
return True