X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FClassify.py;h=d0a5804bf8a85f3f08b7af4fed17442f85c074cf;hp=ef140681d807b5e178e180dfd923eecdfe23cc4b;hb=005e7e00d0e9b9d4c0796c998b88d639ee316033;hpb=4e249c36f388a3c030ba83bd3aed8b38ebf54af4 diff --git a/resources/libraries/python/Classify.py b/resources/libraries/python/Classify.py index ef140681d8..d0a5804bf8 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: + # 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