From 0f6dce4b3bc7e1cf2e6cb0dd2e61ea6430ceaf9a Mon Sep 17 00:00:00 2001 From: oviner Date: Mon, 3 Jun 2024 17:43:44 +0300 Subject: [PATCH] remove parameters from conf file Signed-off-by: oviner --- ...upi_1az_rhcos_multus_nvme_intel_3m_3w.yaml | 5 ---- ocs_ci/deployment/deployment.py | 25 ++++++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/conf/deployment/baremetal/upi_1az_rhcos_multus_nvme_intel_3m_3w.yaml b/conf/deployment/baremetal/upi_1az_rhcos_multus_nvme_intel_3m_3w.yaml index 9d8f4404ff0..546d67a926b 100644 --- a/conf/deployment/baremetal/upi_1az_rhcos_multus_nvme_intel_3m_3w.yaml +++ b/conf/deployment/baremetal/upi_1az_rhcos_multus_nvme_intel_3m_3w.yaml @@ -13,11 +13,6 @@ ENV_DATA: is_multus_enabled: true multus_public_net_interface: 'enp1s0f1' multus_cluster_net_interface: 'enp1s0f1' - worker_node_network_configuration: [ - ["ceph-public-net-shim-argo005","argo005.ceph.redhat.com","192.168.252.1","24","192.168.20.0/24"], - ["ceph-public-net-shim-argo006","argo006.ceph.redhat.com","192.168.252.2","24","192.168.20.0/24"], - ["ceph-public-net-shim-argo007","argo007.ceph.redhat.com","192.168.252.3","24","192.168.20.0/24"], - ] REPORTING: polarion: deployment_id: 'OCS-2510' diff --git a/ocs_ci/deployment/deployment.py b/ocs_ci/deployment/deployment.py index 1e500f113dc..7c854b47e4a 100644 --- a/ocs_ci/deployment/deployment.py +++ b/ocs_ci/deployment/deployment.py @@ -1018,28 +1018,35 @@ def deploy_ocs_via_operator(self, image=None): nmstate_obj = NMStateInstaller() nmstate_obj.running_nmstate() logger.info("Configure NodeNetworkConfigurationPolicy on all worker nodes") - network_workers = config.ENV_DATA["worker_node_network_configuration"] - for worker_network_configuration in network_workers: + worker_node_names = get_worker_nodes() + for worker_node_name in worker_node_names: + worker_network_configuration = config.ENV_DATA["baremetal"]["servers"][ + worker_node_name + ] node_network_configuration_policy = templating.load_yaml( constants.NODE_NETWORK_CONFIGURATION_POLICY ) node_network_configuration_policy["spec"]["nodeSelector"][ "kubernetes.io/hostname" - ] = worker_network_configuration[1] - node_network_configuration_policy["metadata"][ - "name" - ] = worker_network_configuration[0] + ] = worker_network_configuration[ + "node_network_configuration_policy_name" + ] + node_network_configuration_policy["metadata"]["name"] = worker_node_name node_network_configuration_policy["spec"]["desiredState"]["interfaces"][ 0 - ]["ipv4"]["address"][0]["ip"] = worker_network_configuration[2] + ]["ipv4"]["address"][0]["ip"] = worker_network_configuration[ + "node_network_configuration_policy_ip" + ] node_network_configuration_policy["spec"]["desiredState"]["interfaces"][ 0 ]["ipv4"]["address"][0]["prefix-length"] = worker_network_configuration[ - 3 + "node_network_configuration_policy_prefix_length" ] node_network_configuration_policy["spec"]["desiredState"]["routes"][ "config" - ][0]["destination"] = worker_network_configuration[4] + ][0]["destination"] = worker_network_configuration[ + "node_network_configuration_policy_destination_route" + ] public_net_yaml = tempfile.NamedTemporaryFile( mode="w+", prefix="multus_public", delete=False )