New api: list logical routers by type
Change-Id: If2642bd480743774e32cc663dd5e1db4f955f727
This commit is contained in:
@@ -484,6 +484,22 @@ class LogicalRouterTestCase(nsxlib_testcase.NsxClientTestCase):
|
||||
'delete', router,
|
||||
'https://1.2.3.4/api/v1/logical-routers/%s?force=True' % uuid)
|
||||
|
||||
def test_list_logical_router(self):
|
||||
router = self._mocked_lrouter()
|
||||
router.list()
|
||||
test_client.assert_json_call(
|
||||
'get', router,
|
||||
'https://1.2.3.4/api/v1/logical-routers')
|
||||
|
||||
def test_list_logical_router_by_type(self):
|
||||
router = self._mocked_lrouter()
|
||||
router_type = 'TIER0'
|
||||
router.list(router_type=router_type)
|
||||
test_client.assert_json_call(
|
||||
'get', router,
|
||||
'https://1.2.3.4/api/v1/logical-routers?router_type=%s' %
|
||||
router_type)
|
||||
|
||||
def test_get_logical_router_fw_section(self):
|
||||
fake_router = test_constants.FAKE_ROUTER.copy()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user