Remove unused client var in host.py

Change-Id: Iccfdfc5c9dd46edb01b6382b56acaf43f7104b5d
This commit is contained in:
Andreas Scheuring
2017-03-09 14:35:53 +01:00
parent f10f0b4519
commit 95e1bf9500
3 changed files with 5 additions and 6 deletions

View File

@@ -27,12 +27,12 @@ class HostTestCase(TestCase):
super(HostTestCase, self).setUp()
requests.packages.urllib3.disable_warnings()
self.session = utils.create_session_1()
self.client = zhmcclient.Client(self.session)
self.cpc = self.client.cpcs.find(**{"name": "cpc_2"})
client = zhmcclient.Client(self.session)
self.cpc = client.cpcs.find(**{"name": "cpc_2"})
self.flags(host=utils.HOST)
self.flags(group="dpm", max_processors=3)
self.flags(group="dpm", max_memory=2048)
self.host = host.Host(self.cpc, self.client)
self.host = host.Host(self.cpc)
def test_host_properties(self):

View File

@@ -82,7 +82,7 @@ class DPMDriver(driver.ComputeDriver):
'cpcname': self._cpc.properties['name']})
utils.valide_host_conf(self._cpc)
self._host = Host.Host(self._cpc, self._client)
self._host = Host.Host(self._cpc)
def get_available_resource(self, nodename):
"""Retrieve resource information.

View File

@@ -38,12 +38,11 @@ CPC_THREADS = 1 # TODO(preethipy): Update with relevant value
class Host(object):
def __init__(self, cpc, client):
def __init__(self, cpc):
LOG.debug('Host initializing for cpcsubset %(cpcsubset_name)s'
% {'cpcsubset_name': CONF.host})
self._client = client
self._cpc = cpc
self._instances = [] # TODO(preethipy): Instance details
# to be populated