aboutsummaryrefslogtreecommitdiffstats
path: root/test/hpa_automation/heat/sample_vfw_policies
diff options
context:
space:
mode:
authorItohan <itohan.ukponmwan@intel.com>2019-05-24 23:52:26 +0000
committerGary Wu <gwu@futurewei.com>2019-05-29 17:23:41 +0000
commit1f3c8d6b67fcfdc0bcb95d3b283b232a4bb56cbb (patch)
treec2e9afce785c164cfad09ccb0e1cbdbe7aaaeb9a /test/hpa_automation/heat/sample_vfw_policies
parentc43f25d5a256091c17d4f15d1c9287906cd4a7b7 (diff)
Modified hpa_automation.py script
-Added more files required to run this script -Added a README file -Added sample hpa polices Issue-ID: INT-905 INT-904 INT-794 Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com> Change-Id: I5c77924863a9517ecaf7caaeb860c3c113a7b9d2
Diffstat (limited to 'test/hpa_automation/heat/sample_vfw_policies')
-rw-r--r--test/hpa_automation/heat/sample_vfw_policies/DistancePolicy.tx1
-rw-r--r--test/hpa_automation/heat/sample_vfw_policies/hpa_policy_test1.txt1
-rw-r--r--test/hpa_automation/heat/sample_vfw_policies/optimization_policy.txt1
-rw-r--r--test/hpa_automation/heat/sample_vfw_policies/query_policy.txt1
-rw-r--r--test/hpa_automation/heat/sample_vfw_policies/vnf_policy.txt1
5 files changed, 5 insertions, 0 deletions
diff --git a/test/hpa_automation/heat/sample_vfw_policies/DistancePolicy.tx b/test/hpa_automation/heat/sample_vfw_policies/DistancePolicy.tx
new file mode 100644
index 000000000..fcea4689b
--- /dev/null
+++ b/test/hpa_automation/heat/sample_vfw_policies/DistancePolicy.tx
@@ -0,0 +1 @@
+{\"service\":\"distancePolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"distance_to_location\",\"applicableResources\":\"any\",\"identity\":\"distance-vFW\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"distanceProperties\":{\"distance\":{\"value\":\"100\",\"unit\":\"km\",\"operator\":\"<\"},\"locationInfo\":\"customer_loc\"},\"resources\":[\"vFW\",\"resource_name\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"DistancePolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.Distance_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"}
diff --git a/test/hpa_automation/heat/sample_vfw_policies/hpa_policy_test1.txt b/test/hpa_automation/heat/sample_vfw_policies/hpa_policy_test1.txt
new file mode 100644
index 000000000..e1567dbbb
--- /dev/null
+++ b/test/hpa_automation/heat/sample_vfw_policies/hpa_policy_test1.txt
@@ -0,0 +1 @@
+{\"service\":\"hpaPolicy\",\"guard\":\"False\",\"content\":{\"flavorFeatures\":[{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"firewall_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"512\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"2\",\"unit\":\"MB\",\"operator\":\"=\",\"hpa-attribute-key\":\"memoryPageSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"hugePages\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]},{\"mandatory\":\"False\",\"score\":\"100\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"isolate\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"logicalCpuThreadPinningPolicy\"},{\"hpa-attribute-value\":\"dedicated\",\"unit\":\"\",\"operator\":\"=\",\"hpa-attribute-key\":\"logicalCpuPinningPolicy\"}],\"architecture\":\"generic\",\"hpa-feature\":\"cpuPinning\"}],\"id\":\"vfw\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"packetgen_flavor_name\"}],\"type\":\"flavor_directives\"}],\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"hpa-feature-attributes\":[{\"hpa-attribute-value\":\"1\",\"operator\":\">=\",\"hpa-attribute-key\":\"numVirtualCpu\"},{\"hpa-attribute-value\":\"7\",\"unit\":\"GB\",\"operator\":\">=\",\"hpa-attribute-key\":\"virtualMemSize\"}],\"directives\":[],\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"},{\"hpa-feature\":\"localStorage\",\"hpa-version\":\"v1\",\"architecture\":\"generic\",\"mandatory\":\"True\",\"directives\":[],\"hpa-feature-attributes\":[{\"hpa-attribute-key\":\"diskSize\",\"hpa-attribute-value\":\"10\",\"operator\":\">=\",\"unit\":\"GB\"}]}],\"id\":\"vgenerator\"},{\"directives\":[{\"attributes\":[{\"attribute_value\":\"\",\"attribute_name\":\"sink_flavor_name\"}],\"type\":\"flavor_directives\"}],\"id\":\"vsink\",\"type\":\"vnfc\",\"flavorProperties\":[{\"mandatory\":\"True\",\"directives\":[],\"hpa-version\":\"v1\",\"hpa-feature-attributes\":[],\"architecture\":\"generic\",\"hpa-feature\":\"basicCapabilities\"}]}],\"policyType\":\"hpa\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"hpa-vFW\",\"resources\":[\"vFW\",\"resource_name\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"}
diff --git a/test/hpa_automation/heat/sample_vfw_policies/optimization_policy.txt b/test/hpa_automation/heat/sample_vfw_policies/optimization_policy.txt
new file mode 100644
index 000000000..24c075be6
--- /dev/null
+++ b/test/hpa_automation/heat/sample_vfw_policies/optimization_policy.txt
@@ -0,0 +1 @@
+{\"service\":\"optimizationPolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"placement_optimization\",\"objective\":\"minimize\",\"objectiveParameter\":{\"operator\":\"sum\",\"parameterAttributes\":[{\"parameter\":\"distance\",\"operator\":\"product\",\"customerLocationInfo\":\"customer_loc\",\"weight\":\"1\",\"resources\":[\"vGMuxInfra\"]},{\"parameter\":\"distance\",\"operator\":\"product\",\"customerLocationInfo\":\"customer_loc\",\"weight\":\"1\",\"resources\":[\"vG\"]},{\"parameter\":\"hpa_score\",\"operator\":\"product\",\"weight\":\"200\",\"resources\":[\"vG\"]},{\"parameter\":\"distance\",\"operator\":\"product\",\"customerLocationInfo\":\"customer_loc\",\"weight\":\"100\",\"resources\":[\"vFW\",\"resource_name\"]},{\"parameter\":\"hpa_score\",\"operator\":\"product\",\"weight\":\"200\",\"resources\":[\"vFW\",\"resource_name\"]}]},\"identity\":\"optimization\",\"policyScope\":[\"vcpe\",\"us\",\"international\",\"ip\",\"vGMuxInfra\",\"vG\",\"vfw\"]},\"priority\":\"5\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"3\",\"description\":\"PlacementOptimizationPolicyforvGMuxInfra\",\"policyName\":\"OSDF_CASABLANCA.Placement_Optimization_3\",\"version\":\"test1\",\"riskType\":\"test\"}
diff --git a/test/hpa_automation/heat/sample_vfw_policies/query_policy.txt b/test/hpa_automation/heat/sample_vfw_policies/query_policy.txt
new file mode 100644
index 000000000..39fb11614
--- /dev/null
+++ b/test/hpa_automation/heat/sample_vfw_policies/query_policy.txt
@@ -0,0 +1 @@
+{\"service\":\"queryPolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"request_param_query\",\"queryProperties\":[{\"attribute\":\"customerLatitude\",\"attribute_location\":\"customerLatitude\"},{\"attribute\":\"customerLongitude\",\"attribute_location\":\"customerLongitude\"}],\"identity\":\"vFW_Query_Policy\",\"serviceName\":\"vFW\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"QuerypolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.QueryPolicy_vFWHPA_3\",\"version\":\"test1\",\"riskType\":\"test\"}
diff --git a/test/hpa_automation/heat/sample_vfw_policies/vnf_policy.txt b/test/hpa_automation/heat/sample_vfw_policies/vnf_policy.txt
new file mode 100644
index 000000000..075c7349e
--- /dev/null
+++ b/test/hpa_automation/heat/sample_vfw_policies/vnf_policy.txt
@@ -0,0 +1 @@
+{\"service\":\"vnfPolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"vnfPolicy\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"vnf_vFW\",\"resources\":[\"vFW\",\"resource_name\"],\"applicableResources\":\"any\",\"vnfProperties\":[{\"equipmentRole\":\"\",\"inventoryProvider\":\"aai\",\"inventoryType\":\"cloud\",\"serviceType\":\"\",\"customerId\":\"\",\"orchestrationStatus\":\"\"}]},\"priority\":\"6\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"3\",\"description\":\"vnfPolicy\",\"policyName\":\"OSDF_CASABLANCA.vnfPolicy_vFWHPA_3\",\"version\":\"test1\",\"riskType\":\"test\"}