From 571676d9cbbc359545998ca7ef6dd5ed65f8abb3 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Thu, 3 May 2018 18:48:12 +0200 Subject: [PATCH] fix bug in upload-package with sol005 client Change-Id: I3f2ea5c10bbaad65dcbbc8dcef5614aeb3f70677 Signed-off-by: garciadeblas --- osmclient/sol005/package.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/osmclient/sol005/package.py b/osmclient/sol005/package.py index de604c3..9fd734a 100644 --- a/osmclient/sol005/package.py +++ b/osmclient/sol005/package.py @@ -41,9 +41,9 @@ class Package(object): if pkg_type is None: raise ClientException("Cannot determine package type") if pkg_type['type'] == 'nsd': - endpoint = '/nsd/v1/ns_descriptors' + endpoint = '/nsd/v1/ns_descriptors_content' else: - endpoint = '/vnfpkgm/v1/vnf_packages' + endpoint = '/vnfpkgm/v1/vnf_packages_content' #endpoint = '/nsds' if pkg_type['type'] == 'nsd' else '/vnfds' #print 'Endpoint: {}'.format(endpoint) headers = self._client._headers @@ -57,8 +57,7 @@ class Package(object): http_header = ['{}: {}'.format(key,val) for (key,val) in headers.items()] self._http.set_http_header(http_header) - resp = self._http.post_cmd(endpoint=endpoint, - filename=filename) + resp = self._http.post_cmd(endpoint=endpoint, filename=filename) #print 'RESP: {}'.format(yaml.safe_dump(resp)) if not resp or 'id' not in resp: raise ClientException("failed to upload package") -- 2.25.1