def list_dhcp_agent_hosting_network(self, network_id): uri = '%s/networks/%s/dhcp-agents' % (self.uri_prefix, network_id) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) agents = common.parse_array(etree.fromstring(body)) body = {'agents': agents} return resp, body
def list_l3_agents_hosting_router(self, router_id): uri = '%s/routers/%s/l3-agents' % (self.uri_prefix, router_id) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) agents = common.parse_array(etree.fromstring(body)) body = {'agents': agents} return resp, body
def list_networks_hosted_by_one_dhcp_agent(self, agent_id): uri = '%s/agents/%s/dhcp-networks' % (self.uri_prefix, agent_id) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) networks = common.parse_array(etree.fromstring(body)) body = {'networks': networks} return resp, body
def list_routers_on_l3_agent(self, agent_id): uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) routers = common.parse_array(etree.fromstring(body)) body = {'routers': routers} return resp, body
def list_router_interfaces(self, uuid): uri = '%s/ports?device_id=%s' % (self.uri_prefix, uuid) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) ports = common.parse_array(etree.fromstring(body), self.PLURALS) ports = {"ports": ports} return resp, ports
def list_pools_hosted_by_one_lbaas_agent(self, agent_id): uri = '%s/agents/%s/loadbalancer-pools' % (self.uri_prefix, agent_id) resp, body = self.get(uri) self.rest_client.expected_success(200, resp.status) pools = common.parse_array(etree.fromstring(body)) body = {'pools': pools} return resp, body
def list_l3_agents_hosting_router(self, router_id): uri = '%s/routers/%s/l3-agents' % (self.uri_prefix, router_id) resp, body = self.get(uri) agents = common.parse_array(etree.fromstring(body)) body = {'agents': agents} return resp, body
def deserialize_list(self, body): return common.parse_array(etree.fromstring(body), self.PLURALS)
def list_networks_hosted_by_one_dhcp_agent(self, agent_id): uri = '%s/agents/%s/dhcp-networks' % (self.uri_prefix, agent_id) resp, body = self.get(uri) networks = common.parse_array(etree.fromstring(body)) body = {'networks': networks} return resp, body
def list_routers_on_l3_agent(self, agent_id): uri = '%s/agents/%s/l3-routers' % (self.uri_prefix, agent_id) resp, body = self.get(uri) routers = common.parse_array(etree.fromstring(body)) body = {'routers': routers} return resp, body
def list_router_interfaces(self, uuid): uri = '%s/ports?device_id=%s' % (self.uri_prefix, uuid) resp, body = self.get(uri) ports = common.parse_array(etree.fromstring(body), self.PLURALS) ports = {"ports": ports} return resp, ports
def list_dhcp_agent_hosting_network(self, network_id): uri = '%s/networks/%s/dhcp-agents' % (self.uri_prefix, network_id) resp, body = self.get(uri) agents = common.parse_array(etree.fromstring(body)) body = {'agents': agents} return resp, body