class NetsliceLcm(LcmBase):
-
- timeout_nsi_deploy = 2 * 3600 # default global timeout for deployment a nsi
-
def __init__(self, msg, lcm_tasks, config, loop, ns):
"""
Init, Connect to database, filesystem storage, and messaging
)
async def instantiate(self, nsir_id, nsilcmop_id):
-
# Try to lock HA task here
task_is_locked_by_me = self.lcm_tasks.lock_HA("nsi", "nsilcmops", nsilcmop_id)
if not task_is_locked_by_me:
if nsi_params and nsi_params.get("timeout_nsi_deploy"):
timeout_nsi_deploy = nsi_params["timeout_nsi_deploy"]
else:
- timeout_nsi_deploy = self.timeout.get(
- "nsi_deploy", self.timeout_nsi_deploy
- )
+ timeout_nsi_deploy = self.timeout.get("nsi_deploy")
# Empty list to keep track of network service records status in the netslice
nsir_admin = db_nsir_admin = db_nsir.get("_admin")
self.lcm_tasks.remove("nsi", nsir_id, nsilcmop_id, "nsi_instantiate")
async def terminate(self, nsir_id, nsilcmop_id):
-
# Try to lock HA task here
task_is_locked_by_me = self.lcm_tasks.lock_HA("nsi", "nsilcmops", nsilcmop_id)
if not task_is_locked_by_me: