From c768d7abee56d9ee01f8d2824c8d93d54c980c24 Mon Sep 17 00:00:00 2001 From: Jay Lau Date: Tue, 30 Dec 2014 03:48:05 -0500 Subject: [PATCH] Change folder of api to v1 for magumclient It is better taht we can change the folder of api to v1 for magnumclient in case we have v2, v3 ... vx in future. Change-Id: If59c77e5d1c184c65f1e73ddd43fd89fcdcba18e --- magnumclient/shell.py | 4 ++-- magnumclient/{api => tests/v1}/__init__.py | 0 magnumclient/tests/{api => v1}/test_shell.py | 2 +- magnumclient/{tests/api => v1}/__init__.py | 0 magnumclient/{api => v1}/baymodels.py | 0 magnumclient/{api => v1}/bays.py | 0 magnumclient/{api => v1}/client.py | 12 ++++++------ magnumclient/{api => v1}/containers.py | 0 magnumclient/{api => v1}/nodes.py | 0 magnumclient/{api => v1}/pods.py | 0 magnumclient/{api => v1}/services.py | 0 magnumclient/{api => v1}/shell.py | 0 12 files changed, 9 insertions(+), 9 deletions(-) rename magnumclient/{api => tests/v1}/__init__.py (100%) rename magnumclient/tests/{api => v1}/test_shell.py (98%) rename magnumclient/{tests/api => v1}/__init__.py (100%) rename magnumclient/{api => v1}/baymodels.py (100%) rename magnumclient/{api => v1}/bays.py (100%) rename magnumclient/{api => v1}/client.py (95%) rename magnumclient/{api => v1}/containers.py (100%) rename magnumclient/{api => v1}/nodes.py (100%) rename magnumclient/{api => v1}/pods.py (100%) rename magnumclient/{api => v1}/services.py (100%) rename magnumclient/{api => v1}/shell.py (100%) diff --git a/magnumclient/shell.py b/magnumclient/shell.py index 9f4bdf95..69ba6f7d 100644 --- a/magnumclient/shell.py +++ b/magnumclient/shell.py @@ -48,11 +48,11 @@ try: except ImportError: pass -from magnumclient.api import client -from magnumclient.api import shell as shell_api from magnumclient.openstack.common.apiclient import auth from magnumclient.openstack.common.apiclient import exceptions as exc from magnumclient.openstack.common import cliutils +from magnumclient.v1 import client +from magnumclient.v1 import shell as shell_api from magnumclient import version DEFAULT_API_VERSION = 'api' diff --git a/magnumclient/api/__init__.py b/magnumclient/tests/v1/__init__.py similarity index 100% rename from magnumclient/api/__init__.py rename to magnumclient/tests/v1/__init__.py diff --git a/magnumclient/tests/api/test_shell.py b/magnumclient/tests/v1/test_shell.py similarity index 98% rename from magnumclient/tests/api/test_shell.py rename to magnumclient/tests/v1/test_shell.py index 98403df5..02674c7e 100644 --- a/magnumclient/tests/api/test_shell.py +++ b/magnumclient/tests/v1/test_shell.py @@ -16,8 +16,8 @@ import json import mock -from magnumclient.api import shell from magnumclient.tests import base +from magnumclient.v1 import shell container_fixture = { diff --git a/magnumclient/tests/api/__init__.py b/magnumclient/v1/__init__.py similarity index 100% rename from magnumclient/tests/api/__init__.py rename to magnumclient/v1/__init__.py diff --git a/magnumclient/api/baymodels.py b/magnumclient/v1/baymodels.py similarity index 100% rename from magnumclient/api/baymodels.py rename to magnumclient/v1/baymodels.py diff --git a/magnumclient/api/bays.py b/magnumclient/v1/bays.py similarity index 100% rename from magnumclient/api/bays.py rename to magnumclient/v1/bays.py diff --git a/magnumclient/api/client.py b/magnumclient/v1/client.py similarity index 95% rename from magnumclient/api/client.py rename to magnumclient/v1/client.py index 39c8c6dc..ec72ec3f 100644 --- a/magnumclient/api/client.py +++ b/magnumclient/v1/client.py @@ -16,13 +16,13 @@ from keystoneclient.v2_0 import client as keystone_client_v2 from keystoneclient.v3 import client as keystone_client_v3 -from magnumclient.api import baymodels -from magnumclient.api import bays -from magnumclient.api import containers -from magnumclient.api import nodes -from magnumclient.api import pods -from magnumclient.api import services from magnumclient.common import httpclient +from magnumclient.v1 import baymodels +from magnumclient.v1 import bays +from magnumclient.v1 import containers +from magnumclient.v1 import nodes +from magnumclient.v1 import pods +from magnumclient.v1 import services class Client(object): diff --git a/magnumclient/api/containers.py b/magnumclient/v1/containers.py similarity index 100% rename from magnumclient/api/containers.py rename to magnumclient/v1/containers.py diff --git a/magnumclient/api/nodes.py b/magnumclient/v1/nodes.py similarity index 100% rename from magnumclient/api/nodes.py rename to magnumclient/v1/nodes.py diff --git a/magnumclient/api/pods.py b/magnumclient/v1/pods.py similarity index 100% rename from magnumclient/api/pods.py rename to magnumclient/v1/pods.py diff --git a/magnumclient/api/services.py b/magnumclient/v1/services.py similarity index 100% rename from magnumclient/api/services.py rename to magnumclient/v1/services.py diff --git a/magnumclient/api/shell.py b/magnumclient/v1/shell.py similarity index 100% rename from magnumclient/api/shell.py rename to magnumclient/v1/shell.py