Replace neutronclient with openstacksdk

Change-Id: I4c9dd506ada20744367afbe0cbb93482d66ee8ec
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume
2024-10-10 11:38:16 +00:00
parent 06da36e565
commit ee73d6beec
2 changed files with 1 additions and 4 deletions

View File

@@ -19,7 +19,6 @@ from keystoneauth1 import identity
from keystoneauth1 import session as ksession from keystoneauth1 import session as ksession
from keystoneclient import client as keystoneclient from keystoneclient import client as keystoneclient
from keystoneclient import discover as keystone_discover from keystoneclient import discover as keystone_discover
from neutronclient.v2_0 import client as neutronclient
import openstack.config import openstack.config
import openstack.config.exceptions import openstack.config.exceptions
import openstack.connection import openstack.connection
@@ -234,8 +233,7 @@ class ClientTestBase(testtools.TestCase):
if "network" not in CACHE: if "network" not in CACHE:
# Get the networks from neutron. # Get the networks from neutron.
neutron = neutronclient.Client(session=session) neutron_networks = self.openstack.network.networks()
neutron_networks = neutron.list_networks()['networks']
# Convert the neutron dicts to Network objects. # Convert the neutron dicts to Network objects.
nets = [] nets = []
for network in neutron_networks: for network in neutron_networks:

View File

@@ -4,7 +4,6 @@ coverage>=4.4.1 # Apache-2.0
ddt>=1.0.1 # MIT ddt>=1.0.1 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
python-keystoneclient>=3.8.0 # Apache-2.0 python-keystoneclient>=3.8.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0 requests-mock>=1.2.0 # Apache-2.0
openstacksdk>=0.11.2 # Apache-2.0 openstacksdk>=0.11.2 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0