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
This commit is contained in:
tengqm
2015-11-06 04:59:54 -05:00
parent 8e1ac1f99f
commit f6935eacc7

View File

@@ -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