Reformats code on NSD and VNFD clients and fixes small validation bug on VNFD create...
[osm/osmclient.git] / osmclient / sol005 / nsi.py
index 4671441..20065b7 100644 (file)
@@ -195,7 +195,7 @@ class Nsi(object):
                                         vim_network_name_dict[get_vim_account_id(vim_account)] = vim_net
                                     vld["vim-network-name"] = vim_network_name_dict
                     if "vnf" in nssubnet:
-                        for vnf in nsi_config["vnf"]:
+                        for vnf in nssubnet["vnf"]:
                             if vnf.get("vim_account"):
                                 vnf["vimAccountId"] = get_vim_account_id(vnf.pop("vim_account"))
                 nsi["netslice-subnet"] = nsi_config["netslice-subnet"]
@@ -271,7 +271,7 @@ class Nsi(object):
             filter_string = ''
             if filter:
                 filter_string = '&{}'.format(filter)
-            http_code, resp = self._http.get2_cmd('{}?netsliceInstanceId={}'.format(
+            http_code, resp = self._http.get2_cmd('{}?netsliceInstanceId={}{}'.format(
                                                        self._apiBase, nsi['_id'],
                                                        filter_string) )
             #print('HTTP CODE: {}'.format(http_code))