summaryrefslogtreecommitdiffstats
path: root/products/onap-elalto/features/policy
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2019-09-05 14:13:14 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-05 14:13:14 +0000
commit97830fdd6e1b596219f8759716c75776ba10121f (patch)
treeb5ce2406b4ee1a10789e79cf69589139e5be0e18 /products/onap-elalto/features/policy
parentadb874aeda2b111ea400a317c3721eca0f9406a5 (diff)
parentf6fe68640504b45ef723d37bd2ebee1b7896c02f (diff)
Merge changes I443a9bf0,Ic4abcab2,Ic08c4594,If494672d
* changes: Added sample for policy-type-list-with-latest-version command Added command to get latest version of specified policy type Added sample for policy-statistics command Added command to get policy statistics
Diffstat (limited to 'products/onap-elalto/features/policy')
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-moco.json35
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-sample.yaml58
-rw-r--r--products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-statistics-schema-elalto.yaml124
3 files changed, 217 insertions, 0 deletions
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-moco.json b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-moco.json
new file mode 100644
index 00000000..e9915aab
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-moco.json
@@ -0,0 +1,35 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/policy/api/v1/statistics",
+ "headers" : {
+ "Authorization" : "Basic aGVhbHRoY2hlY2s6emIhWHp0RzM0",
+ "Accept" : "application/json",
+ "Environment" : "TEST",
+ "ClientAuth" : "cHl0aG9uOnRlc3Q=",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "code" : 200,
+ "totalApiCallCount" : 4,
+ "apiCallSuccessCount" : 4,
+ "apiCallFailureCount" : 0,
+ "totalPolicyGetCount" : 0,
+ "totalPolicyPostCount" : 0,
+ "totalPolicyTypeGetCount" : 0,
+ "totalPolicyTypePostCount" : 0,
+ "policyGetSuccessCount" : 0,
+ "policyGetFailureCount" : 0,
+ "policyPostSuccessCount" : 0,
+ "policyPostFailureCount" : 0,
+ "policyTypeGetSuccessCount" : 0,
+ "policyTypeGetFailureCount" : 0,
+ "policyTypePostSuccessCount" : 0,
+ "policyTypePostFailureCount" : 0
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-sample.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-sample.yaml
new file mode 100644
index 00000000..d72b2e8e
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-sample/policy/policy-statistics-schema-elalto-sample.yaml
@@ -0,0 +1,58 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_sample_version: 1.0
+name: policy-statistics
+version: onap-elalto
+samples:
+ sample1:
+ name: policy-statistics
+ input: -m https://172.16.0.185:6969 -u healthcheck -p zb!XztG34
+ moco: policy-statistics-schema-elalto-moco.json
+ output: |
+ +----------------------------+--------+
+ |property |value |
+ +----------------------------+--------+
+ |code |200 |
+ +----------------------------+--------+
+ |totalApiCallCount |4 |
+ +----------------------------+--------+
+ |apiCallSuccessCount |4 |
+ +----------------------------+--------+
+ |apiCallFailureCount |0 |
+ +----------------------------+--------+
+ |totalPolicyGetCount |0 |
+ +----------------------------+--------+
+ |totalPolicyPostCount |0 |
+ +----------------------------+--------+
+ |totalPolicyTypeGetCount |0 |
+ +----------------------------+--------+
+ |totalPolicyTypePostCount |0 |
+ +----------------------------+--------+
+ |policyGetSuccessCount |0 |
+ +----------------------------+--------+
+ |policyGetFailureCount |0 |
+ +----------------------------+--------+
+ |policyPostSuccessCount |0 |
+ +----------------------------+--------+
+ |policyPostFailureCount |0 |
+ +----------------------------+--------+
+ |policyTypeGetSuccessCount |0 |
+ +----------------------------+--------+
+ |policyTypeGetFailureCount |0 |
+ +----------------------------+--------+
+ |policyTypePostSuccessCount |0 |
+ +----------------------------+--------+
+ |policyTypePostFailureCount |0 |
+ +----------------------------+--------+ \ No newline at end of file
diff --git a/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-statistics-schema-elalto.yaml b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-statistics-schema-elalto.yaml
new file mode 100644
index 00000000..cb252788
--- /dev/null
+++ b/products/onap-elalto/features/policy/src/main/resources/open-cli-schema/policy/policy-statistics-schema-elalto.yaml
@@ -0,0 +1,124 @@
+# Copyright 2019 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: policy-statistics
+description: Returns current statistics including the counters of API invocation
+
+info:
+ product: onap-elalto
+ service: policy
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: portrait
+ attributes:
+ - name: code
+ description: code
+ scope: short
+ type: string
+ - name: totalApiCallCount
+ description: total api call count
+ scope: short
+ type: string
+ - name: apiCallSuccessCount
+ description: api call success count
+ scope: short
+ type: string
+ - name: apiCallFailureCount
+ description: api call failure count
+ scope: short
+ type: string
+ - name: totalPolicyGetCount
+ description: total policy get count
+ scope: short
+ type: string
+ - name: totalPolicyPostCount
+ description: total policy post count
+ scope: short
+ type: string
+ - name: totalPolicyTypeGetCount
+ description: total policy type get count
+ scope: short
+ type: string
+ - name: totalPolicyTypePostCount
+ description: total policy type post count
+ scope: short
+ type: string
+ - name: policyGetSuccessCount
+ description: policy get success count
+ scope: short
+ type: string
+ - name: policyGetFailureCount
+ description: policy get failure count
+ scope: short
+ type: string
+ - name: policyPostSuccessCount
+ description: policy post success count
+ scope: short
+ type: string
+ - name: policyPostFailureCount
+ description: policy post failure count
+ scope: short
+ type: string
+ - name: policyTypeGetSuccessCount
+ description: policy type get success count
+ scope: short
+ type: string
+ - name: policyTypeGetFailureCount
+ description: policy type get failure count
+ scope: short
+ type: string
+ - name: policyTypePostSuccessCount
+ description: policy type post success count
+ scope: short
+ type: string
+ - name: policyTypePostFailureCount
+ description: policy type post failure count
+ scope: short
+ type: string
+
+http:
+ service:
+ name: policy
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /policy/api/v1/statistics
+ method: GET
+ headers:
+ Accept: application/json
+ Environment: TEST
+
+ success_codes:
+ - 200
+
+ result_map:
+ code: $b{$.code}
+ totalApiCallCount: $b{$.totalApiCallCount}
+ apiCallSuccessCount: $b{$.apiCallSuccessCount}
+ apiCallFailureCount: $b{$.apiCallFailureCount}
+ totalPolicyGetCount: $b{$.totalPolicyGetCount}
+ totalPolicyPostCount: $b{$.totalPolicyPostCount}
+ totalPolicyTypeGetCount: $b{$.totalPolicyTypeGetCount}
+ totalPolicyTypePostCount: $b{$.totalPolicyTypePostCount}
+ policyGetSuccessCount: $b{$.policyGetSuccessCount}
+ policyGetFailureCount: $b{$.policyGetFailureCount}
+ policyPostSuccessCount: $b{$.policyPostSuccessCount}
+ policyPostFailureCount: $b{$.policyPostFailureCount}
+ policyTypeGetSuccessCount: $b{$.policyTypeGetSuccessCount}
+ policyTypeGetFailureCount: $b{$.policyTypeGetFailureCount}
+ policyTypePostSuccessCount: $b{$.policyTypePostSuccessCount}
+ policyTypePostFailureCount: $b{$.policyTypePostFailureCount}