Do not validate property network of sahara cluster
enable to use network which is resource creating in template Change-Id: I2f2014cd1c05bce5f248fe618eecbc4476914662 Closes-Bug: #1726334
This commit is contained in:
parent
ec40f1301d
commit
dcbaffe909
heat
@ -126,6 +126,7 @@ class SaharaCluster(resource.Resource):
|
||||
MANAGEMENT_NETWORK: properties.Schema(
|
||||
properties.Schema.STRING,
|
||||
_('Name or UUID of network.'),
|
||||
required=True,
|
||||
constraints=[
|
||||
constraints.CustomConstraint('neutron.network')
|
||||
],
|
||||
@ -282,13 +283,6 @@ class SaharaCluster(resource.Resource):
|
||||
if res:
|
||||
return res
|
||||
|
||||
# check if running on neutron and MANAGEMENT_NETWORK missing
|
||||
if (self.is_using_neutron() and
|
||||
not self.properties[self.MANAGEMENT_NETWORK]):
|
||||
msg = _("%s must be provided"
|
||||
) % self.MANAGEMENT_NETWORK
|
||||
raise exception.StackValidationFailed(message=msg)
|
||||
|
||||
self.client_plugin().validate_hadoop_version(
|
||||
self.properties[self.PLUGIN_NAME],
|
||||
self.properties[self.HADOOP_VERSION]
|
||||
|
@ -176,11 +176,11 @@ class SaharaClusterTest(common.HeatTestCase):
|
||||
self.t['resources']['super-cluster']['properties'].pop(
|
||||
'neutron_management_network')
|
||||
cluster = self._init_cluster(self.t)
|
||||
self.patchobject(cluster, 'is_using_neutron', return_value=True)
|
||||
ex = self.assertRaises(exception.StackValidationFailed,
|
||||
cluster.validate)
|
||||
self.assertEqual("neutron_management_network must be provided",
|
||||
six.text_type(ex))
|
||||
error_msg = ('Property error: resources.super-cluster.properties: '
|
||||
'Property neutron_management_network not assigned')
|
||||
self.assertEqual(error_msg, six.text_type(ex))
|
||||
|
||||
def test_deprecated_properties_correctly_translates(self):
|
||||
tmpl = '''
|
||||
|
Loading…
x
Reference in New Issue
Block a user