Skip to content

Commit d606c18

Browse files
committed
NO-ISSUE: fix static IPs config option and use a new name
1 parent c404d0b commit d606c18

File tree

8 files changed

+11
-14
lines changed

8 files changed

+11
-14
lines changed

Makefile

-3
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,6 @@ deploy_nodes_with_install: start_load_balancer
340340
$(MAKE) set_dns; \
341341
fi
342342

343-
deploy_static_network_config_nodes_with_install:
344-
make deploy_nodes_with_install IS_STATIC_IP="true"
345-
346343
deploy_nodes: start_load_balancer
347344
TEST_TEARDOWN=no TEST=./discovery-infra/tests/test_targets.py TEST_FUNC=test_target_deploy_nodes $(MAKE) test
348345

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ Check the [Install Guide](GUIDE.md) for installation instructions.
9595
| `AUTH_TYPE` | configure the type of authentication assisted-service will use, default: none |
9696
| `IPv4` | Boolean value indicating if IPv4 is enabled. Default is yes |
9797
| `IPv6` | Boolean value indicating if IPv6 is enabled. Default is no |
98+
| `STATIC_IPS` | Boolean value indicating if static networking should be enabled. Default is no |
9899
| `OCM_BASE_URL` | OCM API URL used to communicate with OCM and AMS, default: https://api.integration.openshift.com/ |
99100
| `OCM_CLIENT_ID` | ID of Service Account used to communicate with OCM and AMS for Agent Auth and Authz |
100101
| `OCM_CLIENT_SECRET` | Password of Service Account used to communicate with OCM and AMS for Agent Auth and Authz |

discovery-infra/start_discovery.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import ipaddress
77
import json
88
import os
9-
from assisted_service_client.models import inventory
109

1110
import yaml
1211
import dns.resolver
@@ -15,7 +14,7 @@
1514
from netaddr import IPNetwork
1615

1716
import test_infra.utils.waiting
18-
from deprecated_utils import get_network_leases, wait_till_nodes_are_ready, get_libvirt_nodes_mac_role_ip_and_name, \
17+
from deprecated_utils import wait_till_nodes_are_ready, get_libvirt_nodes_mac_role_ip_and_name, \
1918
get_libvirt_nodes_macs
2019
from test_infra import assisted_service_api, consts, utils, warn_deprecate
2120
from test_infra.consts import resources

discovery-infra/test_infra/consts/env_defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
DEFAULT_DOWNLOAD_IMAGE: bool = True
2222
DEFAULT_IS_IPV6: bool = False
2323
DEFAULT_ADDITIONAL_NTP_SOURCE: str = consts.DEFAULT_ADDITIONAL_NTP_SOURCE
24-
DEFAULT_IS_STATIC_IP: bool = False
24+
DEFAULT_STATIC_IPS: bool = False
2525
DEFAULT_BOOTSTRAP_IN_PLACE: bool = False
2626
DEFAULT_NETWORK_NAME: str = consts.TEST_NETWORK
2727
DEFAULT_SINGLE_NODE_IP: str = ""

discovery-infra/test_infra/helper_classes/cluster.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -720,15 +720,15 @@ def _ha_not_none(self):
720720
consts.Platforms.NONE
721721

722722
@JunitTestCase()
723-
def prepare_for_installation(self, static_network_config=None, **kwargs):
723+
def prepare_for_installation(self, **kwargs):
724724
self.update_config(**kwargs)
725725
log.info(f"Preparing for installation with cluster configurations: cluster_config={self._config}")
726726
self.nodes.controller.log_configuration()
727727

728728
if self._config.download_image:
729-
if static_network_config:
730-
static_network_config = static_network. \
731-
generate_static_network_data_from_tf(self.nodes.controller.tf_folder)
729+
if self._config.is_static_ip:
730+
static_network_config = \
731+
static_network.generate_static_network_data_from_tf(self.nodes.controller.tf_folder)
732732
else:
733733
static_network_config = None
734734

discovery-infra/test_infra/helper_classes/nodes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, node, cluster_host):
1818

1919

2020
class Nodes:
21-
DEFAULT_STATIC_IP_CONFIG = False
21+
DEFAULT_STATIC_IPS_CONFIG = False
2222

2323
def __init__(self, node_controller: NodeController):
2424
self.controller = node_controller
@@ -88,7 +88,7 @@ def shutdown_all(self):
8888
def notify_iso_ready(self):
8989
self.controller.notify_iso_ready()
9090

91-
def start_all(self, is_static_ip: bool = DEFAULT_STATIC_IP_CONFIG):
91+
def start_all(self, is_static_ip: bool = DEFAULT_STATIC_IPS_CONFIG):
9292
if is_static_ip:
9393
skip_ips = False
9494
else:

discovery-infra/test_infra/utils/global_variables/env_variables_defaults.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class _EnvVariablesDefaults(ABC):
3636
service_network_cidr: str = get_env("SERVICE_CIDR", env_defaults.DEFAULT_SERVICE_CIDR)
3737
cluster_network_cidr: str = get_env("CLUSTER_CIDR", env_defaults.DEFAULT_CLUSTER_CIDR)
3838
cluster_network_host_prefix: int = int(get_env("HOST_PREFIX", env_defaults.DEFAULT_HOST_PREFIX))
39-
is_static_ip: bool = bool(strtobool(get_env("IS_STATIC_IP", default=str(env_defaults.DEFAULT_IS_STATIC_IP))))
39+
is_static_ip: bool = bool(strtobool(get_env("STATIC_IPS", default=str(env_defaults.DEFAULT_STATIC_IPS))))
4040
iso_image_type: str = get_env("ISO_IMAGE_TYPE", env_defaults.DEFAULT_IMAGE_TYPE)
4141
worker_vcpu: str = get_env("WORKER_CPU", resources.DEFAULT_WORKER_CPU)
4242
master_vcpu: str = get_env("MASTER_CPU", resources.DEFAULT_MASTER_CPU)

skipper.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ IPv4
6262
IPv6
6363
PYTHONPATH
6464
PLATFORM
65-
IS_STATIC_IP
65+
STATIC_IPS
6666
PROXY
6767
CHECK_CLUSTER_VERSION
6868
ISO_IMAGE_TYPE

0 commit comments

Comments
 (0)