summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Nikishov <dnikishov@mirantis.com>2016-12-02 14:39:09 +0300
committerDmitry Nikishov <dnikishov@mirantis.com>2016-12-02 12:37:22 +0000
commit89839b88c37c38ac59a3ecb9453a1f3253c28583 (patch)
treefe91d3e483a1eaaba812331a2b5d7f40aa643a10
parent40315ce69d7f4836ff0f7406f81c41673ff5b909 (diff)
Enable image-based provisioning for 6.0 upgrades
This fix has been lost during the process of migration of cluster data manipulation functionality from the octane to this extension. Change-Id: Ife92cbd0e8d8f8376ffcb1f333d1fac9e911ff3e Closes-bug: 1573100
Notes
Notes (review): Code-Review+2: Ilya Kharin <akscram@gmail.com> Workflow+1: Ilya Kharin <akscram@gmail.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 05 Dec 2016 09:30:46 +0000 Reviewed-on: https://review.openstack.org/406079 Project: openstack/fuel-nailgun-extension-cluster-upgrade Branch: refs/heads/master
-rw-r--r--cluster_upgrade/tests/test_transformations.py15
-rw-r--r--cluster_upgrade/transformations/cluster.py6
-rw-r--r--setup.cfg2
3 files changed, 18 insertions, 5 deletions
diff --git a/cluster_upgrade/tests/test_transformations.py b/cluster_upgrade/tests/test_transformations.py
index f07abcb..ef0844f 100644
--- a/cluster_upgrade/tests/test_transformations.py
+++ b/cluster_upgrade/tests/test_transformations.py
@@ -238,11 +238,16 @@ class TestClusterTransformers(nailgun_test_base.BaseUnitTest):
238 238
239 def test_manager(self): 239 def test_manager(self):
240 man = cluster.Manager() # verify default config and entry points 240 man = cluster.Manager() # verify default config and entry points
241 self.assertEqual(man.transformers, [(version.StrictVersion('9.0'), [ 241 self.assertEqual(man.transformers, [
242 cluster.transform_dns_list, 242 (version.StrictVersion('6.1'), [
243 cluster.transform_ntp_list, 243 cluster.enable_ibp,
244 cluster.drop_generated_provision, 244 ]),
245 ])]) 245 (version.StrictVersion('9.0'), [
246 cluster.transform_dns_list,
247 cluster.transform_ntp_list,
248 cluster.drop_generated_provision,
249 ])
250 ])
246 251
247 252
248class TestVipTransformers(nailgun_test_base.BaseUnitTest): 253class TestVipTransformers(nailgun_test_base.BaseUnitTest):
diff --git a/cluster_upgrade/transformations/cluster.py b/cluster_upgrade/transformations/cluster.py
index 61368e0..0003ef3 100644
--- a/cluster_upgrade/transformations/cluster.py
+++ b/cluster_upgrade/transformations/cluster.py
@@ -45,8 +45,14 @@ def drop_generated_provision(data):
45 return data 45 return data
46 46
47 47
48def enable_ibp(data):
49 data['editable']['provision']['method']['value'] = 'image'
50 return data
51
52
48class Manager(transformations.Manager): 53class Manager(transformations.Manager):
49 default_config = { 54 default_config = {
50 '9.0': ['dns_list', 'ntp_list', 'drop_provision'], 55 '9.0': ['dns_list', 'ntp_list', 'drop_provision'],
56 '6.1': ['image_provision'],
51 } 57 }
52 name = 'cluster' 58 name = 'cluster'
diff --git a/setup.cfg b/setup.cfg
index 039d729..02b1691 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -26,6 +26,8 @@ nailgun.extensions =
26 cluster_upgrade = cluster_upgrade.extension:ClusterUpgradeExtension 26 cluster_upgrade = cluster_upgrade.extension:ClusterUpgradeExtension
27nailgun.cluster_upgrade.transformations.volumes.6.1 = 27nailgun.cluster_upgrade.transformations.volumes.6.1 =
28 node_volumes = cluster_upgrade.transformations.volumes:transform_node_volumes 28 node_volumes = cluster_upgrade.transformations.volumes:transform_node_volumes
29nailgun.cluster_upgrade.transformations.cluster.6.1 =
30 image_provision = cluster_upgrade.transformations.cluster:enable_ibp
29nailgun.cluster_upgrade.transformations.cluster.9.0 = 31nailgun.cluster_upgrade.transformations.cluster.9.0 =
30 dns_list = cluster_upgrade.transformations.cluster:transform_dns_list 32 dns_list = cluster_upgrade.transformations.cluster:transform_dns_list
31 ntp_list = cluster_upgrade.transformations.cluster:transform_ntp_list 33 ntp_list = cluster_upgrade.transformations.cluster:transform_ntp_list