summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorkrishnaa96 <krishna.moorthy6@wipro.com>2020-10-07 17:01:58 +0530
committerkrishnaa96 <krishna.moorthy6@wipro.com>2020-10-07 19:52:51 +0530
commitf173849ec0e08930f7c546543a8dd6b14954c308 (patch)
tree4db58d8f1b520817405e5cd8641972e304456772 /test
parent21587bf56798b440dd4ddf6e35f121505b90fb0d (diff)
Return empty solution if no candidate found
Update policy filter for NSI selection Return empty solution instead of error if no candidate is found Issue-ID: OPTFRA-855 Signed-off-by: krishnaa96 <krishna.moorthy6@wipro.com> Change-Id: I2f5ecbb9464fef3dbc844339968f6cdb1123b2b5
Diffstat (limited to 'test')
-rw-r--r--test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json3
-rw-r--r--test/policy-local-files/slice-selection-files/opt_policy_nssi.json2
-rw-r--r--test/policy-local-files/slice-selection-files/query_policy_nsi.json12
-rw-r--r--test/policy-local-files/slice-selection-files/query_policy_nssi.json10
-rw-r--r--test/policy-local-files/slice-selection-files/threshold_policy_nsi.json4
-rw-r--r--test/policy-local-files/slice-selection-files/threshold_policy_nssi.json2
-rw-r--r--test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json9
-rw-r--r--test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json14
-rw-r--r--test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json6
9 files changed, 46 insertions, 16 deletions
diff --git a/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json b/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json
index 33dbfee..fa02d4e 100644
--- a/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json
+++ b/test/policy-local-files/slice-selection-files/opt_policy_nsi_reuse.json
@@ -24,8 +24,7 @@
"embb-nst"
],
"scope": [
- "REUSE",
- "SHARED"
+ "shared,reuse"
],
"services": [
"embb-nst"
diff --git a/test/policy-local-files/slice-selection-files/opt_policy_nssi.json b/test/policy-local-files/slice-selection-files/opt_policy_nssi.json
index 2b7cbf8..196add0 100644
--- a/test/policy-local-files/slice-selection-files/opt_policy_nssi.json
+++ b/test/policy-local-files/slice-selection-files/opt_policy_nssi.json
@@ -24,7 +24,7 @@
"embb-cn"
],
"scope": [
- "SHARED"
+ "OSDF_GUILIN"
],
"services": [
"embb-cn"
diff --git a/test/policy-local-files/slice-selection-files/query_policy_nsi.json b/test/policy-local-files/slice-selection-files/query_policy_nsi.json
index 49b1ca6..c370ccd 100644
--- a/test/policy-local-files/slice-selection-files/query_policy_nsi.json
+++ b/test/policy-local-files/slice-selection-files/query_policy_nsi.json
@@ -10,7 +10,9 @@
},
"properties":{
"scope":[
- "OSDF_GUILIN"
+ "shared,reuse",
+ "shared,create_new",
+ "not-shared"
],
"services":[
"embb-nst"
@@ -37,6 +39,14 @@
{
"attribute":"tn_bh_latency",
"attribute_location":"tn_bh_latency"
+ },
+ {
+ "attribute":"model_invariant_id",
+ "attribute_location":"invariantUUID"
+ },
+ {
+ "attribute":"model_version_id",
+ "attribute_location":"UUID"
}
]
}
diff --git a/test/policy-local-files/slice-selection-files/query_policy_nssi.json b/test/policy-local-files/slice-selection-files/query_policy_nssi.json
index 5e5893b..c1e941f 100644
--- a/test/policy-local-files/slice-selection-files/query_policy_nssi.json
+++ b/test/policy-local-files/slice-selection-files/query_policy_nssi.json
@@ -10,7 +10,7 @@
},
"properties":{
"scope":[
- "SHARED"
+ "OSDF_GUILIN"
],
"services":[
"embb-cn"
@@ -25,6 +25,14 @@
{
"attribute":"reliability",
"attribute_location":"reliability"
+ },
+ {
+ "attribute":"model_invariant_id",
+ "attribute_location":"invariantUUID"
+ },
+ {
+ "attribute":"model_version_id",
+ "attribute_location":"UUID"
}
]
}
diff --git a/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json b/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json
index 6e518dd..8769641 100644
--- a/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json
+++ b/test/policy-local-files/slice-selection-files/threshold_policy_nsi.json
@@ -14,7 +14,9 @@
"embb-nst"
],
"scope":[
- "OSDF_GUILIN"
+ "shared,reuse",
+ "shared,create_new",
+ "not-shared"
],
"services":[
"embb-nst"
diff --git a/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json b/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json
index 72a24da..bf8690f 100644
--- a/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json
+++ b/test/policy-local-files/slice-selection-files/threshold_policy_nssi.json
@@ -14,7 +14,7 @@
"embb-cn"
],
"scope":[
- "SHARED"
+ "OSDF_GUILIN"
],
"services":[
"embb-cn"
diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json
index 1774780..09aba6e 100644
--- a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json
+++ b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_non_shared_case.json
@@ -9,8 +9,7 @@
"identity":"vnf_URLLC",
"resources":["embb-nst"],
"scope":[
- "OSDF_GUILIN",
- "non-shared"
+ "not-shared"
],
"services":[
"embb-nst"
@@ -19,6 +18,11 @@
"vnfProperties":[
{
"attributes":{
+ "service_profile": {
+ "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
+ "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"}
+ },
+ "subnets": {
"core":{
"latency":{
"max":{"get_param":"latency"},
@@ -58,6 +62,7 @@
]
}
}
+ }
},
"inventoryProvider":"generator",
"inventoryType":"slice_profiles",
diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json
index 9932cc1..0446748 100644
--- a/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json
+++ b/test/policy-local-files/slice-selection-files/vnf_policy_nsi_shared_case.json
@@ -9,8 +9,8 @@
"identity":"vnf_URLLC",
"resources":["embb-nst"],
"scope":[
- "OSDF_GUILIN",
- "shared"
+ "shared,reuse",
+ "shared,create_new"
],
"services":[
"embb-nst"
@@ -19,8 +19,8 @@
"vnfProperties":[
{
"attributes":{
- "modelInvariantId":"bfbg3636-e39c-iidd-0987-27c28f4oo3",
- "modelVersionId":"bfbg3636-e39c-iidd-0987-27c28f4d33",
+ "modelInvariantId":{"get_param":"model_invariant_id"},
+ "modelVersionId":{"get_param":"model_version_id"},
"environment-context":"shared",
"service-role":"nsi"
},
@@ -33,6 +33,11 @@
},
{
"attributes":{
+ "service_profile": {
+ "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
+ "reliability": {"value": {"get_param": "reliability"}, "operator": "gte"}
+ },
+ "subnets": {
"core":{
"latency":{
"max":{"get_param":"latency"},
@@ -72,6 +77,7 @@
]
}
}
+ }
},
"inventoryProvider":"generator",
"inventoryType":"slice_profiles",
diff --git a/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json b/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json
index bd12f84..b5c81d1 100644
--- a/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json
+++ b/test/policy-local-files/slice-selection-files/vnf_policy_nssi_shared.json
@@ -9,7 +9,7 @@
"identity":"vnf_URLLC",
"resources":["embb-cn"],
"scope":[
- "SHARED"
+ "OSDF_GUILIN"
],
"services":[
"embb-cn"
@@ -18,8 +18,8 @@
"vnfProperties":[
{
"attributes":{
- "modelInvariantId":"bfbg3636-e39c-iidd-0987-27c28f4oo3",
- "modelVersionId":"bfbg3636-e39c-iidd-0987-27c28f4d33",
+ "modelInvariantId":{"get_param":"model_invariant_id"},
+ "modelVersionId":{"get_param":"model_version_id"},
"environment-context":"shared",
"service-role":"nssi"
},