Feature 10914: Enforce Password change on First login
[osm/osmclient.git] / osmclient / sol005 / ns.py
index a5a5c79..f4366b2 100644 (file)
@@ -163,6 +163,7 @@ class Ns(object):
         description="default description",
         admin_status="ENABLED",
         wait=False,
+        timeout=None,
     ):
         self._logger.debug("")
         self._client.get_token()
@@ -181,10 +182,6 @@ class Ns(object):
             vim_account_id[vim_account] = vim["_id"]
             return vim["_id"]
 
-        def get_vca_id(vim_id):
-            vim = self._client.vim.get(vim_id)
-            return vim.get("vca")
-
         def get_wim_account_id(wim_account):
             self._logger.debug("")
             # wim_account can be False (boolean) to indicate not use wim account
@@ -199,14 +196,11 @@ class Ns(object):
             return wim["_id"]
 
         vim_id = get_vim_account_id(account)
-        vca_id = get_vca_id(vim_id)
         ns = {}
         ns["nsdId"] = nsd["_id"]
         ns["nsName"] = nsr_name
         ns["nsDescription"] = description
         ns["vimAccountId"] = vim_id
-        if vca_id:
-            ns["vcaId"] = vca_id
         # ns['userdata'] = {}
         # ns['userdata']['key1']='value1'
         # ns['userdata']['key2']='value2'
@@ -216,6 +210,8 @@ class Ns(object):
             for pubkeyfile in ssh_keys.split(","):
                 with open(pubkeyfile, "r") as f:
                     ns["ssh_keys"].append(f.read())
+        if timeout:
+            ns["timeout_ns_deploy"] = timeout
         if config:
             ns_config = yaml.safe_load(config)
             if "vim-network-name" in ns_config: