X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fvnfd.py;h=965b999757f50e654b96e810f3a447484278d04e;hb=5da3f209f7595167bf762e71236076a637244c49;hp=e939efcacd8990e171c07fe05ba742e7341f90d1;hpb=56202fc5897ddf9f58ddca0d1b9860b6b77765e8;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/vnfd.py b/osmclient/sol005/vnfd.py index e939efc..965b999 100644 --- a/osmclient/sol005/vnfd.py +++ b/osmclient/sol005/vnfd.py @@ -158,13 +158,15 @@ class Vnfd(object): http_code, resp = self._http.post_cmd(endpoint=endpoint, filename=filename) #print 'HTTP CODE: {}'.format(http_code) #print 'RESP: {}'.format(resp) - if http_code in (200, 201, 202, 204): + if http_code in (200, 201, 202): if resp: resp = json.loads(resp) if not resp or 'id' not in resp: raise ClientException('unexpected response from server: '.format( resp)) print(resp['id']) + elif http_code == 204: + print('Updated') else: msg = "Error {}".format(http_code) if resp: @@ -176,6 +178,6 @@ class Vnfd(object): def update(self, name, filename): vnfd = self.get(name) - endpoint = '{}/{}/vnfd_content'.format(self._apiBase, vnfd['_id']) + endpoint = '{}/{}/package_content'.format(self._apiBase, vnfd['_id']) self.create(filename=filename, update_endpoint=endpoint)