From f6935eacc798487481f9794e560e4e4280223979 Mon Sep 17 00:00:00 2001 From: tengqm Date: Fri, 6 Nov 2015 04:59:54 -0500 Subject: [PATCH] Remove unused methods in client module This patch proposes a removal of some methods that are never used in the client module. They will eventually get invoked from sdk. We don't need to do this at senlin client's side. Change-Id: I9dd0cb9a3d60fba5e6c2cd3b7c1502d03b91119f --- senlinclient/v1/client.py | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/senlinclient/v1/client.py b/senlinclient/v1/client.py index 995ada55..71da2df3 100644 --- a/senlinclient/v1/client.py +++ b/senlinclient/v1/client.py @@ -11,9 +11,7 @@ # under the License. import inspect -import json from openstack.identity import identity_service -from openstack import transport as trans from senlinclient.common import exc as client_exc from senlinclient.common import sdk @@ -285,16 +283,6 @@ class Client(object): # adopted into OpenStack SDK. ###################################################################### - def get_options(self, options): - return json.loads(options) - - def transport(self, opts): - '''Create a transport given some options.''' - - argument = opts.argument - xport = trans.Transport(verify=opts.verify) - return xport.get(argument).text - def session(self, cls_name): if cls_name is None: raise Exception("A cls name argument must be specified") @@ -302,11 +290,6 @@ class Client(object): filtration = identity_service.IdentityService() return self.session.get(cls_name, service=filtration).text - def authenticate(self, options): - xport = trans.Transport(verify=options.verify) - print(self.auth.authorize(xport)) - return xport - def list(self, cls, path_args=None, **options): try: return cls.list(self.session, path_args=path_args, params=options) @@ -355,12 +338,6 @@ class Client(object): except Exception as ex: client_exc.parse_exception(ex) - def head(self, cls, options): - kwargs = self.get_options(options) - obj = cls.new(**kwargs) - obj.head(self.session) - return obj - def action(self, cls, options): def filter_args(method, params): expected_args = inspect.getargspec(method).args