From 4e2ba687a43559be9db9e78f2e171883bc6ff152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Thu, 18 Nov 2021 19:47:40 +0100 Subject: [PATCH] node extract provisioned - use network_config_update In change If53577a26edcb2dc67458603286471dfb87f0bda network_deployment_actions was replaced with network_config_update in the baremetal YAML definition. Update the overcloud node extract provisioned command to set network_config_update instead of the removed network_deployment_actions parameter. Related-Bug: #1951458 Change-Id: I3d52e17400d4c7b7a7ac8878eb289e8a84df5459 (cherry picked from commit 9ad9323b0adc50c15ce274b5921f527e38757c47) --- .../tests/v1/overcloud_node/test_overcloud_node.py | 4 ++-- tripleoclient/v1/overcloud_node.py | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py b/tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py index d336e7599..68e9e34cf 100644 --- a/tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py +++ b/tripleoclient/tests/v1/overcloud_node/test_overcloud_node.py @@ -908,7 +908,7 @@ class TestExtractProvisionedNode(test_utils.TestCommand): 'count': 1, 'hostname_format': '%stackname%-novacompute-%index%', 'defaults': { - 'network_config': {'network_deployment_actions': ['CREATE'], + 'network_config': {'network_config_update': False, 'physical_bridge_name': 'br-ex', 'public_interface_name': 'nic1', 'template': 'templates/compute.j2'}, @@ -927,7 +927,7 @@ class TestExtractProvisionedNode(test_utils.TestCommand): 'hostname_format': '%stackname%-controller-%index%', 'defaults': { 'network_config': {'default_route_network': ['External'], - 'network_deployment_actions': ['CREATE'], + 'network_config_update': False, 'networks_skip_config': ['Tenant'], 'physical_bridge_name': 'br-ex', 'public_interface_name': 'nic1', diff --git a/tripleoclient/v1/overcloud_node.py b/tripleoclient/v1/overcloud_node.py index 255661583..ebc0c19a7 100644 --- a/tripleoclient/v1/overcloud_node.py +++ b/tripleoclient/v1/overcloud_node.py @@ -579,15 +579,14 @@ class ExtractProvisionedNode(command.Command): role_name + 'NetworkConfigTemplate') if parameters.get(role_name + 'NetworkDeploymentActions'): - net_conf['network_deployment_actions'] = parameters.get( + network_deployment_actions = parameters.get( role_name + 'NetworkDeploymentActions') else: - net_conf['network_deployment_actions'] = parameters.get( + network_deployment_actions = parameters.get( 'NetworkDeploymentActions', ['CREATE']) - if isinstance(net_conf['network_deployment_actions'], str): - net_conf['network_deployment_actions'] = net_conf[ - 'network_deployment_actions'].split(',') + net_conf['network_config_update'] = ( + 'UPDATE' in network_deployment_actions) # The NetConfigDataLookup parameter is of type: json, but when # not set it returns as string '{}'