refactor test_alarm_plugins module

Bug #1636964 reported by Sundaresan Rajangam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Medium
Sundaresan Rajangam
R3.2
Fix Committed
Medium
Sundaresan Rajangam
Trunk
Fix Committed
Medium
Sundaresan Rajangam

Bug Description

Refactor test_alarm_plugins module for better readability and ease of maintenance.

For example:

output=TestOutput(or_list=[
                    {
                        'and_list': [
                            ('ContrailConfig.elements.bgp_router_parameters' +\
                                '.address not in BgpRouterState.' +\
                                'bgp_router_ip_list', None,
                             [('null', '["10.1.1.1"]', None)])
                        ]
                    }
                ])

should be replaced with

output=TestOutput(or_list=[
    {
        'and_list': [
            'condition': {
                'operand1': 'ContrailConfig.elements.bgp_router_parameters.address',
                'operand2': {
                    'uve_attribute': 'BgpRouterState.bgp_router_ip_list'
                },
                'operation': 'not in'
            },
            'match': [
                {
                     'json_operand1_value': 'null',
                     'json_operand2_value': '["10.1.1.1"]'
                }
            ]
        ]
    }
])

Tags: analytics
information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/25668
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/25670
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/25684
Submitter: Sundaresan Rajangam (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/25684
Committed: http://github.org/Juniper/contrail-controller/commit/946db10bb04d727e957e0700bc95e94ab89b7615
Submitter: Zuul
Branch: R3.1

commit 946db10bb04d727e957e0700bc95e94ab89b7615
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Nov 3 15:12:22 2016 -0700

Refactor test_alarm_plugins module

The output format has been restructured to match the sandesh alarm
structure for better readability and avoid unnecessary parsing of alarm
rule.

Change-Id: I288c7f78aa5c25f7fa94dd8f9236e71228901fd9
Closes-Bug: #1636964
(cherry picked from commit 970908c91096d4611988c36b0b063b8c8f297978)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/25670
Committed: http://github.org/Juniper/contrail-controller/commit/34892de58313dfd675853e1876785a3dfe7094be
Submitter: Zuul
Branch: R3.2

commit 34892de58313dfd675853e1876785a3dfe7094be
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Nov 3 15:12:22 2016 -0700

Refactor test_alarm_plugins module

The output format has been restructured to match the sandesh alarm
structure for better readability and avoid unnecessary parsing of alarm
rule.

Change-Id: I288c7f78aa5c25f7fa94dd8f9236e71228901fd9
Closes-Bug: #1636964
(cherry picked from commit 970908c91096d4611988c36b0b063b8c8f297978)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/25668
Committed: http://github.org/Juniper/contrail-controller/commit/970908c91096d4611988c36b0b063b8c8f297978
Submitter: Zuul
Branch: master

commit 970908c91096d4611988c36b0b063b8c8f297978
Author: Sundaresan Rajangam <email address hidden>
Date: Thu Nov 3 15:12:22 2016 -0700

Refactor test_alarm_plugins module

The output format has been restructured to match the sandesh alarm
structure for better readability and avoid unnecessary parsing of alarm
rule.

Change-Id: I288c7f78aa5c25f7fa94dd8f9236e71228901fd9
Closes-Bug: #1636964

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.