diff options
author | Itohan <itohan.ukponmwan@intel.com> | 2019-09-30 23:39:44 +0000 |
---|---|---|
committer | Itohan <itohan.ukponmwan@intel.com> | 2019-10-01 17:42:35 +0000 |
commit | a52f00e9d0af1181d3e9c87508789fb4ced022f5 (patch) | |
tree | dfb05a7683f0cecf86783d0623dbcf1b85ade70d /products/onap-elalto/features/policy | |
parent | 1d4b83754009114523cae90c759daffa9188eb3e (diff) |
Minor bug fixes in CLI
- Added USER_ID header for SDC
- Changed multicloud url
- Added samples for commands
- Fixed Bug in service-create command
Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
Issue-ID: CLI-229
Change-Id: I9ec94d6dd390d2b5bf059c2f8a82c67b65fbeb34
Diffstat (limited to 'products/onap-elalto/features/policy')
6 files changed, 296 insertions, 0 deletions
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-moco.json new file mode 100644 index 00000000..2bf89daf --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-moco.json @@ -0,0 +1,24 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/pdp/api/createPolicy", + "headers" : { + "Authorization" : "Basic dGVzdHBkcDphbHBoYTEyMw==", + "Accept" : "text/plain", + "Environment" : "TEST", + "ClientAuth" : "cHl0aG9uOnRlc3Q=", + "Content-Type" : "application/json" + }, + "json" : { + "policyName" : "OSDF_CASABLANCA.hpa_policy_vFWHPA_2", + "policyConfigType" : "MicroService", + "policyScope" : "OSDF_DUBLIN", + "onapName" : "SampleDemo", + "configBody" : "{\"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\",\"HpaVf0\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"}" + } + }, + "response" : { + "status" : 200, + "json" : { } + } +} ]
\ No newline at end of file diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-sample.yaml new file mode 100644 index 00000000..95965d50 --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-create-schema-outdated-elalto-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: policy-create-outdated +version: onap-elalto +samples: + sample1: + name: policy-create-outdated + input: -m https://10.12.5.110:30694 -u testpdp -p alpha123 -x OSDF_CASABLANCA.hpa_policy_vFWHPA_2 -S OSDF_DUBLIN -T MicroService -o SampleDemo -b {\"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\",\"HpaVf0\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"} + moco: policy-create-schema-outdated-elalto-moco.json + output:
\ No newline at end of file diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-moco.json new file mode 100644 index 00000000..54f2ee41 --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-moco.json @@ -0,0 +1,106 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/pdp/api/getConfig", + "headers" : { + "Authorization" : "Basic dGVzdHBkcDphbHBoYTEyMw==", + "Accept" : "application/json", + "Environment" : "TEST", + "ClientAuth" : "cHl0aG9uOnRlc3Q=", + "Content-Type" : "application/json" + }, + "json" : { + "configAttributes" : { }, + "policyName" : ".*" + } + }, + "response" : { + "status" : 200, + "json" : [ { + "policyConfigMessage" : "Config Retrieved! ", + "policyConfigStatus" : "CONFIG_RETRIEVED", + "type" : "JSON", + "config" : "{\"service\":\"vnfPolicy\",\"guard\":\"False\",\"content\":{\"policyType\":\"vnfPolicy\",\"policyScope\":[\"vfw\",\"us\",\"international\",\"ip\"],\"identity\":\"vnf_vFW\",\"resources\":[\"vFW\",\"HpaVf0\"],\"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\"}", + "policyName" : "OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA_3.1.xml", + "policyType" : "MicroService", + "policyVersion" : "1", + "matchingConditions" : { + "ECOMPName" : "SampleDemo", + "ONAPName" : "SampleDemo", + "service" : "vnfPolicy", + "policyScope" : "vfw,us,international,ip", + "policyType" : "vnfPolicy" + }, + "responseAttributes" : { }, + "property" : null + }, { + "policyConfigMessage" : "Config Retrieved! ", + "policyConfigStatus" : "CONFIG_RETRIEVED", + "type" : "JSON", + "config" : "{\"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\",\"HpaVf0\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"DistancePolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.Distance_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"}", + "policyName" : "OSDF_CASABLANCA.Config_MS_Distance_vFWHPA_2.1.xml", + "policyType" : "MicroService", + "policyVersion" : "1", + "matchingConditions" : { + "ECOMPName" : "SampleDemo", + "ONAPName" : "SampleDemo", + "service" : "distancePolicy", + "policyScope" : "vfw,us,international,ip", + "policyType" : "distance_to_location" + }, + "responseAttributes" : { }, + "property" : null + }, { + "policyConfigMessage" : "Config Retrieved! ", + "policyConfigStatus" : "CONFIG_RETRIEVED", + "type" : "JSON", + "config" : "{\"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\",\"HpaVf0\"]},{\"parameter\":\"hpa_score\",\"operator\":\"product\",\"weight\":\"200\",\"resources\":[\"vFW\",\"HpaVf0\"]}]},\"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\"}", + "policyName" : "OSDF_CASABLANCA.Config_MS_Placement_Optimization_3.1.xml", + "policyType" : "MicroService", + "policyVersion" : "1", + "matchingConditions" : { + "ECOMPName" : "SampleDemo", + "ONAPName" : "SampleDemo", + "service" : "optimizationPolicy", + "policyScope" : "vcpe,us,international,ip,vGMuxInfra,vG,vfw", + "policyType" : "placement_optimization" + }, + "responseAttributes" : { }, + "property" : null + }, { + "policyConfigMessage" : "Config Retrieved! ", + "policyConfigStatus" : "CONFIG_RETRIEVED", + "type" : "JSON", + "config" : "{\"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\"}", + "policyName" : "OSDF_CASABLANCA.Config_MS_QueryPolicy_vFWHPA_3.1.xml", + "policyType" : "MicroService", + "policyVersion" : "1", + "matchingConditions" : { + "ECOMPName" : "SampleDemo", + "ONAPName" : "SampleDemo", + "service" : "queryPolicy", + "policyScope" : "vfw,us,international,ip", + "policyType" : "request_param_query" + }, + "responseAttributes" : { }, + "property" : null + }, { + "policyConfigMessage" : "Config Retrieved! ", + "policyConfigStatus" : "CONFIG_RETRIEVED", + "type" : "JSON", + "config" : "{\"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\",\"HpaVf0\"]},\"priority\":\"3\",\"templateVersion\":\"OpenSource.version.1\",\"riskLevel\":\"2\",\"description\":\"HPApolicyforvFW\",\"policyName\":\"OSDF_CASABLANCA.hpa_policy_vFWHPA_2\",\"version\":\"test1\",\"riskType\":\"test\"}", + "policyName" : "OSDF_CASABLANCA.Config_MS_hpa_policy_vFWHPA_2.1.xml", + "policyType" : "MicroService", + "policyVersion" : "1", + "matchingConditions" : { + "ECOMPName" : "SampleDemo", + "ONAPName" : "SampleDemo", + "service" : "hpaPolicy", + "policyScope" : "vfw,us,international,ip", + "policyType" : "hpa" + }, + "responseAttributes" : { }, + "property" : null + } ] + } +} ]
\ No newline at end of file diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-sample.yaml new file mode 100644 index 00000000..e97e97c0 --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-list-outdated-schema-elalto-sample.yaml @@ -0,0 +1,126 @@ +open_cli_sample_version: 1.0 +name: policy-list-outdated +version: onap-elalto +samples: + sample1: + name: policy-list-outdated + input: -m https://10.12.5.110:30694 -u testpdp -p alpha123 + moco: policy-list-outdated-schema-elalto-moco.json + output: | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |name |type |config | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |OSDF_CASABLANCA.Config_MS_vnfPolicy_vFWHPA_3.1.xml |MicroService |{"service":"vnfPolicy","guard":"False","content":{ | + | | |"policyType":"vnfPolicy","policyScope":["vfw","us" | + | | |,"international","ip"],"identity":"vnf_vFW","resou | + | | |rces":["vFW","HpaVf0"],"applicableResources":"any" | + | | |,"vnfProperties":[{"equipmentRole":"","inventoryPr | + | | |ovider":"aai","inventoryType":"cloud","serviceType | + | | |":"","customerId":"","orchestrationStatus":""}]}," | + | | |priority":"6","templateVersion":"OpenSource.versio | + | | |n.1","riskLevel":"3","description":"vnfPolicy","po | + | | |licyName":"OSDF_CASABLANCA.vnfPolicy_vFWHPA_3","ve | + | | |rsion":"test1","riskType":"test"} | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |OSDF_CASABLANCA.Config_MS_Distance_vFWHPA_2.1.xml |MicroService |{"service":"distancePolicy","guard":"False","conte | + | | |nt":{"policyType":"distance_to_location","applicab | + | | |leResources":"any","identity":"distance-vFW","poli | + | | |cyScope":["vfw","us","international","ip"],"distan | + | | |ceProperties":{"distance":{"value":"100","unit":"k | + | | |m","operator":"<"},"locationInfo":"customer_loc"}, | + | | |"resources":["vFW","HpaVf0"]},"priority":"3","temp | + | | |lateVersion":"OpenSource.version.1","riskLevel":"2 | + | | |","description":"DistancePolicyforvFW","policyName | + | | |":"OSDF_CASABLANCA.Distance_vFWHPA_2","version":"t | + | | |est1","riskType":"test"} | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |OSDF_CASABLANCA.Config_MS_Placement_Optimization_3 |MicroService |{"service":"optimizationPolicy","guard":"False","c | + |.1.xml | |ontent":{"policyType":"placement_optimization","ob | + | | |jective":"minimize","objectiveParameter":{"operato | + | | |r":"sum","parameterAttributes":[{"parameter":"dist | + | | |ance","operator":"product","customerLocationInfo": | + | | |"customer_loc","weight":"1","resources":["vGMuxInf | + | | |ra"]},{"parameter":"distance","operator":"product" | + | | |,"customerLocationInfo":"customer_loc","weight":"1 | + | | |","resources":["vG"]},{"parameter":"hpa_score","op | + | | |erator":"product","weight":"200","resources":["vG" | + | | |]},{"parameter":"distance","operator":"product","c | + | | |ustomerLocationInfo":"customer_loc","weight":"100" | + | | |,"resources":["vFW","HpaVf0"]},{"parameter":"hpa_s | + | | |core","operator":"product","weight":"200","resourc | + | | |es":["vFW","HpaVf0"]}]},"identity":"optimization", | + | | |"policyScope":["vcpe","us","international","ip","v | + | | |GMuxInfra","vG","vfw"]},"priority":"5","templateVe | + | | |rsion":"OpenSource.version.1","riskLevel":"3","des | + | | |cription":"PlacementOptimizationPolicyforvGMuxInfr | + | | |a","policyName":"OSDF_CASABLANCA.Placement_Optimiz | + | | |ation_3","version":"test1","riskType":"test"} | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |OSDF_CASABLANCA.Config_MS_QueryPolicy_vFWHPA_3.1.x |MicroService |{"service":"queryPolicy","guard":"False","content" | + |ml | |:{"policyType":"request_param_query","queryPropert | + | | |ies":[{"attribute":"customerLatitude","attribute_l | + | | |ocation":"customerLatitude"},{"attribute":"custome | + | | |rLongitude","attribute_location":"customerLongitud | + | | |e"}],"identity":"vFW_Query_Policy","serviceName":" | + | | |vFW","policyScope":["vfw","us","international","ip | + | | |"]},"priority":"3","templateVersion":"OpenSource.v | + | | |ersion.1","riskLevel":"2","description":"Querypoli | + | | |cyforvFW","policyName":"OSDF_CASABLANCA.QueryPolic | + | | |y_vFWHPA_3","version":"test1","riskType":"test"} | + +----------------------------------------------------+--------------+----------------------------------------------------+ + |OSDF_CASABLANCA.Config_MS_hpa_policy_vFWHPA_2.1.xm |MicroService |{"service":"hpaPolicy","guard":"False","content":{ | + |l | |"flavorFeatures":[{"directives":[{"attributes":[{" | + | | |attribute_value":"","attribute_name":"firewall_fla | + | | |vor_name"}],"type":"flavor_directives"}],"type":"v | + | | |nfc","flavorProperties":[{"mandatory":"True","hpa- | + | | |feature-attributes":[{"hpa-attribute-value":"2","u | + | | |nit":"","operator":"=","hpa-attribute-key":"numVir | + | | |tualCpu"},{"hpa-attribute-value":"512","unit":"MB" | + | | |,"operator":"=","hpa-attribute-key":"virtualMemSiz | + | | |e"}],"directives":[],"hpa-version":"v1","architect | + | | |ure":"generic","hpa-feature":"basicCapabilities"}, | + | | |{"mandatory":"True","hpa-feature-attributes":[{"hp | + | | |a-attribute-value":"2","unit":"MB","operator":"=", | + | | |"hpa-attribute-key":"memoryPageSize"}],"directives | + | | |":[],"hpa-version":"v1","architecture":"generic"," | + | | |hpa-feature":"hugePages"},{"hpa-feature":"localSto | + | | |rage","hpa-version":"v1","architecture":"generic", | + | | |"mandatory":"True","directives":[],"hpa-feature-at | + | | |tributes":[{"hpa-attribute-key":"diskSize","hpa-at | + | | |tribute-value":"10","operator":">=","unit":"GB"}]} | + | | |,{"mandatory":"False","score":"100","directives":[ | + | | |],"hpa-version":"v1","hpa-feature-attributes":[{"h | + | | |pa-attribute-value":"isolate","unit":"","operator" | + | | |:"=","hpa-attribute-key":"logicalCpuThreadPinningP | + | | |olicy"},{"hpa-attribute-value":"dedicated","unit": | + | | |"","operator":"=","hpa-attribute-key":"logicalCpuP | + | | |inningPolicy"}],"architecture":"generic","hpa-feat | + | | |ure":"cpuPinning"}],"id":"vfw"},{"directives":[{"a | + | | |ttributes":[{"attribute_value":"","attribute_name" | + | | |:"packetgen_flavor_name"}],"type":"flavor_directiv | + | | |es"}],"type":"vnfc","flavorProperties":[{"mandator | + | | |y":"True","hpa-feature-attributes":[{"hpa-attribut | + | | |e-value":"1","operator":">=","hpa-attribute-key":" | + | | |numVirtualCpu"},{"hpa-attribute-value":"7","unit": | + | | |"GB","operator":">=","hpa-attribute-key":"virtualM | + | | |emSize"}],"directives":[],"hpa-version":"v1","arch | + | | |itecture":"generic","hpa-feature":"basicCapabiliti | + | | |es"},{"hpa-feature":"localStorage","hpa-version":" | + | | |v1","architecture":"generic","mandatory":"True","d | + | | |irectives":[],"hpa-feature-attributes":[{"hpa-attr | + | | |ibute-key":"diskSize","hpa-attribute-value":"10"," | + | | |operator":">=","unit":"GB"}]}],"id":"vgenerator"}, | + | | |{"directives":[{"attributes":[{"attribute_value":" | + | | |","attribute_name":"sink_flavor_name"}],"type":"fl | + | | |avor_directives"}],"id":"vsink","type":"vnfc","fla | + | | |vorProperties":[{"mandatory":"True","directives":[ | + | | |],"hpa-version":"v1","hpa-feature-attributes":[]," | + | | |architecture":"generic","hpa-feature":"basicCapabi | + | | |lities"}]}],"policyType":"hpa","policyScope":["vfw | + | | |","us","international","ip"],"identity":"hpa-vFW", | + | | |"resources":["vFW","HpaVf0"]},"priority":"3","temp | + | | |lateVersion":"OpenSource.version.1","riskLevel":"2 | + | | |","description":"HPApolicyforvFW","policyName":"OS | + | | |DF_CASABLANCA.hpa_policy_vFWHPA_2","version":"test | + | | |1","riskType":"test"} | + +----------------------------------------------------+--------------+----------------------------------------------------+ diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-moco.json new file mode 100644 index 00000000..ff16b6de --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-moco.json @@ -0,0 +1,22 @@ +[ { + "request" : { + "method" : "put", + "uri" : "/pdp/api/pushPolicy", + "headers" : { + "Authorization" : "Basic dGVzdHBkcDphbHBoYTEyMw==", + "Accept" : "application/json", + "Environment" : "TEST", + "ClientAuth" : "cHl0aG9uOnRlc3Q=", + "Content-Type" : "application/json" + }, + "json" : { + "policyName" : "OSDF_CASABLANCA.hpa_policy_vFWHPA_2", + "policyType" : "MicroService", + "pdpGroup" : "default" + } + }, + "response" : { + "status" : 200, + "json" : { } + } +} ]
\ No newline at end of file diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-sample.yaml new file mode 100644 index 00000000..71cfeaf7 --- /dev/null +++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-push-schema-outdated-elalto-sample.yaml @@ -0,0 +1,9 @@ +open_cli_sample_version: 1.0 +name: policy-push-outdated +version: onap-elalto +samples: + sample1: + name: policy-push-outdated + input: -m https://10.12.5.110:30694 -u testpdp -p alpha123 -x OSDF_CASABLANCA.hpa_policy_vFWHPA_2 -b MicroService -c default + moco: policy-push-schema-outdated-elalto-moco.json + output:
\ No newline at end of file |