Merge "Remove 'nodes' from deployment 9.0 serializer output"
This commit is contained in:
commit
c8a3c24ebe
|
@ -156,7 +156,7 @@
|
|||
parameters:
|
||||
path: /etc/hiera/nodes.yaml
|
||||
data:
|
||||
yaql_exp: '$.nodes.toYaml()'
|
||||
yaql_exp: '$.network_metadata.nodes.values().toYaml()'
|
||||
|
||||
- id: update_hosts
|
||||
version: 2.0.0
|
||||
|
|
|
@ -551,6 +551,10 @@ class DeploymentHASerializer90(DeploymentHASerializer80):
|
|||
node_attrs['nova_hugepages_enabled'] = (
|
||||
objects.NodeAttributes.is_nova_hugepages_enabled(node))
|
||||
|
||||
# we don't need nodes in serialized data for 9.0 environments
|
||||
# https://bugs.launchpad.net/fuel/+bug/1531128
|
||||
attrs.pop('nodes')
|
||||
|
||||
return attrs
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -18,6 +18,7 @@ import mock
|
|||
import six
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
import unittest2
|
||||
|
||||
from nailgun import consts
|
||||
from nailgun import objects
|
||||
|
@ -633,6 +634,13 @@ class TestDeploymentHASerializer90(
|
|||
for item in serialized:
|
||||
self.assertIn(item, cust_serialized)
|
||||
|
||||
def test_remove_nodes_from_common_attrs(self):
|
||||
cluster_db = self.env.clusters[0]
|
||||
serializer = self.create_serializer(cluster_db)
|
||||
|
||||
common_attrs = serializer.get_common_attrs(cluster_db)
|
||||
self.assertNotIn('nodes', common_attrs)
|
||||
|
||||
|
||||
class TestDeploymentTasksSerialization90(
|
||||
TestSerializer90Mixin,
|
||||
|
@ -701,6 +709,14 @@ class TestNetworkTemplateSerializer90CompatibleWith80(
|
|||
self.assertEqual(node_attrs['swift_zone'], node.uid)
|
||||
self.assertEqual(node_attrs['nova_cpu_pinning_enabled'], False)
|
||||
|
||||
@unittest2.skip(
|
||||
"'nodes' key was removed from 9.0 version serializer output, "
|
||||
"thus test bound to this data (that exists in parent test case class) "
|
||||
"must be skipped"
|
||||
)
|
||||
def test_network_not_mapped_to_nics_w_template(self):
|
||||
pass
|
||||
|
||||
|
||||
class TestNetworkTemplateSerializer90(
|
||||
TestSerializer90Mixin,
|
||||
|
|
|
@ -1199,7 +1199,7 @@ class TestTaskManagers(BaseIntegrationTest):
|
|||
{
|
||||
"id": "test", "roles": ['master'], "version": "2.0.1",
|
||||
"type": "puppet", "parameters": {},
|
||||
"condition": {"yaql_exp": "changed($.nodes)"}
|
||||
"condition": {"yaql_exp": "changed($.network_metadata.nodes)"}
|
||||
}
|
||||
]
|
||||
self.env.create(
|
||||
|
|
Loading…
Reference in New Issue