summaryrefslogtreecommitdiffstats
path: root/examples/policies/nsi_policies
diff options
context:
space:
mode:
Diffstat (limited to 'examples/policies/nsi_policies')
-rw-r--r--examples/policies/nsi_policies/optimization_nsi_create_new.json37
-rw-r--r--examples/policies/nsi_policies/optimization_nsi_non_shared.json37
-rw-r--r--examples/policies/nsi_policies/optimization_nsi_reuse.json37
-rw-r--r--examples/policies/nsi_policies/query_nsi.json69
-rw-r--r--examples/policies/nsi_policies/threshold_nsi.json38
-rw-r--r--examples/policies/nsi_policies/vnf_nsi_nonshared.json92
-rw-r--r--examples/policies/nsi_policies/vnf_nsi_notshared.json121
-rw-r--r--examples/policies/nsi_policies/vnf_nsi_shared.json105
8 files changed, 536 insertions, 0 deletions
diff --git a/examples/policies/nsi_policies/optimization_nsi_create_new.json b/examples/policies/nsi_policies/optimization_nsi_create_new.json
new file mode 100644
index 0000000..af79be2
--- /dev/null
+++ b/examples/policies/nsi_policies/optimization_nsi_create_new.json
@@ -0,0 +1,37 @@
+{
+ "maximizeCost_{{ service_name }}": {
+ "metadata": {
+ "policy-id": "maximizeCost_{{ service_name }}",
+ "policy-version": 1
+ },
+ "properties": {
+ "geography": [],
+ "identity": "optimization",
+ "goal": "maximize",
+ "operation_function": {
+ "operator": "sum",
+ "operands": [
+ {
+ "function": "attribute",
+ "params": {
+ "attribute": "creation_cost",
+ "demand": "{{ service_name }}"
+ }
+ }
+ ]
+ },
+ "resources": [
+ "{{ service_name }}"
+ ],
+ "scope": [
+ "shared,create_new"
+ ],
+ "services": [
+ "{{ service_name }}"
+ ]
+ },
+ "type": "onap.policies.optimization.resource.OptimizationPolicy",
+ "type_version": "2.0.0",
+ "version": "1.0.0"
+ }
+}
diff --git a/examples/policies/nsi_policies/optimization_nsi_non_shared.json b/examples/policies/nsi_policies/optimization_nsi_non_shared.json
new file mode 100644
index 0000000..12d7d24
--- /dev/null
+++ b/examples/policies/nsi_policies/optimization_nsi_non_shared.json
@@ -0,0 +1,37 @@
+{
+ "minimizeLatency_{{ service_name }}": {
+ "metadata": {
+ "policy-id": "minimizeLatency_{{ service_name }}",
+ "policy-version": 1
+ },
+ "properties": {
+ "geography": [],
+ "identity": "optimization",
+ "goal": "minimize",
+ "operation_function": {
+ "operator": "sum",
+ "operands": [
+ {
+ "function": "attribute",
+ "params": {
+ "attribute": "latency",
+ "demand": "{{ service_name }}"
+ }
+ }
+ ]
+ },
+ "resources": [
+ "{{ service_name }}"
+ ],
+ "scope": [
+ "non-shared"
+ ],
+ "services": [
+ "{{ service_name }}"
+ ]
+ },
+ "type": "onap.policies.optimization.resource.OptimizationPolicy",
+ "type_version": "2.0.0",
+ "version": "1.0.0"
+ }
+}
diff --git a/examples/policies/nsi_policies/optimization_nsi_reuse.json b/examples/policies/nsi_policies/optimization_nsi_reuse.json
new file mode 100644
index 0000000..459cf33
--- /dev/null
+++ b/examples/policies/nsi_policies/optimization_nsi_reuse.json
@@ -0,0 +1,37 @@
+{
+ "minimizeCost_{{ service_name }}": {
+ "metadata": {
+ "policy-id": "minimizeCost_{{ service_name }}",
+ "policy-version": 1
+ },
+ "properties": {
+ "geography": [],
+ "identity": "optimization",
+ "goal": "minimize",
+ "operation_function": {
+ "operator": "sum",
+ "operands": [
+ {
+ "function": "attribute",
+ "params": {
+ "attribute": "creation_cost",
+ "demand": "{{ service_name }}"
+ }
+ }
+ ]
+ },
+ "resources": [
+ "{{ service_name }}"
+ ],
+ "scope": [
+ "shared,reuse"
+ ],
+ "services": [
+ "{{ service_name }}"
+ ]
+ },
+ "type": "onap.policies.optimization.resource.OptimizationPolicy",
+ "type_version": "2.0.0",
+ "version": "1.0.0"
+ }
+}
diff --git a/examples/policies/nsi_policies/query_nsi.json b/examples/policies/nsi_policies/query_nsi.json
new file mode 100644
index 0000000..e888a99
--- /dev/null
+++ b/examples/policies/nsi_policies/query_nsi.json
@@ -0,0 +1,69 @@
+{
+ "queryPolicy_{{ service_name }}":{
+ "type":"onap.policies.optimization.service.QueryPolicy",
+ "version":"1.0.0",
+ "type_version":"1.0.0",
+ "metadata":{
+ "policy-id":"queryPolicy_{{ service_name }}",
+ "policy-version":1
+ },
+ "properties":{
+ "scope":[
+ "shared,reuse",
+ "shared,create_new",
+ "non-shared"
+ ],
+ "services":[
+ "{{ service_name }}"
+ ],
+ "geography":[],
+ "identity":"queryPolicy_{{ service_name }}",
+ "queryProperties":[
+ {
+ "attribute":"latency",
+ "attribute_location":"latency"
+ },
+ {
+ "attribute":"max_number_of_ues",
+ "attribute_location":"max_number_of_ues"
+ },
+ {
+ "attribute":"s_nssai",
+ "attribute_location":"s_nssai"
+ },
+ {
+ "attribute":"resource_sharing_level",
+ "attribute_location":"resource_sharing_level"
+ },
+ {
+ "attribute":"ue_mobility_level",
+ "attribute_location":"ue_mobility_level"
+ },
+ {
+ "attribute":"sst",
+ "attribute_location":"sst"
+ },
+ {
+ "attribute":"AN_latency",
+ "attribute_location":"AN_latency"
+ },
+ {
+ "attribute":"CN_latency",
+ "attribute_location":"CN_latency"
+ },
+ {
+ "attribute":"TN_BH_latency",
+ "attribute_location":"TN_BH_latency"
+ },
+ {
+ "attribute":"model_invariant_id",
+ "attribute_location":"invariantUUID"
+ },
+ {
+ "attribute":"model_version_id",
+ "attribute_location":"UUID"
+ }
+ ]
+ }
+ }
+}
diff --git a/examples/policies/nsi_policies/threshold_nsi.json b/examples/policies/nsi_policies/threshold_nsi.json
new file mode 100644
index 0000000..ef4c362
--- /dev/null
+++ b/examples/policies/nsi_policies/threshold_nsi.json
@@ -0,0 +1,38 @@
+{
+ "Threshold_{{ service_name }}":{
+ "metadata":{
+ "policy-id":"Threshold_{{ service_name }}",
+ "policy-version":1
+ },
+ "properties":{
+ "geography":[
+
+ ],
+ "identity":"Threshold_{{ service_name }}",
+ "resources":[
+ "{{ service_name }}"
+ ],
+ "scope":[
+ "shared,reuse",
+ "shared,create_new",
+ "non-shared"
+ ],
+ "services":[
+ "{{ service_name }}"
+ ],
+ "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/nsi_policies/vnf_nsi_nonshared.json b/examples/policies/nsi_policies/vnf_nsi_nonshared.json
new file mode 100644
index 0000000..49b1c95
--- /dev/null
+++ b/examples/policies/nsi_policies/vnf_nsi_nonshared.json
@@ -0,0 +1,92 @@
+{
+ "vnfPolicy_{{ service_name }}_non_shared":{
+ "metadata":{
+ "policy-id":"vnfPolicy_{{ service_name }}_non_shared",
+ "policy-version":1
+ },
+ "properties":{
+ "identity":"vnf_{{ service_name }}",
+ "resources":["{{ service_name }}"],
+ "scope":[
+ "non-shared"
+ ],
+ "services":[
+ "{{ service_name }}"
+ ],
+ "geography":[],
+ "vnfProperties":[
+ {
+ "attributes":{
+ "service_profile": {
+ "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
+ "s_nssai": {"value": {"get_param": "s_nssai"}, "operator": "eq"},
+ "resource_sharing_level": {"value": {"get_param": "resource_sharing_level"}, "operator": "eq"},
+ "ue_mobility_level": {"value": {"get_param": "ue_mobility_level"}, "operator": "eq"},
+ "sst": {"value": {"get_param": "sst"}, "operator": "eq"},
+ "max_number_of_ues": {"value": {"get_param": "max_number_of_ues"}, "operator": "eq"}
+ },
+ "subnets": {
+ "CN":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"CN_latency"},
+ "steps":5
+ },
+ "s_nssai":{
+ "values":[
+ {"get_param": "s_nssai"}
+ ]
+ },
+ "max_number_of_ues": {"values":[{"get_param": "max_number_of_ues"}]},
+ "sst": {"values":[{"get_param": "sst"}]},
+ "resource_sharing_level": {"values":[{"get_param": "resource_sharing_level"}]},
+ "plmn_id_list": {"values":["39-00"]},
+ "survival_time": {"values":["10"]},
+ "ue_mobility_level": {"values":[{"get_param": "ue_mobility_level"}]}
+ },
+ "AN":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"AN_latency"},
+ "steps":5
+ },
+ "s_nssai":{
+ "values":[
+ {"get_param": "s_nssai"}
+ ]
+ },
+ "max_number_of_ues": {"values":[{"get_param": "max_number_of_ues"}]},
+ "sst": {"values":[{"get_param": "sst"}]},
+ "plmn_id_list": {"values":["39-00"]},
+ "survival_time": {"values":["10"]},
+ "resource_sharing_level": {"values":[{"get_param": "resource_sharing_level"}]},
+ "ue_mobility_level": {"values":[{"get_param": "ue_mobility_level"}]}
+ },
+ "TN_BH":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"TN_BH_latency"},
+ "steps":5
+ },
+ "s_nssai": {"values": [{"get_param": "s_nssai"}]},
+ "plmn_id_list": {"values":["39-00"]},
+ "max_bandwidth": {"values":[1000]},
+ "sst": {"values":[{"get_param": "sst"}]}
+ }
+ }
+ },
+ "inventoryProvider":"generator",
+ "inventoryType":"slice_profiles",
+ "unique":"true",
+ "defaultAttributes":{
+ "creation_cost" : 0.9
+ }
+ }
+ ]
+ },
+ "type":"onap.policies.optimization.resource.VnfPolicy",
+ "type_version":"1.0.0",
+ "version":"1.0.0"
+ }
+}
+
diff --git a/examples/policies/nsi_policies/vnf_nsi_notshared.json b/examples/policies/nsi_policies/vnf_nsi_notshared.json
new file mode 100644
index 0000000..afdbd50
--- /dev/null
+++ b/examples/policies/nsi_policies/vnf_nsi_notshared.json
@@ -0,0 +1,121 @@
+{
+ "vnfPolicy_{{ service_name }}_not_shared":{
+ "metadata":{
+ "policy-id":"vnfPolicy_{{ service_name }}_not_shared",
+ "policy-version":1
+ },
+ "properties":{
+ "identity":"vnf_{{ service_name }}",
+ "resources":["{{ service_name }}"],
+ "scope":[
+ "non-shared"
+ ],
+ "services":[
+ "{{ service_name }}"
+ ],
+ "geography":[],
+ "vnfProperties":[
+ {
+ "attributes":{
+ "service_profile": {
+ "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
+ "max_throughput": {"value": {"get_param": "max_throughput"}, "operator": "gte"},
+ "max_number_of_ues": {"value": {"get_param": "max_number_of_ues"}, "operator": "gte"},
+ "terminal_density": {"value": {"get_param": "terminal_density"}, "operator": "gte"},
+ "s_nssai_list": {"value": {"get_param": "s_nssai_list"}, "operator": "eq"},
+ "plmn_id_list": {"value": {"get_param": "plmn_id_list"}, "operator": "eq"}
+ },
+ "subnets": {
+ "AN_NF":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"AN_NF_latency"},
+ "steps":1
+ },
+ "max_throughput":{
+ "values":[
+ {"get_param": "AN_NF_max_throughput"}
+ ]
+ },
+ "max_number_of_ues":{
+ "values":[
+ {"get_param": "AN_NF_max_number_of_ues"}
+ ]
+ },
+ "terminal_density":{
+ "values":[
+ {"get_param": "AN_NF_terminal_density"}
+ ]
+ },
+ "s_nssai_list":{
+ "values":[
+ {"get_param": "s_nssai_list"}
+ ]
+ },
+ "plmn_id_list":{
+ "values":[
+ {"get_param": "plmn_id_list"}
+ ]
+ }
+ },
+ "TN_FH":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"TN_FH_latency"},
+ "steps":1
+ },
+ "max_throughput":{
+ "values":[
+ {"get_param": "TN_FH_max_throughput"}
+ ]
+ },
+ "s_nssai_list":{
+ "values":[
+ {"get_param": "s_nssai_list"}
+ ]
+ },
+ "plmn_id_list":{
+ "values":[
+ {"get_param": "plmn_id_list"}
+ ]
+ }
+ },
+ "TN_MH":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"TN_MH_latency"},
+ "steps":1
+ },
+ "max_throughput":{
+ "values":[
+ {"get_param": "TN_MH_max_throughput"}
+ ]
+ },
+ "s_nssai_list":{
+ "values":[
+ {"get_param": "s_nssai_list"}
+ ]
+ },
+ "plmn_id_list":{
+ "values":[
+ {"get_param": "plmn_id_list"}
+ ]
+ }
+ }
+ }
+ },
+ "inventoryProvider":"generator",
+ "inventoryType":"slice_profiles",
+ "unique":"true",
+ "defaultAttributes":{
+ "creation_cost" : 0.9
+ }
+ }
+ ]
+ },
+ "type":"onap.policies.optimization.resource.VnfPolicy",
+ "type_version":"1.0.0",
+ "version":"1.0.0"
+ }
+}
+
diff --git a/examples/policies/nsi_policies/vnf_nsi_shared.json b/examples/policies/nsi_policies/vnf_nsi_shared.json
new file mode 100644
index 0000000..cce2f73
--- /dev/null
+++ b/examples/policies/nsi_policies/vnf_nsi_shared.json
@@ -0,0 +1,105 @@
+{
+ "vnfPolicy_{{ service_name }}":{
+ "metadata":{
+ "policy-id":"vnfPolicy_{{ service_name }}",
+ "policy-version":1
+ },
+ "properties":{
+ "identity":"vnf_{{ service_name }}",
+ "resources":["{{ service_name }}"],
+ "scope":[
+ "shared,reuse",
+ "shared,create_new"
+ ],
+ "services":[
+ "{{ service_name }}"
+ ],
+ "geography":[],
+ "vnfProperties":[
+ {
+ "attributes":{
+ "modelInvariantId":{"get_param": "model_invariant_id"},
+ "modelVersionId":{"get_param": "model_version_id"},
+ "service-role":"nsi"
+ },
+ "inventoryProvider":"aai",
+ "inventoryType":"nsi",
+ "unique":"true",
+ "defaultAttributes":{
+ "creation_cost" : 0.1
+ }
+ },
+ {
+ "attributes":{
+ "service_profile": {
+ "latency": {"value": {"get_param": "latency"}, "operator": "lte"},
+ "s_nssai": {"value": {"get_param": "s_nssai"}, "operator": "eq"},
+ "resource_sharing_level": {"value": {"get_param": "resource_sharing_level"}, "operator": "eq"},
+ "ue_mobility_level": {"value": {"get_param": "ue_mobility_level"}, "operator": "eq"},
+ "sst": {"value": {"get_param": "sst"}, "operator": "eq"},
+ "max_number_of_ues": {"value": {"get_param": "max_number_of_ues"}, "operator": "eq"}
+ },
+ "subnets": {
+ "CN":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"CN_latency"},
+ "steps":5
+ },
+ "s_nssai":{
+ "values":[
+ {"get_param": "s_nssai"}
+ ]
+ },
+ "sst": {"values":[{"get_param": "sst"}]},
+ "resource_sharing_level": {"values":[{"get_param": "resource_sharing_level"}]},
+ "plmn_id_list": {"values":["39-00"]},
+ "survival_time": {"values":["10"]},
+ "max_number_of_ues": {"values":[{"get_param": "max_number_of_ues"}]},
+ "ue_mobility_level": {"values":[{"get_param": "ue_mobility_level"}]}
+ },
+ "AN":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"AN_latency"},
+ "steps":5
+ },
+ "s_nssai":{
+ "values":[
+ {"get_param": "s_nssai"}
+ ]
+ },
+ "sst": {"values":[{"get_param": "sst"}]},
+ "plmn_id_list": {"values":["39-00"]},
+ "survival_time": {"values":["10"]},
+ "max_number_of_ues": {"values":[{"get_param": "max_number_of_ues"}]},
+ "resource_sharing_level": {"values":[{"get_param": "resource_sharing_level"}]},
+ "ue_mobility_level": {"values":[{"get_param": "ue_mobility_level"}]}
+ },
+ "TN_BH":{
+ "latency":{
+ "max":{"get_param":"latency"},
+ "min":{"get_param":"TN_BH_latency"},
+ "steps":5
+ },
+ "s_nssai": {"values":[{"get_param": "s_nssai"}]},
+ "max_bandwidth": {"values":[1000]},
+ "plmn_id_list": {"values":["39-00"]},
+ "sst": {"values":[{"get_param": "sst"}]}
+ }
+ }
+ },
+ "inventoryProvider":"generator",
+ "inventoryType":"slice_profiles",
+ "unique":"true",
+ "defaultAttributes":{
+ "creation_cost" : 0.9
+ }
+ }
+ ]
+ },
+ "type":"onap.policies.optimization.resource.VnfPolicy",
+ "type_version":"1.0.0",
+ "version":"1.0.0"
+ }
+}