summaryrefslogtreecommitdiffstats
path: root/app/test
diff options
context:
space:
mode:
authoryayogev <yaronyogev@gmail.com>2017-08-11 00:35:14 +0300
committeryayogev <yaronyogev@gmail.com>2017-08-11 00:35:14 +0300
commit9d51c29acfb81ae16c72a1675d7b021d032dbdfb (patch)
treea815ba52d062fb37c33e6ac99cfb3a6ae11a514a /app/test
parent2414c92d87a4b807d8480328681ef066ba08e305 (diff)
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 <yaronyogev@gmail.com>
Diffstat (limited to 'app/test')
-rw-r--r--app/test/api/responders_test/test_data/base.py14
-rw-r--r--app/test/api/responders_test/test_data/clique_types.py4
-rw-r--r--app/test/api/responders_test/test_data/cliques.py6
-rw-r--r--app/test/api/responders_test/test_data/links.py4
-rw-r--r--app/test/scan/test_data/scanner.py10
5 files changed, 20 insertions, 18 deletions
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"
}