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:
parent
0019684fac
commit
77c16733fe
@ -105,7 +105,7 @@ class RCManagerTest(testtools.TestCase):
|
|||||||
def test_rc_list(self):
|
def test_rc_list(self):
|
||||||
rcs = self.mgr.list(RC1['bay_uuid'])
|
rcs = self.mgr.list(RC1['bay_uuid'])
|
||||||
expect = [
|
expect = [
|
||||||
('GET', '/v1/rcs', {}, None),
|
('GET', '/v1/rcs/?bay_ident=%s' % (RC1['bay_uuid']), {}, None),
|
||||||
]
|
]
|
||||||
self.assertEqual(expect, self.api.calls)
|
self.assertEqual(expect, self.api.calls)
|
||||||
self.assertThat(rcs, matchers.HasLength(2))
|
self.assertThat(rcs, matchers.HasLength(2))
|
||||||
|
@ -59,8 +59,8 @@ class ReplicationControllerManager(base.Manager):
|
|||||||
:param sort_dir: Optional, direction of sorting, either 'asc' (the
|
:param sort_dir: Optional, direction of sorting, either 'asc' (the
|
||||||
default) or 'desc'.
|
default) or 'desc'.
|
||||||
|
|
||||||
:param detail: Optional, boolean whether to return detailed information
|
:param detail: Optional, boolean whether to return detailed
|
||||||
about ReplicationControllers.
|
information about ReplicationControllers.
|
||||||
|
|
||||||
:returns: A list of ReplicationControllers.
|
:returns: A list of ReplicationControllers.
|
||||||
|
|
||||||
@ -78,10 +78,10 @@ class ReplicationControllerManager(base.Manager):
|
|||||||
path += '?' + '&'.join(filters)
|
path += '?' + '&'.join(filters)
|
||||||
|
|
||||||
if limit is None:
|
if limit is None:
|
||||||
return self._list(self._path(bay_ident), "rcs")
|
return self._list(self._path(bay_ident=bay_ident), "rcs")
|
||||||
else:
|
else:
|
||||||
return self._list_pagination(self._path(bay_ident), "rcs",
|
return self._list_pagination(self._path(bay_ident=bay_ident),
|
||||||
limit=limit)
|
"rcs", limit=limit)
|
||||||
|
|
||||||
def get(self, id, bay_ident):
|
def get(self, id, bay_ident):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user