def _calc_num_tenant_networks(cls): neutron_client = TempestClients.neutron_client_for_user() tenant_networks = neutron_client.list_networks( tenant_id=cls.os_primary.credentials.project_id)['networks'] return len(tenant_networks)
def _calc_num_tenant_networks(cls, username, project_name): neutron_client = TempestClients.neutron_client_for_user( username, cls.USER_DOMAIN_ID, project_name, cls.PROJECT_DOMAIN_ID) tenant_networks = neutron_client.list_networks( tenant_id=cls._get_demo_tenant_id())['networks'] return len(tenant_networks)