From: garciadeblas Date: Thu, 3 May 2018 16:48:12 +0000 (+0200) Subject: fix bug in upload-package with sol005 client X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F67%2F6067%2F1;p=osm%2Fosmclient.git fix bug in upload-package with sol005 client Change-Id: I3f2ea5c10bbaad65dcbbc8dcef5614aeb3f70677 Signed-off-by: garciadeblas --- 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")