tempest/scenario/manager.py
def _get_router(self, tenant_id):
        """Retrieve a router for the given tenant id.

        If a public router has been configured, it will be returned.

        If a public router has not been configured, but a public
        network has, a tenant router will be created and returned that
        routes traffic to the public network.
        """
        router_id = self.config.network.public_router_id
        network_id = self.config.network.public_network_id
        if router_id:
            result = self.network_client.show_router(router_id)
            return net_common.AttributeDict(**result['router'])
        elif network_id:
            router = self._create_router(tenant_id)
            router.add_gateway(network_id)
            return router
        else:
            raise Exception("Neither of 'public_router_id' or "
                            "'public_network_id' has been defined.")
Retrieve a router for the given tenant id.

        If a public router has been configured, it will be returned.

        If a public router has not been configured, but a public
        network has, a tenant router will be created and returned that
        routes traffic to the public network.
        
Retrieve a router for the given tenant id.
If a public router has been configured, it will be returned.

If a public router has not been configured, but a public
network has, a tenant router will be created and returned that
routes traffic to the public network.
Retrieve a router for the given tenant id . If a public router has been configured it will be returned . If a public router has not been configured but a public network has a tenant router will be created and returned that routes traffic to the public network .
def _get_router(self, tenant_id):
        router_id = self.config.network.public_router_id
        network_id = self.config.network.public_network_id
        if router_id:
            result = self.network_client.show_router(router_id)
            return net_common.AttributeDict(**result['router'])
        elif network_id:
            router = self._create_router(tenant_id)
            router.add_gateway(network_id)
            return router
        else:
            raise Exception("Neither of 'public_router_id' or "
                            "'public_network_id' has been defined.")
def _get_router ( self , tenant_id ) : router_id = self . config . network . public_router_id network_id = self . config . network . public_network_id if router_id : result = self . network_client . show_router ( router_id ) return net_common . AttributeDict ( ** result [ 'router' ] ) elif network_id : router = self . _create_router ( tenant_id ) router . add_gateway ( network_id ) return router else : raise Exception ( "Neither of 'public_router_id' or " "'public_network_id' has been defined." )
Retrieve a router for the given tenant id.
Retrieve a router for the given tenant id .
"""Retrieve a router for the given tenant id.

        If a public router has been configured, it will be returned.

        If a public router has not been configured, but a public
        network has, a tenant router will be created and returned that
        routes traffic to the public network.
        """
self
tenant_id