[VOL-3703] Performance Monitoring Attributes test
Currently test suite contains three test cases:
1. Test of pm data with default values
2. Test of pm data with user values
3. Test of pm data for disabled devices
Test 1 runs about 35 minutes.
Test 2 runs about 2 minutes.
Test 3 runs about 4 minutes
The suite is designed in a generic way. It collects all values to check by itself.
Further validation data can be passed via yaml file like ../data/pm-data.yaml
To have a determined state of devices a Sanity Check will be executed first.
Actually commands 'voltctl device pmconfig group list ...' printout the intvals without time unit.
Therefore some workarounds still included in this patch!
Change-Id: If115e85471221c321e8764cc890af583090189b2
diff --git a/tests/data/pm-data.yaml b/tests/data/pm-data.yaml
new file mode 100755
index 0000000..2203531
--- /dev/null
+++ b/tests/data/pm-data.yaml
@@ -0,0 +1,72 @@
+---
+
+# Copyright 2021-present Open Networking Foundation
+#
+# 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.
+
+# Automated deployment configuration for kind-voltha running BBSim
+
+# Pm user validation and precondition data for validation of received
+# pm-data elements from open-onu-go-adapter.
+# This file contains special validation data, which differs from default
+# validation data.
+# Following operators are valid: in, range, ==, !=, <, <=, >, >=
+# In case of operator is 'in' or 'range' second value has to be a list (array)
+
+pm_user_validation_data:
+ UNI_Status:
+ me_class_id:
+ firstoperator: in
+ firstvalue:
+ - 11
+ - 264
+ - 329
+ successoroperator: ==
+ successorvalue: previous
+ oper_status:
+ firstoperator: range
+ firstvalue:
+ - 0
+ - 1
+ successoroperator: range
+ successorvalue:
+ - 0
+ - 1
+ uni_admin_state:
+ firstoperator: range
+ firstvalue:
+ - 0
+ - 1
+ successoroperator: range
+ successorvalue:
+ - 0
+ - 1
+ sensed_type:
+ firstoperator: range
+ firstvalue:
+ - 0
+ - 255
+ successoroperator: ==
+ successorvalue: previous
+pm_user_precondition_data:
+ UNI_Status:
+ sensed_type:
+ operator: ==
+ value: 11
+ precondelement: me_class_id
+ oper_status:
+ operator: in
+ value:
+ - 11
+ - 329
+ precondelement: me_class_id