aboutsummaryrefslogtreecommitdiffstats
path: root/onap-client/onap_client/sdc/vnf.py
diff options
context:
space:
mode:
Diffstat (limited to 'onap-client/onap_client/sdc/vnf.py')
-rw-r--r--onap-client/onap_client/sdc/vnf.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/onap-client/onap_client/sdc/vnf.py b/onap-client/onap_client/sdc/vnf.py
index 03b5c54..21540e9 100644
--- a/onap-client/onap_client/sdc/vnf.py
+++ b/onap-client/onap_client/sdc/vnf.py
@@ -37,8 +37,8 @@
from onap_client.lib import generate_dummy_string
from onap_client.resource import Resource
-from onap_client import exceptions, sdc
-from onap_client.client.clients import Client
+from onap_client import exceptions
+from onap_client.client.clients import get_client as Client
from onap_client.sdc import vsp
from onap_client.util import utility
@@ -444,8 +444,9 @@ class VNF(Resource):
:policy_name: name of the policy, matching onap-client.conf
"""
- sdc_properties = sdc.SDC_PROPERTIES
- policy = sdc_properties.POLICIES.get(policy_name)
+ oc = Client()
+
+ policy = oc.config.sdc.POLICIES.get(policy_name)
if not policy:
raise exceptions.UnknownPolicyException(
"Policy {} was not found in configuration file".format(policy_name)
@@ -472,6 +473,9 @@ class VNF(Resource):
vnf = self.oc.sdc.vnf.get_catalog_resource(**self.attributes)
self.attributes["tosca"] = vnf.response_data
+ def _output(self):
+ return self.tosca
+
def update_vnf(catalog_resource_id, vnf_input):
oc = Client()