Add sample policies in OSDF repo
[optf/osdf.git] / examples / policies / nst_policies / attribute_policy_nst.json
diff --git a/examples/policies/nst_policies/attribute_policy_nst.json b/examples/policies/nst_policies/attribute_policy_nst.json
new file mode 100644 (file)
index 0000000..da2e5fe
--- /dev/null
@@ -0,0 +1,41 @@
+{
+   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+   "topology_template": {
+      "policies": [
+{
+    "Threshold_nst": {
+        "metadata": {
+            "policy-id": "Threshold_nst",
+            "policy-version": 1
+        },
+        "properties": {
+            "geography": [],
+            "identity": "nst_Threshold",
+            "resources": [
+                "nst"
+            ],
+            "scope": [
+                "OSDF_GUILIN"
+            ],
+            "services": [
+                "nst"
+            ],
+            "thresholdProperties": [
+                {
+                    "attribute": "latency",
+                    "operator": "lte",
+                    "threshold": {
+                        "get_param": "latency"
+                    },
+                    "unit": "ms"
+                }
+            ]
+        },
+        "type": "onap.policies.optimization.resource.ThresholdPolicy",
+        "type_version": "1.0.0",
+        "version": "1.0.0"
+    }
+}
+      ]
+   }
+}