aboutsummaryrefslogtreecommitdiffstats
path: root/test/toscapolicies
diff options
context:
space:
mode:
Diffstat (limited to 'test/toscapolicies')
-rw-r--r--test/toscapolicies/access_method/deploy_access_method.json10
-rw-r--r--test/toscapolicies/access_method/policy_access_method.yaml15
-rw-r--r--test/toscapolicies/blacklist/deploy_blacklist.json10
-rw-r--r--test/toscapolicies/blacklist/policy_blacklist.yaml18
-rw-r--r--test/toscapolicies/cell/deploy_cell.json10
-rw-r--r--test/toscapolicies/cell/policy_cell.yaml21
-rw-r--r--test/toscapolicies/monitor/deploy_monitor.json10
-rw-r--r--test/toscapolicies/monitor/policy_monitor.yaml16
-rw-r--r--test/toscapolicies/role/deploy_role.json10
-rw-r--r--test/toscapolicies/role/policy_role.yaml16
10 files changed, 136 insertions, 0 deletions
diff --git a/test/toscapolicies/access_method/deploy_access_method.json b/test/toscapolicies/access_method/deploy_access_method.json
new file mode 100644
index 0000000..4903c65
--- /dev/null
+++ b/test/toscapolicies/access_method/deploy_access_method.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "policy-id": "access_method",
+ "policy-version": "1.0.0"
+
+ }
+ ]
+}
+
diff --git a/test/toscapolicies/access_method/policy_access_method.yaml b/test/toscapolicies/access_method/policy_access_method.yaml
new file mode 100644
index 0000000..9b48637
--- /dev/null
+++ b/test/toscapolicies/access_method/policy_access_method.yaml
@@ -0,0 +1,15 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+ policies:
+ - access_method:
+ type: onap.policies.native.opa
+ type_version: 1.0.0
+ properties:
+ data:
+ policy:
+ access_method: cGFja2FnZSBhY2Nlc3NfbWV0aG9kCmltcG9ydCByZWdvLnYxCmFsbG93IGlmIHsKICAgICAgICBpbnB1dC5wYXRoID09IFsidXNlcnMiXQogICAgICAgIGlucHV0Lm1ldGhvZCA9PSAiUE9TVCIKfQoKYWxsb3cgaWYgewogICAgICAgIGlucHV0LnBhdGggPT0gWyJ1c2VycyIsIGlucHV0LnVzZXJfaWRdCiAgICAgICAgaW5wdXQubWV0aG9kID09ICJHRVQiCn0KCg==
+ name: access_method
+ version: 1.0.0
+ metadata:
+ policy-id: access_method
+ policy-version: 1.0.0
diff --git a/test/toscapolicies/blacklist/deploy_blacklist.json b/test/toscapolicies/blacklist/deploy_blacklist.json
new file mode 100644
index 0000000..8daa958
--- /dev/null
+++ b/test/toscapolicies/blacklist/deploy_blacklist.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "policy-id": "blacklist",
+ "policy-version": "1.0.0"
+
+ }
+ ]
+}
+
diff --git a/test/toscapolicies/blacklist/policy_blacklist.yaml b/test/toscapolicies/blacklist/policy_blacklist.yaml
new file mode 100644
index 0000000..2e2b15c
--- /dev/null
+++ b/test/toscapolicies/blacklist/policy_blacklist.yaml
@@ -0,0 +1,18 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+ policies:
+ - blacklist:
+ type: onap.policies.native.opa
+ type_version: 1.0.0
+ properties:
+ data:
+ node.blacklist: ewogICAgImJsYWNrbGlzdCIgOiBbCiAgICAidGhlLXZmbW9kdWxlLXdoZXJlLXJvb3QtaXMtdHJ1ZSIsCiAgICAgImFub3RoZXItdmZtb2R1bGUtd2hlcmUtcm9vdC1pcy10cnVlIgpdCn0=
+ policy:
+ blacklist:
+ cGFja2FnZSBibGFja2xpc3QKaW1wb3J0IGZ1dHVyZS5rZXl3b3Jkcy5pbgppbXBvcnQgcmVnby52MQoKIyBEZWZpbmUgYSBydWxlIHRvIGNoZWNrIGlmIHRoZSBvcGVyYXRpb24gc2hvdWxkIGJlIGFsbG93ZWQKbW9kdWxlX2FsbG93W21vZHVsZV0gOj0gZmFsc2UgaWYgewogICAgc29tZSBtb2R1bGUgaW4gaW5wdXQudmZtb2R1bGUKICAgIG5vdCB2YWxpZGF0ZShtb2R1bGUpCn0KCm1vZHVsZV9hbGxvd1ttb2R1bGVdIDo9IHRydWUgaWZ7CiAgICAgICAgc29tZSBtb2R1bGUgaW4gaW5wdXQudmZtb2R1bGUKICAgIHZhbGlkYXRlKG1vZHVsZSkKfQoKdmFsaWRhdGUobW9kdWxlKSBpZiB7CiAgICAgICAgbW9kdWxlIGluIGRhdGEubm9kZS5ibGFja2xpc3QuYmxhY2tsaXN0Cn0=
+ name: blacklist
+ version: 1.0.0
+ metadata:
+ policy-id: blacklist
+ policy-version: 1.0.0
+
diff --git a/test/toscapolicies/cell/deploy_cell.json b/test/toscapolicies/cell/deploy_cell.json
new file mode 100644
index 0000000..75a25bd
--- /dev/null
+++ b/test/toscapolicies/cell/deploy_cell.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "policy-id": "cell.consistency",
+ "policy-version": "1.0.0"
+
+ }
+ ]
+}
+
diff --git a/test/toscapolicies/cell/policy_cell.yaml b/test/toscapolicies/cell/policy_cell.yaml
new file mode 100644
index 0000000..3ab25db
--- /dev/null
+++ b/test/toscapolicies/cell/policy_cell.yaml
@@ -0,0 +1,21 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+ policies:
+ - cell.consistency:
+ type: onap.policies.native.opa
+ type_version: 1.0.0
+ properties:
+ data:
+ node.cell.consistency: >-
+ eyAgIAogICJhbGxvd2VkQ2VsbElkIiA6IDQ0NTYxMTE5MzI2NTA0MDEyOSwgCiAgIm1pblBDSSI6IDEsIAogICJtYXhQQ0kiOiAzMDAwICAKIH0=
+ policy:
+ cell.consistency: >-
+ cGFja2FnZSBjZWxsLmNvbnNpc3RlbmN5CmRlZmF1bHQgYWxsb3cgPSBmYWxzZQojIFJ1bGUgdG8gY2hlY2sgY2VsbCBjb25zaXN0ZW5jeQpjaGVja19jZWxsX2NvbnNpc3RlbmN5IGlmIHsKICAgIGlucHV0LmNlbGwgIT0gZGF0YS5ub2RlLmNlbGwuY29uc2lzdGVuY3kuYWxsb3dlZENlbGxJZAp9CiMgUnVsZSB0byBhbGxvdyBpZiBQQ0kgaXMgd2l0aGluIHJhbmdlIDEtMzAwMAphbGxvd19pZl9wY2lfaW5fcmFuZ2UgaWYgewogICAgaW5wdXQuUENJID49IGRhdGEubm9kZS5jZWxsY29uc2lzdGVuY3kubWluUENJCiAgICBpbnB1dC5QQ0kgPD0gZGF0YS5ub2RlLmNlbGxjb25zaXN0ZW5jeS5tYXhQQ0kKfQojIE1haW4gcnVsZSB0byBkZXRlcm1pbmUgdGhlIGZpbmFsIGRlY2lzaW9uCmFsbG93IGlmIHsKICAgIGNoZWNrX2NlbGxfY29uc2lzdGVuY3kKICAgIGFsbG93X2lmX3BjaV9pbl9yYW5nZQp9
+ cell.consistency.topology: >-
+ cGFja2FnZSBjZWxsLmNvbnNpc3RlbmN5LnRvcG9sb2d5CmltcG9ydCByZWdvLnYxCiMgUnVsZSB0byBjaGVjayBjZWxsIGNvbnNpc3RlbmN5CmNoZWNrX2NlbGxfY29uc2lzdGVuY3kgaWYgewogICAgaW5wdXQuY2VsbCAhPSBkYXRhLmNlbGxjb25zaXN0ZW5jeS5hbGxvd2VkQ2VsbElkCn0=
+ name: cell.consistency
+ version: 1.0.0
+ metadata:
+ policy-id: cell.consistency
+ policy-version: 1.0.0
+
diff --git a/test/toscapolicies/monitor/deploy_monitor.json b/test/toscapolicies/monitor/deploy_monitor.json
new file mode 100644
index 0000000..55a60cf
--- /dev/null
+++ b/test/toscapolicies/monitor/deploy_monitor.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "policy-id": "monitor",
+ "policy-version": "1.0.0"
+
+ }
+ ]
+}
+
diff --git a/test/toscapolicies/monitor/policy_monitor.yaml b/test/toscapolicies/monitor/policy_monitor.yaml
new file mode 100644
index 0000000..1dcc7ee
--- /dev/null
+++ b/test/toscapolicies/monitor/policy_monitor.yaml
@@ -0,0 +1,16 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+ policies:
+ - monitor:
+ type: onap.policies.native.opa
+ type_version: 1.0.0
+ properties:
+ data:
+ node.monitor: eyAiZG9tYWluIjogIm1lYXN1cmVtZW50c0ZvclZmU2NhbGluZyIsCiAgIm1ldHJpY3NQZXJFdmVudE5hbWUiOiBbewogICAgICAgICAgImV2ZW50TmFtZSI6ICJNZWFzdXJlbWVudF92R01VWCIsCiAgICAgICAgICAiY29udHJvbExvb3BTY2hlbWFUeXBlIjogIlZORiIsCiAgICAgICAgICAicG9saWN5U2NvcGUiOiAiRENBRSIsCiAgICAgICAgICAicG9saWN5TmFtZSI6ICJEQ0FFLkNvbmZpZ190Y2EtaGktbG8iLAogICAgICAgICAgICJwb2xpY3lWZXJzaW9uIjogInYwLjAuMSIsCiAgICAgICAgICAgInRocmVzaG9sZHMiIDogW3sidmVyc2lvbiI6ICIxLjAuMiIsCiAgICAgICAgICAgICJjbG9zZWRMb29wQ29udHJvbE5hbWUiOiAiQ29udHJvbExvb3AtdkNQRS00OGYwYzJjMy1hMTcyLTQxOTItOWFlMy0wNTIyNzQxODFiNmUiLAogICAgICAgICAgICAidGhyZXNob2xkVmFsdWUiOiAwCiAgICAgICAgICAgICB9XQp9XQp9
+ policy:
+ monitor: cGFja2FnZSBtb25pdG9yCgojIFBvbGljeSBhbGxvd3MgaWYgYSBtYXRjaGluZyB0aHJlc2hvbGQgaXMgbWV0CnJlc3VsdCBjb250YWlucyBvdXRwdXQgaWYgewogICAgaW5wdXQuZG9tYWluID0gZGF0YS5ub2RlLm1vbml0b3IuZG9tYWluCiAgICBzb21lIGV2ZW50cyAgaW4gZGF0YS5ub2RlLm1vbml0b3IubWV0cmljc1BlckV2ZW50TmFtZQogICAgZXZlbnRzLmV2ZW50TmFtZSA9PSBpbnB1dC5ldmVudE5hbWUKICAgIGV2ZW50cy5jb250cm9sTG9vcFNjaGVtYVR5cGUgPT0gaW5wdXQuY29udHJvbExvb3BTY2hlbWFUeXBlCiAgICBldmVudHMucG9saWN5U2NvcGUgPT0gaW5wdXQucG9saWN5U2NvcGUKICAgIGV2ZW50cy5wb2xpY3lOYW1lID09IGlucHV0LnBvbGljeU5hbWUKICAgIGV2ZW50cy5wb2xp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B2YWx1ZS52ZXJzaW9uCiAgICBpbnB1dC50aHJlc2hvbGRWYWx1ZSA+IHZhbHVlLnRocmVzaG9sZFZhbHVlCiAgICBvdXRwdXQgOj0gewogICAgICAgICJzZXZlcml0eSIgOiAiQ1JJVElDQUwiLAogICAgICAgICJjbG9zZWRMb29wRXZlbnRTdGF0dXMiIDogIk9OU0VUIgogICAgICAgIH0KfQ==
+ name: monitor
+ version: 1.0.0
+ metadata:
+ policy-id: monitor
+ policy-version: 1.0.0
diff --git a/test/toscapolicies/role/deploy_role.json b/test/toscapolicies/role/deploy_role.json
new file mode 100644
index 0000000..2698286
--- /dev/null
+++ b/test/toscapolicies/role/deploy_role.json
@@ -0,0 +1,10 @@
+{
+ "policies": [
+ {
+ "policy-id": "role",
+ "policy-version": "1.0.0"
+
+ }
+ ]
+}
+
diff --git a/test/toscapolicies/role/policy_role.yaml b/test/toscapolicies/role/policy_role.yaml
new file mode 100644
index 0000000..aeb0da5
--- /dev/null
+++ b/test/toscapolicies/role/policy_role.yaml
@@ -0,0 +1,16 @@
+tosca_definitions_version: tosca_simple_yaml_1_1_0
+topology_template:
+ policies:
+ - role:
+ type: onap.policies.native.opa
+ type_version: 1.0.0
+ properties:
+ data:
+ node.role: ewogICAgInVzZXJfcm9sZXMiOiB7CiAgICAgICAgImFsaWNlIjogWwogICAgICAgICAgICAiYWRtaW4iCiAgICAgICAgXSwKICAgICAgICAiYm9iIjogWwogICAgICAgICAgICAiZW1wbG95ZWUiLAogICAgICAgICAgICAiYmlsbGluZyIKICAgICAgICBdLAogICAgICAgICJldmUiOiBbCiAgICAgICAgICAgICJjdXN0b21lciIKICAgICAgICBdCiAgICB9LAogICAgInJvbGVfZ3JhbnRzIjogewogICAgICAgICJjdXN0b21lciI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgImFjdGlvbiI6ICJyZWFkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogImRvZyIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgImFjdGlvbiI6ICJyZWFkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogImNhdCIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgImFjdGlvbiI6ICJhZG9wdCIsCiAgICAgICAgICAgICAgICAidHlwZSI6ICJkb2ciCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJhY3Rpb24iOiAiYWRvcHQiLAogICAgICAgICAgICAgICAgInR5cGUiOiAiY2F0IgogICAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiZW1wbG95ZWUiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJhY3Rpb24iOiAicmVhZCIsCiAgICAgICAgICAgICAgICAidHlwZSI6ICJkb2ciCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJhY3Rpb24iOiAicmVhZCIsCiAgICAgICAgICAgICAgICAidHlwZSI6ICJjYXQiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJhY3Rpb24iOiAidXBkYXRlIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogImRvZyIKICAgICAgICAgICAgfSwKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgImFjdGlvbiI6ICJ1cGRhdGUiLAogICAgICAgICAgICAgICAgInR5cGUiOiAiY2F0IgogICAgICAgICAgICB9CiAgICAgICAgXSwKICAgICAgICAiYmlsbGluZyI6IFsKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgImFjdGlvbiI6ICJyZWFkIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogImZpbmFuY2UiCiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICJhY3Rpb24iOiAidXBkYXRlIiwKICAgICAgICAgICAgICAgICJ0eXBlIjogImZpbmFuY2UiCiAgICAgICAgICAgIH0KICAgICAgICBdCiAgICB9Cn0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