diff --git a/openstackclient/network/client.py b/openstackclient/network/client.py index 3c87e135e1..db0b5279d8 100644 --- a/openstackclient/network/client.py +++ b/openstackclient/network/client.py @@ -18,11 +18,11 @@ from openstackclient.common import utils LOG = logging.getLogger(__name__) -DEFAULT_NETWORK_API_VERSION = '2.0' +DEFAULT_NETWORK_API_VERSION = '2' API_VERSION_OPTION = 'os_network_api_version' API_NAME = "network" API_VERSIONS = { - "2.0": "neutronclient.v2_0.client.Client", + "2": "neutronclient.v2_0.client.Client", } diff --git a/openstackclient/network/v2_0/__init__.py b/openstackclient/network/v2/__init__.py similarity index 100% rename from openstackclient/network/v2_0/__init__.py rename to openstackclient/network/v2/__init__.py diff --git a/openstackclient/network/v2_0/network.py b/openstackclient/network/v2/network.py similarity index 100% rename from openstackclient/network/v2_0/network.py rename to openstackclient/network/v2/network.py diff --git a/openstackclient/tests/network/v2_0/__init__.py b/openstackclient/tests/network/v2/__init__.py similarity index 100% rename from openstackclient/tests/network/v2_0/__init__.py rename to openstackclient/tests/network/v2/__init__.py diff --git a/openstackclient/tests/network/v2_0/test_network.py b/openstackclient/tests/network/v2/test_network.py similarity index 99% rename from openstackclient/tests/network/v2_0/test_network.py rename to openstackclient/tests/network/v2/test_network.py index ef7d24ee45..b0c6af7002 100644 --- a/openstackclient/tests/network/v2_0/test_network.py +++ b/openstackclient/tests/network/v2/test_network.py @@ -15,7 +15,7 @@ import copy import mock from openstackclient.common import exceptions -from openstackclient.network.v2_0 import network +from openstackclient.network.v2 import network from openstackclient.tests.network import common RESOURCE = 'network' diff --git a/openstackclient/tests/test_shell.py b/openstackclient/tests/test_shell.py index dfb8021a51..c180289e7d 100644 --- a/openstackclient/tests/test_shell.py +++ b/openstackclient/tests/test_shell.py @@ -39,13 +39,13 @@ DEFAULT_COMPUTE_API_VERSION = "2" DEFAULT_IDENTITY_API_VERSION = "2.0" DEFAULT_IMAGE_API_VERSION = "v2" DEFAULT_VOLUME_API_VERSION = "1" -DEFAULT_NETWORK_API_VERSION = "2.0" +DEFAULT_NETWORK_API_VERSION = "2" LIB_COMPUTE_API_VERSION = "2" LIB_IDENTITY_API_VERSION = "2.0" LIB_IMAGE_API_VERSION = "1" LIB_VOLUME_API_VERSION = "1" -LIB_NETWORK_API_VERSION = "2.0" +LIB_NETWORK_API_VERSION = "2" def make_shell(): diff --git a/setup.cfg b/setup.cfg index da07d3edc5..7023d4e585 100644 --- a/setup.cfg +++ b/setup.cfg @@ -258,12 +258,12 @@ openstack.image.v2 = image_save = openstackclient.image.v2.image:SaveImage image_show = openstackclient.image.v2.image:ShowImage -openstack.network.v2_0 = - network_create = openstackclient.network.v2_0.network:CreateNetwork - network_delete = openstackclient.network.v2_0.network:DeleteNetwork - network_list = openstackclient.network.v2_0.network:ListNetwork - network_set = openstackclient.network.v2_0.network:SetNetwork - network_show = openstackclient.network.v2_0.network:ShowNetwork +openstack.network.v2 = + network_create = openstackclient.network.v2.network:CreateNetwork + network_delete = openstackclient.network.v2.network:DeleteNetwork + network_list = openstackclient.network.v2.network:ListNetwork + network_set = openstackclient.network.v2.network:SetNetwork + network_show = openstackclient.network.v2.network:ShowNetwork openstack.object_store.v1 = container_list = openstackclient.object.v1.container:ListContainer