From b6244de450f4fa377e3dfa7eb6e6cf6d362abd35 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Mon, 1 Apr 2019 15:06:49 +0200 Subject: [PATCH] Rename tobiko.openstack.heat modules. Change-Id: I9fd4c1b7012238652ed515458d2c025eb54f141c --- tobiko/openstack/heat/__init__.py | 18 +++++++++--------- .../openstack/heat/{client.py => _client.py} | 0 tobiko/openstack/heat/{stack.py => _stack.py} | 4 ++-- .../heat/{template.py => _template.py} | 3 ++- tobiko/tests/openstack/heat/test_stack.py | 4 ++-- 5 files changed, 15 insertions(+), 14 deletions(-) rename tobiko/openstack/heat/{client.py => _client.py} (100%) rename tobiko/openstack/heat/{stack.py => _stack.py} (98%) rename tobiko/openstack/heat/{template.py => _template.py} (99%) diff --git a/tobiko/openstack/heat/__init__.py b/tobiko/openstack/heat/__init__.py index 228584b28..cb0f922b9 100644 --- a/tobiko/openstack/heat/__init__.py +++ b/tobiko/openstack/heat/__init__.py @@ -13,16 +13,16 @@ # under the License. from __future__ import absolute_import -from tobiko.openstack.heat import client -from tobiko.openstack.heat import template -from tobiko.openstack.heat import stack +from tobiko.openstack.heat import _client +from tobiko.openstack.heat import _template +from tobiko.openstack.heat import _stack -get_heat_client = client.get_heat_client -HeatClientFixture = client.HeatClientFixture +get_heat_client = _client.get_heat_client +HeatClientFixture = _client.HeatClientFixture -HeatTemplate = template.HeatTemplate -get_heat_template = template.get_heat_template -heat_template_file = template.heat_template_file +HeatTemplate = _template.HeatTemplate +get_heat_template = _template.get_heat_template +heat_template_file = _template.heat_template_file -HeatStackFixture = stack.HeatStackFixture +HeatStackFixture = _stack.HeatStackFixture diff --git a/tobiko/openstack/heat/client.py b/tobiko/openstack/heat/_client.py similarity index 100% rename from tobiko/openstack/heat/client.py rename to tobiko/openstack/heat/_client.py diff --git a/tobiko/openstack/heat/stack.py b/tobiko/openstack/heat/_stack.py similarity index 98% rename from tobiko/openstack/heat/stack.py rename to tobiko/openstack/heat/_stack.py index 2899a6efd..d079ec7e1 100644 --- a/tobiko/openstack/heat/stack.py +++ b/tobiko/openstack/heat/_stack.py @@ -21,8 +21,8 @@ from oslo_log import log import tobiko from tobiko.common import exceptions -from tobiko.openstack.heat import client as _client -from tobiko.openstack.heat import template as _template +from tobiko.openstack.heat import _client +from tobiko.openstack.heat import _template LOG = log.getLogger(__name__) diff --git a/tobiko/openstack/heat/template.py b/tobiko/openstack/heat/_template.py similarity index 99% rename from tobiko/openstack/heat/template.py rename to tobiko/openstack/heat/_template.py index 2c7ee82c7..d48c9cb6e 100644 --- a/tobiko/openstack/heat/template.py +++ b/tobiko/openstack/heat/_template.py @@ -17,10 +17,11 @@ import collections import os import sys -import tobiko from heatclient.common import template_utils import yaml +import tobiko + TEMPLATE_SUFFIX = '.yaml' diff --git a/tobiko/tests/openstack/heat/test_stack.py b/tobiko/tests/openstack/heat/test_stack.py index e8d916f09..49f321133 100644 --- a/tobiko/tests/openstack/heat/test_stack.py +++ b/tobiko/tests/openstack/heat/test_stack.py @@ -141,7 +141,7 @@ class HeatStackFixtureTest(base.OpenstackTest): call_create=True, call_delete=False, call_sleep=False): client = mock.MagicMock(specs=heatclient.Client) get_heat_client = self.patch( - 'tobiko.openstack.heat.client.get_heat_client', + 'tobiko.openstack.heat._client.get_heat_client', return_value=client) if stack_states: client.stacks.get.side_effect = [ @@ -160,7 +160,7 @@ class HeatStackFixtureTest(base.OpenstackTest): default_template = heat.HeatTemplate.from_dict( {'default': 'template'}) get_heat_template = self.patch( - 'tobiko.openstack.heat.template.get_heat_template', + 'tobiko.openstack.heat._template.get_heat_template', return_value=default_template) stack.setUp()