From 9d51c29acfb81ae16c72a1675d7b021d032dbdfb Mon Sep 17 00:00:00 2001 From: yayogev Date: Fri, 11 Aug 2017 00:35:14 +0300 Subject: US2853 rename pnic to host_pnic & switch_pnic fixed clique finder to work with switch-switch link type Change-Id: I4f815f77e6b4ea36669dfb58bb5f5e914fe3e1ac Signed-off-by: yayogev --- app/test/api/responders_test/test_data/base.py | 14 ++++++++------ app/test/api/responders_test/test_data/clique_types.py | 4 ++-- app/test/api/responders_test/test_data/cliques.py | 6 +++--- app/test/api/responders_test/test_data/links.py | 4 ++-- app/test/scan/test_data/scanner.py | 10 +++++----- 5 files changed, 20 insertions(+), 18 deletions(-) (limited to 'app/test') diff --git a/app/test/api/responders_test/test_data/base.py b/app/test/api/responders_test/test_data/base.py index 1e85800..3dbd6f4 100644 --- a/app/test/api/responders_test/test_data/base.py +++ b/app/test/api/responders_test/test_data/base.py @@ -70,14 +70,14 @@ CONSTANTS_BY_NAMES = { "link_types": [ "instance-vnic", "otep-vconnector", - "otep-pnic", - "pnic-network", + "otep-host_pnic", + "host_pnic-network", "vedge-otep", "vnic-vconnector", - "vconnector-pnic", + "vconnector-host_pnic", "vconnector-vedge", "vnic-vedge", - "vedge-pnic", + "vedge-host_pnic", "vservice-vnic" ], "link_states": [ @@ -134,11 +134,13 @@ CONSTANTS_BY_NAMES = { "vedge", "instance", "vservice", - "pnic", + "host_pnic", "network", "port", "otep", - "agent" + "agent", + "switch_pnic", + "switch" ], "env_types": [ "development", diff --git a/app/test/api/responders_test/test_data/clique_types.py b/app/test/api/responders_test/test_data/clique_types.py index 0fbe839..ae962ce 100644 --- a/app/test/api/responders_test/test_data/clique_types.py +++ b/app/test/api/responders_test/test_data/clique_types.py @@ -20,13 +20,13 @@ WRONG_FOCAL_POINT_TYPE = base.WRONG_OBJECT_TYPE CORRECT_FOCAL_POINT_POINT_TYPE = base.CORRECT_OBJECT_TYPE WRONG_LINK_TYPE = base.WRONG_LINK_TYPE -NONEXISTENT_LINK_TYPE = "otep-pnic" +NONEXISTENT_LINK_TYPE = "otep-host_pnic" CORRECT_LINK_TYPE = base.CORRECT_LINK_TYPE CLIQUE_TYPES_WITH_SPECIFIC_ID = [ { "environment": "Mirantis-Liberty-API", - "focal_point_type": "pnic", + "focal_point_type": "host_pnic", "id": CORRECT_ID } ] diff --git a/app/test/api/responders_test/test_data/cliques.py b/app/test/api/responders_test/test_data/cliques.py index e1995cd..314de20 100644 --- a/app/test/api/responders_test/test_data/cliques.py +++ b/app/test/api/responders_test/test_data/cliques.py @@ -94,7 +94,7 @@ CLIQUES_WITH_SPECIFIC_LINK_TYPE = [ } ], "environment": "Mirantis-Liberty-API", - "focal_point_type": "pnic", + "focal_point_type": "host_pnic", "id": "576c119a3f4173144c7a75c7" } ] @@ -124,7 +124,7 @@ CLIQUES_WITH_SPECIFIC_LINK_ID = [ } ], "environment": "Mirantis-Liberty-API", - "focal_point_type": "pnic", + "focal_point_type": "host_pnic", "id": "576c119a3f4173144c7a75c7" } ] @@ -161,7 +161,7 @@ CLIQUES = [{ } ], "environment": "Miratis-Liberty-API", - "focal_point_type": "pnic", + "focal_point_type": "host_pnic", "id": "576c119a3f4173144c7a75c6" } ] diff --git a/app/test/api/responders_test/test_data/links.py b/app/test/api/responders_test/test_data/links.py index e71c02d..1626392 100644 --- a/app/test/api/responders_test/test_data/links.py +++ b/app/test/api/responders_test/test_data/links.py @@ -69,7 +69,7 @@ LINKS_WITH_SPECIFIC_ID = [ { "id": LINK_ID, "host": "node-1.cisco.com", - "link_type": "pnic-network", + "link_type": "host_pnic-network", "link_name": "Segment-103", "environment": "Mirantis-Liberty-API" } @@ -79,7 +79,7 @@ LINKS = [ { "id": "58ca73ae3a8a836d10ff3b45", "host": "node-1.cisco.com", - "link_type": "pnic-network", + "link_type": "host_pnic-network", "link_name": "Segment-103", "environment": "Mirantis-Liberty-API" } diff --git a/app/test/scan/test_data/scanner.py b/app/test/scan/test_data/scanner.py index ebdee06..36c2033 100644 --- a/app/test/scan/test_data/scanner.py +++ b/app/test/scan/test_data/scanner.py @@ -19,14 +19,14 @@ METADATA = { } TYPE_TO_FETCH = { - "type": "pnic", + "type": "host_pnic", "fetcher": "CliFetchHostPnicsVpp", "environment_condition": {"mechanism_drivers": "OVS"}, "children_scanner": "ScanOteps" } TYPE_TO_FETCH_WITH_WRONG_ENVIRONMENT_CONDITION = { - "type": "pnic", + "type": "host_pnic", "fetcher": "CliFetchHostPnicsVpp", "environment_condition": {"mechanism_drivers": "VPP"}, "children_scanner": "ScanOteps" @@ -39,7 +39,7 @@ TYPE_TO_FETCH_WITH_ERROR_VALUE = { } TYPE_TO_FETCH_WITHOUT_ENV_CON = { - "type": "pnic", + "type": "host_pnic", "fetcher": "CliFetchHostPnicsVpp", "children_scanner": "ScanOteps" } @@ -131,14 +131,14 @@ CONFIGURATIONS = { } TYPES_TO_FETCHES_FOR_PNIC = { - "type": "pnic", + "type": "host_pnic", "fetcher": "CliFetchHostPnicsVpp", "environment_condition": {"mechanism_drivers": "VPP"}, "children_scanner": "ScanOteps" } TYPES_TO_FETCHES_FOR_PNIC_WITHOUT_ENV_CON = { - "type": "pnic", + "type": "host_pnic", "fetcher": "CliFetchHostPnicsVpp", "children_scanner": "ScanOteps" } -- cgit 1.2.3-korg