[WIP]Migration to new policy api
[optf/osdf.git] / test / placement-tests / test_by_scope_org.yaml
diff --git a/test/placement-tests/test_by_scope_org.yaml b/test/placement-tests/test_by_scope_org.yaml
new file mode 100644 (file)
index 0000000..2cdd4e4
--- /dev/null
@@ -0,0 +1,24 @@
+references:
+    service_name:
+        source: request
+        value: serviceInfo.serviceName
+    subscriber_role:
+        source: SubscriberPolicy
+        value: content.properties.subscriberRole
+
+policy_info:
+    placement:
+        policy_fetch: by_scope
+        policy_scope:
+            default_scope: OSDF_R2
+            vcpe_scope: OSDF_R2
+            secondary_scopes:
+                -
+                    - get_param: service_name
+                    - SubscriberPolicy
+                -
+                    - get_param: service_name
+                    - get_param: subscriber_role
+    default:  # if no explicit service related information is needed
+        policy_fetch: by_name
+        policy_scope: none