Fix RC CLI to work with Object from Bay changes

Fix RC CLI to work with Object from Bay changes. In the list
API explicitly pass the bay_ident for which the query is
supposed to be made.

Change-Id: I6093b0e062b72471abc32b968076dcec67e6d6dd
Partially-Implements: bp objects-from-bay
This commit is contained in:
Vilobh Meshram 2015-11-17 15:14:45 -08:00
parent 0019684fac
commit 77c16733fe
2 changed files with 6 additions and 6 deletions

View File

@ -105,7 +105,7 @@ class RCManagerTest(testtools.TestCase):
def test_rc_list(self):
rcs = self.mgr.list(RC1['bay_uuid'])
expect = [
('GET', '/v1/rcs', {}, None),
('GET', '/v1/rcs/?bay_ident=%s' % (RC1['bay_uuid']), {}, None),
]
self.assertEqual(expect, self.api.calls)
self.assertThat(rcs, matchers.HasLength(2))

View File

@ -59,8 +59,8 @@ class ReplicationControllerManager(base.Manager):
:param sort_dir: Optional, direction of sorting, either 'asc' (the
default) or 'desc'.
:param detail: Optional, boolean whether to return detailed information
about ReplicationControllers.
:param detail: Optional, boolean whether to return detailed
information about ReplicationControllers.
:returns: A list of ReplicationControllers.
@ -78,10 +78,10 @@ class ReplicationControllerManager(base.Manager):
path += '?' + '&'.join(filters)
if limit is None:
return self._list(self._path(bay_ident), "rcs")
return self._list(self._path(bay_ident=bay_ident), "rcs")
else:
return self._list_pagination(self._path(bay_ident), "rcs",
limit=limit)
return self._list_pagination(self._path(bay_ident=bay_ident),
"rcs", limit=limit)
def get(self, id, bay_ident):
try: