aboutsummaryrefslogtreecommitdiffstats
path: root/examples/policies/nst_policies
diff options
context:
space:
mode:
Diffstat (limited to 'examples/policies/nst_policies')
-rw-r--r--examples/policies/nst_policies/attribute_policy_nst.json41
-rw-r--r--examples/policies/nst_policies/optimization_policy_nst.json44
-rw-r--r--examples/policies/nst_policies/query_policy_nst.json38
-rw-r--r--examples/policies/nst_policies/vnf_policy_nst.json41
4 files changed, 164 insertions, 0 deletions
diff --git a/examples/policies/nst_policies/attribute_policy_nst.json b/examples/policies/nst_policies/attribute_policy_nst.json
new file mode 100644
index 0000000..da2e5fe
--- /dev/null
+++ b/examples/policies/nst_policies/attribute_policy_nst.json
@@ -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"
+ }
+}
+ ]
+ }
+}
diff --git a/examples/policies/nst_policies/optimization_policy_nst.json b/examples/policies/nst_policies/optimization_policy_nst.json
new file mode 100644
index 0000000..09737ad
--- /dev/null
+++ b/examples/policies/nst_policies/optimization_policy_nst.json
@@ -0,0 +1,44 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+{
+ "nst_minimize_latency": {
+ "metadata": {
+ "policy-id": "nst_minimize_latency",
+ "policy-version": 1
+ },
+ "properties": {
+ "geography": [],
+ "identity": "optimization",
+ "goal": "minimize",
+ "operation_function": {
+ "operator": "sum",
+ "operands": [
+ {
+ "function": "attribute",
+ "params": {
+ "attribute": "latency",
+ "demand": "nst"
+ }
+ }
+ ]
+ },
+ "resources": [
+ "nst"
+ ],
+ "scope": [
+ "OSDF_GUILIN"
+ ],
+ "services": [
+ "nst"
+ ]
+ },
+ "type": "onap.policies.optimization.resource.OptimizationPolicy",
+ "type_version": "2.0.0",
+ "version": "1.0.0"
+ }
+}
+ ]
+ }
+}
diff --git a/examples/policies/nst_policies/query_policy_nst.json b/examples/policies/nst_policies/query_policy_nst.json
new file mode 100644
index 0000000..2ce441b
--- /dev/null
+++ b/examples/policies/nst_policies/query_policy_nst.json
@@ -0,0 +1,38 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+{
+ "queryPolicy_nst": {
+ "type": "onap.policies.optimization.service.QueryPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "queryPolicy_nst",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_GUILIN"
+ ],
+ "services": [
+ "nst"
+ ],
+ "geography": [],
+ "identity": "queryPolicy_nst",
+ "queryProperties": [
+ {
+ "attribute": "latency",
+ "attribute_location": "latency"
+ },
+ {
+ "attribute": "areaTrafficCapDL",
+ "attribute_location": "areaTrafficCapDL"
+ }
+ ]
+ }
+ }
+}
+ ]
+ }
+}
diff --git a/examples/policies/nst_policies/vnf_policy_nst.json b/examples/policies/nst_policies/vnf_policy_nst.json
new file mode 100644
index 0000000..422030c
--- /dev/null
+++ b/examples/policies/nst_policies/vnf_policy_nst.json
@@ -0,0 +1,41 @@
+{
+ "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
+ "topology_template": {
+ "policies": [
+{
+ "vnfPolicy_nst": {
+ "type": "onap.policies.optimization.resource.VnfPolicy",
+ "version": "1.0.0",
+ "type_version": "1.0.0",
+ "metadata": {
+ "policy-id": "vnfPolicy_nst",
+ "policy-version": 1
+ },
+ "properties": {
+ "scope": [
+ "OSDF_GUILIN"
+ ],
+ "resources": [
+ "nst"
+ ],
+ "services": [
+ "nst"
+ ],
+ "identity": "vnf_nst",
+ "applicableResources": "any",
+ "vnfProperties": [
+ {
+ "inventoryProvider": "aai",
+ "inventoryType": "nst",
+ "unique": "true",
+ "attributes": {
+ "model-role": "NST"
+ }
+ }
+ ]
+ }
+ }
+}
+ ]
+ }
+}