Fix parameter_defaults for nova less deploy
We seem to be using incorrect parameters for HostnameFormat and Count when generating environment for nova less deploy. It's always {{role.name}}Count and {{role.name}}HostnameFormat (adapted from tripleo-ansible commit d958b45ebbc986e8381a540f69508e8f91f13081) Change-Id: Ied6dbd349924db58f6323b878b8ee2e070d8719f
This commit is contained in:
parent
e22d7d52f9
commit
b3ec4209ad
|
@ -422,7 +422,7 @@ class ExpandRolesAction(base.TripleOAction):
|
||||||
|
|
||||||
# NOTE(dtantsur): our hostname format may differ from THT defaults,
|
# NOTE(dtantsur): our hostname format may differ from THT defaults,
|
||||||
# so override it in the resulting environment
|
# so override it in the resulting environment
|
||||||
parameter_defaults['%sDeployedServerHostnameFormat' % name] = (
|
parameter_defaults['%sHostnameFormat' % name] = (
|
||||||
hostname_format)
|
hostname_format)
|
||||||
|
|
||||||
# ensure each instance has a unique non-empty hostname
|
# ensure each instance has a unique non-empty hostname
|
||||||
|
@ -468,7 +468,7 @@ class ExpandRolesAction(base.TripleOAction):
|
||||||
if provisioned == self.provisioned:
|
if provisioned == self.provisioned:
|
||||||
instances.append(inst)
|
instances.append(inst)
|
||||||
|
|
||||||
parameter_defaults['%sDeployedServerCount' % name] = (
|
parameter_defaults['%sCount' % name] = (
|
||||||
provisioned_count)
|
provisioned_count)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -664,12 +664,12 @@ class TestExpandRoles(base.TestCase):
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
{
|
{
|
||||||
'ComputeDeployedServerHostnameFormat':
|
'ComputeHostnameFormat':
|
||||||
'%stackname%-novacompute-%index%',
|
'%stackname%-novacompute-%index%',
|
||||||
'ComputeDeployedServerCount': 1,
|
'ComputeCount': 1,
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'ControllerDeployedServerCount': 1,
|
'ControllerCount': 1,
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'overcloud-novacompute-0': 'overcloud-novacompute-0',
|
'overcloud-novacompute-0': 'overcloud-novacompute-0',
|
||||||
'overcloud-controller-0': 'overcloud-controller-0'
|
'overcloud-controller-0': 'overcloud-controller-0'
|
||||||
|
@ -743,12 +743,12 @@ class TestExpandRoles(base.TestCase):
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
{
|
{
|
||||||
'ComputeDeployedServerHostnameFormat':
|
'ComputeHostnameFormat':
|
||||||
'compute-%index%.example.com',
|
'compute-%index%.example.com',
|
||||||
'ComputeDeployedServerCount': 2,
|
'ComputeCount': 2,
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'controller-%index%.example.com',
|
'controller-%index%.example.com',
|
||||||
'ControllerDeployedServerCount': 3,
|
'ControllerCount': 3,
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'compute-0.example.com': 'compute-0.example.com',
|
'compute-0.example.com': 'compute-0.example.com',
|
||||||
'compute-1.example.com': 'compute-1.example.com',
|
'compute-1.example.com': 'compute-1.example.com',
|
||||||
|
@ -802,12 +802,12 @@ class TestExpandRoles(base.TestCase):
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
{
|
{
|
||||||
'ComputeDeployedServerHostnameFormat':
|
'ComputeHostnameFormat':
|
||||||
'compute-%index%.example.com',
|
'compute-%index%.example.com',
|
||||||
'ComputeDeployedServerCount': 2,
|
'ComputeCount': 2,
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'ControllerDeployedServerCount': 2,
|
'ControllerCount': 2,
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'compute-0.example.com': 'compute-0.example.com',
|
'compute-0.example.com': 'compute-0.example.com',
|
||||||
'compute-1.example.com': 'compute-1.example.com',
|
'compute-1.example.com': 'compute-1.example.com',
|
||||||
|
@ -869,11 +869,11 @@ class TestExpandRoles(base.TestCase):
|
||||||
}],
|
}],
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual({
|
self.assertEqual({
|
||||||
'ComputeDeployedServerCount': 2,
|
'ComputeCount': 2,
|
||||||
'ComputeDeployedServerHostnameFormat':
|
'ComputeHostnameFormat':
|
||||||
'compute-%index%.example.com',
|
'compute-%index%.example.com',
|
||||||
'ControllerDeployedServerCount': 3,
|
'ControllerCount': 3,
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'compute-0.example.com': 'compute-0.example.com',
|
'compute-0.example.com': 'compute-0.example.com',
|
||||||
|
@ -913,11 +913,11 @@ class TestExpandRoles(base.TestCase):
|
||||||
}],
|
}],
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual({
|
self.assertEqual({
|
||||||
'ControllerDeployedServerCount': 2,
|
'ControllerCount': 2,
|
||||||
'ControllerRemovalPolicies': [
|
'ControllerRemovalPolicies': [
|
||||||
{'resource_list': [1, 2]}
|
{'resource_list': [1, 2]}
|
||||||
],
|
],
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'overcloud-controller-0': 'overcloud-controller-0',
|
'overcloud-controller-0': 'overcloud-controller-0',
|
||||||
|
@ -980,11 +980,11 @@ class TestExpandRoles(base.TestCase):
|
||||||
}],
|
}],
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual({
|
self.assertEqual({
|
||||||
'ControllerDeployedServerCount': 4,
|
'ControllerCount': 4,
|
||||||
'ControllerRemovalPolicies': [
|
'ControllerRemovalPolicies': [
|
||||||
{'resource_list': [1, 2]}
|
{'resource_list': [1, 2]}
|
||||||
],
|
],
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'overcloud-controller-0': 'overcloud-controller-0',
|
'overcloud-controller-0': 'overcloud-controller-0',
|
||||||
|
@ -1052,11 +1052,11 @@ class TestExpandRoles(base.TestCase):
|
||||||
}],
|
}],
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual({
|
self.assertEqual({
|
||||||
'ControllerDeployedServerCount': 2,
|
'ControllerCount': 2,
|
||||||
'ControllerRemovalPolicies': [
|
'ControllerRemovalPolicies': [
|
||||||
{'resource_list': [1, 2]}
|
{'resource_list': [1, 2]}
|
||||||
],
|
],
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'overcloud-controller-0': 'controller-0',
|
'overcloud-controller-0': 'controller-0',
|
||||||
|
@ -1120,11 +1120,11 @@ class TestExpandRoles(base.TestCase):
|
||||||
}],
|
}],
|
||||||
result['instances'])
|
result['instances'])
|
||||||
self.assertEqual({
|
self.assertEqual({
|
||||||
'ControllerDeployedServerCount': 2,
|
'ControllerCount': 2,
|
||||||
'ControllerRemovalPolicies': [
|
'ControllerRemovalPolicies': [
|
||||||
{'resource_list': [1, 2]}
|
{'resource_list': [1, 2]}
|
||||||
],
|
],
|
||||||
'ControllerDeployedServerHostnameFormat':
|
'ControllerHostnameFormat':
|
||||||
'%stackname%-controller-%index%',
|
'%stackname%-controller-%index%',
|
||||||
'HostnameMap': {
|
'HostnameMap': {
|
||||||
'overcloud-controller-0': 'node-0',
|
'overcloud-controller-0': 'node-0',
|
||||||
|
|
Loading…
Reference in New Issue