def test_0026_add_dhcp_pool(self): """Add DHCP pool in the gateway. Invokes the add_dhcp_pool of the gateway. """ gateway_obj = Gateway( TestGateway._client, self._name, Environment.get_test_gateway( Environment.get_sys_admin_client()).get('href')) gateway_obj.add_dhcp_pool(TestGateway._pool_ip_range) dhcp_resource = gateway_obj.get_dhcp() # Verify matchFound = False for ipPool in dhcp_resource.ipPools.ipPool: if ipPool.ipRange.text == TestGateway._pool_ip_range: matchFound = True break self.assertTrue(matchFound)
def test_0100_add_dhcp_pool(self): """Add DHCP pool in the gateway. Invokes the add_dhcp_pool of the gateway. """ gateway_obj = Gateway( TestGateway._client, self._name, Environment.get_test_gateway(Environment.get_sys_admin_client()) .get('href')) gateway_obj.add_dhcp_pool(TestGateway._pool_ip_range) dhcp_resource = gateway_obj.get_dhcp() # Verify matchFound = False for ipPool in dhcp_resource.ipPools.ipPool: if ipPool.ipRange.text == TestGateway._pool_ip_range: matchFound = True break self.assertTrue(matchFound)
def test_0000_setup(self): """Add DHCP pool in the gateway. Invokes the add_dhcp_pool of the gateway. """ TestDhcp._client = Environment.get_sys_admin_client() TestDhcp._config = Environment.get_config() gateway = Environment. \ get_test_gateway(TestDhcp._client) gateway_obj = Gateway(TestDhcp._client, TestDhcp._name, href=gateway.get('href')) gateway_obj.add_dhcp_pool(TestDhcp._pool_ip_range) dhcp_resource = gateway_obj.get_dhcp() # Verify matchFound = False for ipPool in dhcp_resource.ipPools.ipPool: if ipPool.ipRange.text == TestDhcp._pool_ip_range: matchFound = True break self.assertTrue(matchFound)