X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FClassify.py;h=e4fa2a308776430e00ece0476916f4a44bc6d88c;hp=ef140681d807b5e178e180dfd923eecdfe23cc4b;hb=93f31102f8404b52b58a98e46c9c1c8eea7e2e67;hpb=cf561a6e3d4c4fbd78ab6c9d0a9aa817bb3300fc diff --git a/resources/libraries/python/Classify.py b/resources/libraries/python/Classify.py index ef140681d8..e4fa2a3087 100644 --- a/resources/libraries/python/Classify.py +++ b/resources/libraries/python/Classify.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. +# Copyright (c) 2017 Cisco and/or its affiliates. # 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: @@ -363,3 +363,34 @@ class Classify(object): return data[0][session_index] else: return data[0] + + @staticmethod + def vpp_log_plugin_acl_settings(node): + """Retrieve configured settings from the ACL plugin + and write to robot log. + + :param node: VPP node. + :type node: dict + """ + try: + VatExecutor.cmd_from_template( + node, "acl_plugin/acl_dump.vat") + except (ValueError, RuntimeError): + # Fails to parse JSON data in response, but it is still logged + pass + + @staticmethod + def vpp_log_plugin_acl_interface_assignment(node): + """Retrieve interface assignment from the ACL plugin + and write to robot log. + + :param node: VPP node. + :type node: dict + """ + + try: + VatExecutor.cmd_from_template( + node, "acl_plugin/acl_interface_dump.vat", json_out=False) + except RuntimeError: + # Fails to parse response, but it is still logged + pass