X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fclient.py;h=513e947a94651ecb4073e4981b726d3c23173417;hb=7b716df9faa2fbe223b7525118842988d97fbd5e;hp=7583165d795c77ef6f1d4d1a2a4e4145c5469e24;hpb=3f592284d97ed71e8d7bab435586f12623691e47;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/client.py b/osmclient/sol005/client.py index 7583165..513e947 100644 --- a/osmclient/sol005/client.py +++ b/osmclient/sol005/client.py @@ -26,14 +26,18 @@ from osmclient.sol005 import nsi from osmclient.sol005 import ns from osmclient.sol005 import vnf from osmclient.sol005 import vim +from osmclient.sol005 import wim from osmclient.sol005 import package from osmclient.sol005 import http from osmclient.sol005 import sdncontroller from osmclient.sol005 import project as projectmodule from osmclient.sol005 import user as usermodule +from osmclient.sol005 import role +from osmclient.sol005 import pdud from osmclient.common.exceptions import ClientException import json + class Client(object): def __init__( @@ -63,8 +67,8 @@ class Client(object): 'https://{}:{}/osm'.format(self._host,self._so_port)) self._headers['Accept'] = 'application/json' self._headers['Content-Type'] = 'application/yaml' - http_header = ['{}: {}'.format(key,val) - for (key,val) in list(self._headers.items())] + http_header = ['{}: {}'.format(key, val) + for (key, val) in list(self._headers.items())] self._http_client.set_http_header(http_header) token = self.get_token() @@ -82,10 +86,13 @@ class Client(object): self.ns = ns.Ns(self._http_client, client=self) self.nsi = nsi.Nsi(self._http_client, client=self) self.vim = vim.Vim(self._http_client, client=self) + self.wim = wim.Wim(self._http_client, client=self) self.sdnc = sdncontroller.SdnController(self._http_client, client=self) self.vnf = vnf.Vnf(self._http_client, client=self) self.project = projectmodule.Project(self._http_client, client=self) self.user = usermodule.User(self._http_client, client=self) + self.role = role.Role(self._http_client, client=self) + self.pdu = pdud.Pdu(self._http_client, client=self) ''' self.vca = vca.Vca(http_client, client=self, **kwargs) self.utils = utils.Utils(http_client, **kwargs) @@ -96,7 +103,7 @@ class Client(object): 'password': self._password, 'project_id': self._project} http_code, resp = self._http_client.post_cmd(endpoint=self._auth_endpoint, - postfields_dict=postfields_dict) + postfields_dict=postfields_dict) if http_code not in (200, 201, 202, 204): raise ClientException(resp) token = json.loads(resp) if resp else None