From 57ca2ef5b66e86fad9b5da3841b794edd9e1ee6b Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 19 May 2022 13:21:40 +0200 Subject: [PATCH] TT#177600 Rename ngcpcfg.instances to instances.yml This makes it clear this is not an ngcpcfg tool specific file but one more in line with the cfg-schema and friends. It also gives it a proper extension to make it clear it is a YAML file. Change-Id: I6f19945a3ffc0e1406024b60e401688d7d3c68cc --- etc/ngcp-config/ngcpcfg.cfg | 2 +- t/fixtures/ngcpcfg_carrier_instances.cfg | 2 +- t/fixtures/repos/{ngcp.instances => instances.yml} | 0 t/test_ngcpcfg_apply_instances.py | 4 ++-- t/test_ngcpcfg_build_instances.py | 14 +++++++------- ...g_lib_get_all_ips_of_connection_for_instance.py | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) rename t/fixtures/repos/{ngcp.instances => instances.yml} (100%) diff --git a/etc/ngcp-config/ngcpcfg.cfg b/etc/ngcp-config/ngcpcfg.cfg index 2b89e3b7..837c58c2 100644 --- a/etc/ngcp-config/ngcpcfg.cfg +++ b/etc/ngcp-config/ngcpcfg.cfg @@ -31,7 +31,7 @@ TEMPLATE_POOL_BASE="${NGCPCTL_MAIN}/templates" SERVICES_POOL_BASE="${NGCPCTL_MAIN}/templates" # location of instances info for templates -TEMPLATE_INSTANCES="${NGCPCTL_MAIN}/ngcpcfg.instances" +TEMPLATE_INSTANCES="${NGCPCTL_MAIN}/instances.yml" # timestamp format for console output TIME_FORMAT="+%F %T" diff --git a/t/fixtures/ngcpcfg_carrier_instances.cfg b/t/fixtures/ngcpcfg_carrier_instances.cfg index b09f9249..cf4e9f3a 100644 --- a/t/fixtures/ngcpcfg_carrier_instances.cfg +++ b/t/fixtures/ngcpcfg_carrier_instances.cfg @@ -23,7 +23,7 @@ [ -n "${SERVICES_POOL_BASE:-}" ] || SERVICES_POOL_BASE="${NGCPCTL_MAIN}/templates" # location of instances info for templates -[ -n "${TEMPLATE_INSTANCES:-}" ] || TEMPLATE_INSTANCES="${NGCPCTL_MAIN}/ngcpcfg.instances" +[ -n "${TEMPLATE_INSTANCES:-}" ] || TEMPLATE_INSTANCES="${NGCPCTL_MAIN}/instances.yml" # timestamp format for console output [ -n "${TIME_FORMAT:-}" ] || TIME_FORMAT="+%F %T" diff --git a/t/fixtures/repos/ngcp.instances b/t/fixtures/repos/instances.yml similarity index 100% rename from t/fixtures/repos/ngcp.instances rename to t/fixtures/repos/instances.yml diff --git a/t/test_ngcpcfg_apply_instances.py b/t/test_ngcpcfg_apply_instances.py index e7e4c9d3..1df12add 100644 --- a/t/test_ngcpcfg_apply_instances.py +++ b/t/test_ngcpcfg_apply_instances.py @@ -16,7 +16,7 @@ def test_apply_instances(ngcpcfgcli, tmpdir): env={ "NGCP_HOSTNAME": "lb01a", "TEMPLATE_POOL_BASE": "fixtures/build_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg", }, ) @@ -51,7 +51,7 @@ def test_apply_instances_changes(ngcpcfg, ngcpcfgcli, tmpdir, gitrepo): env={ "NGCP_HOSTNAME": "lb01a", "TEMPLATE_POOL_BASE": "fixtures/apply_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg", } ) diff --git a/t/test_ngcpcfg_build_instances.py b/t/test_ngcpcfg_build_instances.py index 293e3ba9..c4130662 100644 --- a/t/test_ngcpcfg_build_instances.py +++ b/t/test_ngcpcfg_build_instances.py @@ -13,7 +13,7 @@ def test_build_instances(ngcpcfgcli): env={ "NGCP_HOSTNAME": "lb01a", "TEMPLATE_POOL_BASE": "fixtures/build_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg", }, ) @@ -58,7 +58,7 @@ def test_build_instance_customtt(ngcpcfgcli): env={ "NGCP_HOSTNAME": "lb01a", "TEMPLATE_POOL_BASE": "fixtures/build_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg", }, ) @@ -81,7 +81,7 @@ def test_instances_info_noargs(helpercli, tmpdir): out = helpercli( "instances-info", env={ - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml", }, ) @@ -96,7 +96,7 @@ def test_instances_info_args(helpercli, tmpdir): "instances-info", "/etc", env={ - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml", }, ) @@ -111,7 +111,7 @@ def test_instances_info_args_same(helpercli, tmpdir): "instances-info", "/etc/kamailio/lb", env={ - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml", }, ) @@ -126,7 +126,7 @@ def test_instances_info_args_longer(helpercli, tmpdir): "instances-info", "/etc/kamailio/lb/db", env={ - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml", }, ) @@ -141,7 +141,7 @@ def test_instances_info_relative_path(helpercli): "instances-info", "../lb/db", env={ - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NETWORK_CONFIG": "fixtures/repos/network_carrier_instances.yml", }, ) diff --git a/t/test_ngcpcfg_lib_get_all_ips_of_connection_for_instance.py b/t/test_ngcpcfg_lib_get_all_ips_of_connection_for_instance.py index 916b4d37..b688e617 100644 --- a/t/test_ngcpcfg_lib_get_all_ips_of_connection_for_instance.py +++ b/t/test_ngcpcfg_lib_get_all_ips_of_connection_for_instance.py @@ -14,7 +14,7 @@ def test_carrier_instances(ngcpcfgcli): env={ "NGCP_HOSTNAME": "lb01a", "TEMPLATE_POOL_BASE": "fixtures/build_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_carrier_instances.cfg", }, ) @@ -48,7 +48,7 @@ def test_pro_instances(ngcpcfgcli): env={ "NGCP_HOSTNAME": "sp1", "TEMPLATE_POOL_BASE": "fixtures/build_instances", - "TEMPLATE_INSTANCES": "fixtures/repos/ngcp.instances", + "TEMPLATE_INSTANCES": "fixtures/repos/instances.yml", "NGCPCFG": "fixtures/ngcpcfg_pro_instances.cfg", }, )