From 35a866ca83c901dd85a2dd62455dd2d36e97af2d Mon Sep 17 00:00:00 2001 From: ricolin Date: Thu, 30 Jul 2015 16:40:53 +0800 Subject: [PATCH] collect common constraints Create directory for common constraints and collect constraints. Change-Id: Ie0800baa5415a71b67ede22313b0d57b198e8dc4 --- heat/engine/constraint/__init__.py | 0 heat/engine/{iso_8601.py => constraint/common_constraints.py} | 0 heat/tests/constraints/__init__.py | 0 .../test_common_constraints.py} | 4 ++-- setup.cfg | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 heat/engine/constraint/__init__.py rename heat/engine/{iso_8601.py => constraint/common_constraints.py} (100%) create mode 100644 heat/tests/constraints/__init__.py rename heat/tests/{test_iso_8601.py => constraints/test_common_constraints.py} (93%) diff --git a/heat/engine/constraint/__init__.py b/heat/engine/constraint/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/heat/engine/iso_8601.py b/heat/engine/constraint/common_constraints.py similarity index 100% rename from heat/engine/iso_8601.py rename to heat/engine/constraint/common_constraints.py diff --git a/heat/tests/constraints/__init__.py b/heat/tests/constraints/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/heat/tests/test_iso_8601.py b/heat/tests/constraints/test_common_constraints.py similarity index 93% rename from heat/tests/test_iso_8601.py rename to heat/tests/constraints/test_common_constraints.py index 7a5bec341..5b61be24f 100644 --- a/heat/tests/test_iso_8601.py +++ b/heat/tests/constraints/test_common_constraints.py @@ -11,7 +11,7 @@ # License for the specific language governing permissions and limitations # under the License. -from heat.engine import iso_8601 +from heat.engine.constraint import common_constraints as cc from heat.tests import common @@ -19,7 +19,7 @@ class TestISO8601Constraint(common.HeatTestCase): def setUp(self): super(TestISO8601Constraint, self).setUp() - self.constraint = iso_8601.ISO8601Constraint() + self.constraint = cc.ISO8601Constraint() def test_validate_date_format(self): date = '2050-01-01' diff --git a/setup.cfg b/setup.cfg index 47de27b12..3bd105836 100644 --- a/setup.cfg +++ b/setup.cfg @@ -72,7 +72,7 @@ heat.constraints = neutron.router = heat.engine.clients.os.neutron:RouterConstraint neutron.subnet = heat.engine.clients.os.neutron:SubnetConstraint glance.image = heat.engine.clients.os.glance:ImageConstraint - iso_8601 = heat.engine.iso_8601:ISO8601Constraint + iso_8601 = heat.engine.constraint.common_constraints:ISO8601Constraint nova.server = heat.engine.clients.os.nova:ServerConstraint nova.keypair = heat.engine.clients.os.nova:KeypairConstraint cinder.volume = heat.engine.clients.os.cinder:VolumeConstraint