diff --git a/climate/api/oshosts/__init__.py b/climate/api/v1/__init__.py similarity index 100% rename from climate/api/oshosts/__init__.py rename to climate/api/v1/__init__.py diff --git a/climate/api/app.py b/climate/api/v1/app.py similarity index 96% rename from climate/api/app.py rename to climate/api/v1/app.py index 06757df0..f61dd0c1 100644 --- a/climate/api/app.py +++ b/climate/api/v1/app.py @@ -19,9 +19,9 @@ from keystoneclient.middleware import auth_token from oslo.config import cfg from werkzeug import exceptions as werkzeug_exceptions -from climate.api.oshosts import v1_0 as host_api_v1_0 -from climate.api import utils as api_utils -from climate.api import v1_0 as api_v1_0 +from climate.api.v1.oshosts import v1_0 as host_api_v1_0 +from climate.api.v1 import utils as api_utils +from climate.api.v1 import v1_0 as api_v1_0 from climate.openstack.common.gettextutils import _ from climate.openstack.common import log from climate.openstack.common.middleware import debug diff --git a/climate/tests/api/oshosts/__init__.py b/climate/api/v1/oshosts/__init__.py similarity index 100% rename from climate/tests/api/oshosts/__init__.py rename to climate/api/v1/oshosts/__init__.py diff --git a/climate/api/oshosts/service.py b/climate/api/v1/oshosts/service.py similarity index 100% rename from climate/api/oshosts/service.py rename to climate/api/v1/oshosts/service.py diff --git a/climate/api/oshosts/v1_0.py b/climate/api/v1/oshosts/v1_0.py similarity index 93% rename from climate/api/oshosts/v1_0.py rename to climate/api/v1/oshosts/v1_0.py index 83e43909..430cc23d 100644 --- a/climate/api/oshosts/v1_0.py +++ b/climate/api/v1/oshosts/v1_0.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api.oshosts import service -from climate.api import utils as api_utils -from climate.api import validation +from climate.api.v1.oshosts import service +from climate.api.v1 import utils as api_utils +from climate.api.v1 import validation from climate import utils diff --git a/climate/api/service.py b/climate/api/v1/service.py similarity index 100% rename from climate/api/service.py rename to climate/api/v1/service.py diff --git a/climate/api/utils.py b/climate/api/v1/utils.py similarity index 100% rename from climate/api/utils.py rename to climate/api/v1/utils.py diff --git a/climate/api/v1_0.py b/climate/api/v1/v1_0.py similarity index 94% rename from climate/api/v1_0.py rename to climate/api/v1/v1_0.py index f4e45280..a84deb96 100644 --- a/climate/api/v1_0.py +++ b/climate/api/v1/v1_0.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api import service -from climate.api import utils as api_utils -from climate.api import validation +from climate.api.v1 import service +from climate.api.v1 import utils as api_utils +from climate.api.v1 import validation from climate.openstack.common import log as logging from climate import utils diff --git a/climate/api/validation.py b/climate/api/v1/validation.py similarity index 97% rename from climate/api/validation.py rename to climate/api/v1/validation.py index f84bd3e7..657602f6 100644 --- a/climate/api/validation.py +++ b/climate/api/v1/validation.py @@ -17,7 +17,7 @@ import functools import six -from climate.api import utils as api_utils +from climate.api.v1 import utils as api_utils from climate import exceptions diff --git a/climate/cmd/api.py b/climate/cmd/api.py index 9fd8dd86..6c02ea26 100644 --- a/climate/cmd/api.py +++ b/climate/cmd/api.py @@ -22,7 +22,7 @@ from oslo.config import cfg gettext.install('climate', unicode=1) -from climate.api import app as api_app +from climate.api.v1 import app as v1_app from climate.openstack.common import log as logging from climate.utils import service as service_utils @@ -45,7 +45,7 @@ def main(): cfg.CONF(sys.argv[1:], project='climate', prog='climate-api') service_utils.prepare_service(sys.argv) logging.setup("climate") - app = api_app.make_app() + app = v1_app.make_app() wsgi.server(eventlet.listen((CONF.host, CONF.port), backlog=500), app) diff --git a/climate/tests/api/v1/__init__.py b/climate/tests/api/v1/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/climate/tests/api/v1/oshosts/__init__.py b/climate/tests/api/v1/oshosts/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/climate/tests/api/oshosts/test_service.py b/climate/tests/api/v1/oshosts/test_service.py similarity index 96% rename from climate/tests/api/oshosts/test_service.py rename to climate/tests/api/v1/oshosts/test_service.py index 2b0647df..2ad16a7b 100644 --- a/climate/tests/api/oshosts/test_service.py +++ b/climate/tests/api/v1/oshosts/test_service.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api.oshosts import service as service_api +from climate.api.v1.oshosts import service as service_api from climate import tests diff --git a/climate/tests/api/oshosts/test_v1_0.py b/climate/tests/api/v1/oshosts/test_v1_0.py similarity index 93% rename from climate/tests/api/oshosts/test_v1_0.py rename to climate/tests/api/v1/oshosts/test_v1_0.py index 10b8388e..32b3655d 100644 --- a/climate/tests/api/oshosts/test_v1_0.py +++ b/climate/tests/api/v1/oshosts/test_v1_0.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api.oshosts import service as service_api -from climate.api.oshosts import v1_0 as api -from climate.api import utils as utils_api +from climate.api.v1.oshosts import service as service_api +from climate.api.v1.oshosts import v1_0 as api +from climate.api.v1 import utils as utils_api from climate import tests diff --git a/climate/tests/api/test_app.py b/climate/tests/api/v1/test_app.py similarity index 95% rename from climate/tests/api/test_app.py rename to climate/tests/api/v1/test_app.py index 64d8199c..d7242e4e 100644 --- a/climate/tests/api/test_app.py +++ b/climate/tests/api/v1/test_app.py @@ -18,9 +18,9 @@ from keystoneclient.middleware import auth_token from oslo.config import cfg from werkzeug import exceptions as werkzeug_exceptions -from climate.api import app -from climate.api.oshosts import v1_0 as host_api_v1_0 -from climate.api import utils as api_utils +from climate.api.v1 import app +from climate.api.v1.oshosts import v1_0 as host_api_v1_0 +from climate.api.v1 import utils as api_utils from climate import tests diff --git a/climate/tests/api/test_context.py b/climate/tests/api/v1/test_context.py similarity index 100% rename from climate/tests/api/test_context.py rename to climate/tests/api/v1/test_context.py diff --git a/climate/tests/api/test_service.py b/climate/tests/api/v1/test_service.py similarity index 96% rename from climate/tests/api/test_service.py rename to climate/tests/api/v1/test_service.py index 391a9342..9e4c1840 100644 --- a/climate/tests/api/test_service.py +++ b/climate/tests/api/v1/test_service.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api import service as service_api +from climate.api.v1 import service as service_api from climate import tests diff --git a/climate/tests/api/test_utils.py b/climate/tests/api/v1/test_utils.py similarity index 99% rename from climate/tests/api/test_utils.py rename to climate/tests/api/v1/test_utils.py index 04399016..6c8d6cbc 100644 --- a/climate/tests/api/test_utils.py +++ b/climate/tests/api/v1/test_utils.py @@ -15,7 +15,7 @@ import flask -from climate.api import utils +from climate.api.v1 import utils from climate import tests diff --git a/climate/tests/api/test_v1_0.py b/climate/tests/api/v1/test_v1_0.py similarity index 93% rename from climate/tests/api/test_v1_0.py rename to climate/tests/api/v1/test_v1_0.py index 2b3a2c65..46853c1c 100644 --- a/climate/tests/api/test_v1_0.py +++ b/climate/tests/api/v1/test_v1_0.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api import service as service_api -from climate.api import utils as utils_api -from climate.api import v1_0 as api +from climate.api.v1 import service as service_api +from climate.api.v1 import utils as utils_api +from climate.api.v1 import v1_0 as api from climate import tests diff --git a/climate/tests/api/test_validation.py b/climate/tests/api/v1/test_validation.py similarity index 91% rename from climate/tests/api/test_validation.py rename to climate/tests/api/v1/test_validation.py index c0313aa8..de968ffe 100644 --- a/climate/tests/api/test_validation.py +++ b/climate/tests/api/v1/test_validation.py @@ -13,9 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from climate.api import service as service_api -from climate.api import utils as api_utils -from climate.api import validation as validation_api +from climate.api.v1 import service as service_api +from climate.api.v1 import utils as api_utils +from climate.api.v1 import validation as validation_api from climate import exceptions from climate import tests diff --git a/etc/climate/climate.conf.sample b/etc/climate/climate.conf.sample index 6da7cde9..7e8b74c0 100644 --- a/etc/climate/climate.conf.sample +++ b/etc/climate/climate.conf.sample @@ -231,7 +231,7 @@ # -# Options defined in climate.api.app +# Options defined in climate.api.v1.app # # Log request/response exchange details: environ, headers and