aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChayal, Avteet (ac229e) <ac229e@att.com>2020-03-19 03:13:27 -0400
committerChayal, Avteet (ac229e) <ac229e@att.com>2020-03-19 19:38:06 -0400
commitfdeaf8b56c8d342ef8145aae15c87525fe105f2a (patch)
treed954fda2eec3faa1ebd47d3222c27ad39ae5005f /test
parentd39860b859417c1a7773f39ad8db311848ec0676 (diff)
OSDF migration to new Policy API
Map policy type with constraints type for HAS payload Added new attribute policies for Network Sliciing reference Fixed the logic to proccess Attribute policy translation Issue-ID: OPTFRA-721 Change-Id: I6b01815963b48b3df97c1a3109cc39b2a8bc2c3c Signed-off-by: Chayal, Avteet (ac229e) <ac229e@att.com>
Diffstat (limited to 'test')
-rw-r--r--test/placement-tests/request_placement_vfmod.json2
-rw-r--r--test/policy-local-files/Attribute_vNS_1.json49
-rw-r--r--test/policy-local-files/new_policies/Attribute_vNS_1.json51
-rw-r--r--test/policy-local-files/new_policies/meta-valid-policies.txt1
4 files changed, 102 insertions, 1 deletions
diff --git a/test/placement-tests/request_placement_vfmod.json b/test/placement-tests/request_placement_vfmod.json
index 5242ee7..4b2b852 100644
--- a/test/placement-tests/request_placement_vfmod.json
+++ b/test/placement-tests/request_placement_vfmod.json
@@ -93,7 +93,7 @@
},
"constraints": {
"affinity_vFW_TD": {
- "type": "onap.policies.optimization.AffinityPolicy",
+ "type": "zone",
"demands": [
"vFW-SINK",
"vPGN"
diff --git a/test/policy-local-files/Attribute_vNS_1.json b/test/policy-local-files/Attribute_vNS_1.json
new file mode 100644
index 0000000..e4766db
--- /dev/null
+++ b/test/policy-local-files/Attribute_vNS_1.json
@@ -0,0 +1,49 @@
+{
+ "service": "attributePolicy",
+ "policyName": "OSDF_FRANKFURT.AttributePolicy_vNS_1",
+ "description": "Attribute Policy for Network Slicing (NS)",
+ "templateVersion": "OpenSource.version.1",
+ "version": "OpenSource.version.1",
+ "priority": "1",
+ "riskType": "test",
+ "riskLevel": "3",
+ "guard": "False",
+ "content": {
+ "identity": "attribute-vNS",
+ "policyScope": [
+ "vNS",
+ "us",
+ "international",
+ "ip"
+ ],
+ "policyType": "attribute",
+ "resources": [
+ "vNS",
+ ""
+ ],
+ "attributeProperties": {
+ "cloudRegion": {
+ "serviceRequests": [
+ "",
+ ""
+ ],
+ "cloudRequests": [
+ "",
+ ""
+ ]
+ },
+ "networkRoles": {
+ "all": [
+ "",
+ ""
+ ]
+ },
+ "complex": {
+ "any": [
+ "",
+ ""
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/policy-local-files/new_policies/Attribute_vNS_1.json b/test/policy-local-files/new_policies/Attribute_vNS_1.json
new file mode 100644
index 0000000..35b3c74
--- /dev/null
+++ b/test/policy-local-files/new_policies/Attribute_vNS_1.json
@@ -0,0 +1,51 @@
+{
+ "OSDF_FRANKFURT.Attribute_vNS_1": {
+ "type": "onap.policies.optimization.AttributePolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "OSDF_FRANKFURT.Attribute_vNS_1",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_FRANKFURT"
+ ],
+ "services": [
+ "vNS"
+ ],
+ "resources": [
+ "vNS"
+ ],
+ "geography": [
+ "US",
+ "INTERNATIONAL"
+ ],
+ "identity": "attribute-vNS",
+ "attributeProperties": {
+ "cloudRegion": {
+ "serviceRequests": [
+ "",
+ ""
+ ],
+ "cloudRequests": [
+ "",
+ ""
+ ]
+ },
+ "networkRoles": {
+ "all": [
+ "",
+ ""
+ ]
+ },
+ "complex": {
+ "any": [
+ "",
+ ""
+ ]
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/test/policy-local-files/new_policies/meta-valid-policies.txt b/test/policy-local-files/new_policies/meta-valid-policies.txt
index 7f5a007..5f969bf 100644
--- a/test/policy-local-files/new_policies/meta-valid-policies.txt
+++ b/test/policy-local-files/new_policies/meta-valid-policies.txt
@@ -14,3 +14,4 @@ QueryPolicy_vFW_TD.json
vnfPolicy_vFW_TD.json
vnfPolicy_vPGN_TD.json
Affinity_vFW_TD.json
+Attribute_vNS_1.json \ No newline at end of file