diff --git a/vppcfg/__init__.py b/vppcfg/__init__.py index 81d730c..2c24131 100644 --- a/vppcfg/__init__.py +++ b/vppcfg/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" __init__.py added to suppress pylint error """ +"""__init__.py added to suppress pylint error""" diff --git a/vppcfg/config/__init__.py b/vppcfg/config/__init__.py index ee03d65..b969f43 100644 --- a/vppcfg/config/__init__.py +++ b/vppcfg/config/__init__.py @@ -13,7 +13,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" A vppcfg configuration module that exposes its semantic/syntax validators """ +"""A vppcfg configuration module that exposes its semantic/syntax validators""" from __future__ import ( absolute_import, division, diff --git a/vppcfg/config/acl.py b/vppcfg/config/acl.py index cb7242e..3c607cb 100644 --- a/vppcfg/config/acl.py +++ b/vppcfg/config/acl.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates acls """ +"""A vppcfg configuration module that validates acls""" import logging import socket import ipaddress diff --git a/vppcfg/config/address.py b/vppcfg/config/address.py index 2e1fb48..df7c993 100644 --- a/vppcfg/config/address.py +++ b/vppcfg/config/address.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that handles addresses """ +"""A vppcfg configuration module that handles addresses""" import ipaddress diff --git a/vppcfg/config/bondethernet.py b/vppcfg/config/bondethernet.py index f23d55f..ba009e5 100644 --- a/vppcfg/config/bondethernet.py +++ b/vppcfg/config/bondethernet.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that handles bondethernets """ +"""A vppcfg configuration module that handles bondethernets""" import logging from . import interface from . import mac diff --git a/vppcfg/config/bridgedomain.py b/vppcfg/config/bridgedomain.py index 74f5e61..e7b5531 100644 --- a/vppcfg/config/bridgedomain.py +++ b/vppcfg/config/bridgedomain.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that handles bridgedomains """ +"""A vppcfg configuration module that handles bridgedomains""" import logging from . import interface from . import loopback diff --git a/vppcfg/config/interface.py b/vppcfg/config/interface.py index 4edd0d0..f3e9a44 100644 --- a/vppcfg/config/interface.py +++ b/vppcfg/config/interface.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates interfaces """ +"""A vppcfg configuration module that validates interfaces""" import logging from . import bondethernet from . import bridgedomain diff --git a/vppcfg/config/lcp.py b/vppcfg/config/lcp.py index 13a8c35..aef7a79 100644 --- a/vppcfg/config/lcp.py +++ b/vppcfg/config/lcp.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates Linux Control Plane (lcp) elements """ +"""A vppcfg configuration module that validates Linux Control Plane (lcp) elements""" def get_lcps(yaml, interfaces=True, loopbacks=True, bridgedomains=True): diff --git a/vppcfg/config/loopback.py b/vppcfg/config/loopback.py index 343a592..ed0018e 100644 --- a/vppcfg/config/loopback.py +++ b/vppcfg/config/loopback.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates loopbacks """ +"""A vppcfg configuration module that validates loopbacks""" import logging from . import lcp from . import address diff --git a/vppcfg/config/mac.py b/vppcfg/config/mac.py index 1f36e83..39d4e11 100644 --- a/vppcfg/config/mac.py +++ b/vppcfg/config/mac.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates MAC addresses """ +"""A vppcfg configuration module that validates MAC addresses""" import netaddr diff --git a/vppcfg/config/prefixlist.py b/vppcfg/config/prefixlist.py index c034d7c..eb91904 100644 --- a/vppcfg/config/prefixlist.py +++ b/vppcfg/config/prefixlist.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates prefixlists """ +"""A vppcfg configuration module that validates prefixlists""" import logging import ipaddress diff --git a/vppcfg/config/sflow.py b/vppcfg/config/sflow.py index b220e4b..595a0ff 100644 --- a/vppcfg/config/sflow.py +++ b/vppcfg/config/sflow.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates sflow config """ +"""A vppcfg configuration module that validates sflow config""" import logging diff --git a/vppcfg/config/tap.py b/vppcfg/config/tap.py index 3c482a6..13ac5d7 100644 --- a/vppcfg/config/tap.py +++ b/vppcfg/config/tap.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates taps """ +"""A vppcfg configuration module that validates taps""" import logging from . import mac diff --git a/vppcfg/config/test_acl.py b/vppcfg/config/test_acl.py index 524dcae..eeb88b2 100644 --- a/vppcfg/config/test_acl.py +++ b/vppcfg/config/test_acl.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for taps """ +"""Unit tests for taps""" import unittest import yaml from . import acl diff --git a/vppcfg/config/test_address.py b/vppcfg/config/test_address.py index dd4c354..dd60e7e 100644 --- a/vppcfg/config/test_address.py +++ b/vppcfg/config/test_address.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for addresses """ +"""Unit tests for addresses""" import unittest import yaml from . import address diff --git a/vppcfg/config/test_bondethernet.py b/vppcfg/config/test_bondethernet.py index 8871ddf..7e56342 100644 --- a/vppcfg/config/test_bondethernet.py +++ b/vppcfg/config/test_bondethernet.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for bondethernet """ +"""Unit tests for bondethernet""" import unittest import yaml from . import bondethernet diff --git a/vppcfg/config/test_bridgedomain.py b/vppcfg/config/test_bridgedomain.py index 5af3040..466a238 100644 --- a/vppcfg/config/test_bridgedomain.py +++ b/vppcfg/config/test_bridgedomain.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for bridgedomains """ +"""Unit tests for bridgedomains""" import unittest import yaml from . import bridgedomain diff --git a/vppcfg/config/test_interface.py b/vppcfg/config/test_interface.py index 02a2cee..0b735be 100644 --- a/vppcfg/config/test_interface.py +++ b/vppcfg/config/test_interface.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for interfaces """ +"""Unit tests for interfaces""" import unittest import yaml from . import interface diff --git a/vppcfg/config/test_lcp.py b/vppcfg/config/test_lcp.py index 1badeea..721e82e 100644 --- a/vppcfg/config/test_lcp.py +++ b/vppcfg/config/test_lcp.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for LCPs """ +"""Unit tests for LCPs""" import unittest import yaml from . import lcp diff --git a/vppcfg/config/test_loopback.py b/vppcfg/config/test_loopback.py index 7b0345c..e37e1d7 100644 --- a/vppcfg/config/test_loopback.py +++ b/vppcfg/config/test_loopback.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for loopbacks """ +"""Unit tests for loopbacks""" import unittest import yaml from . import loopback diff --git a/vppcfg/config/test_mac.py b/vppcfg/config/test_mac.py index 545481c..786e86b 100644 --- a/vppcfg/config/test_mac.py +++ b/vppcfg/config/test_mac.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for MAC addresses """ +"""Unit tests for MAC addresses""" import unittest from . import mac diff --git a/vppcfg/config/test_prefixlist.py b/vppcfg/config/test_prefixlist.py index 2f7013f..6c49815 100644 --- a/vppcfg/config/test_prefixlist.py +++ b/vppcfg/config/test_prefixlist.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for taps """ +"""Unit tests for taps""" import unittest import yaml from . import prefixlist diff --git a/vppcfg/config/test_tap.py b/vppcfg/config/test_tap.py index 65775f8..6d982e5 100644 --- a/vppcfg/config/test_tap.py +++ b/vppcfg/config/test_tap.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for taps """ +"""Unit tests for taps""" import unittest import yaml from . import tap diff --git a/vppcfg/config/test_vxlan_tunnel.py b/vppcfg/config/test_vxlan_tunnel.py index cdcf081..11c5989 100644 --- a/vppcfg/config/test_vxlan_tunnel.py +++ b/vppcfg/config/test_vxlan_tunnel.py @@ -12,7 +12,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" Unit tests for vxlan_tunnels """ +"""Unit tests for vxlan_tunnels""" import unittest import yaml from . import vxlan_tunnel diff --git a/vppcfg/config/unittestyaml.py b/vppcfg/config/unittestyaml.py index f16a14e..9f85588 100644 --- a/vppcfg/config/unittestyaml.py +++ b/vppcfg/config/unittestyaml.py @@ -1,4 +1,4 @@ -""" module to help locate unittest resources """ +"""module to help locate unittest resources""" #!/usr/bin/env python # diff --git a/vppcfg/config/vxlan_tunnel.py b/vppcfg/config/vxlan_tunnel.py index 9c7202d..be48d75 100644 --- a/vppcfg/config/vxlan_tunnel.py +++ b/vppcfg/config/vxlan_tunnel.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -""" A vppcfg configuration module that validates vxlan_tunnels """ +"""A vppcfg configuration module that validates vxlan_tunnels""" import logging import ipaddress diff --git a/vppcfg/tests.py b/vppcfg/tests.py index fcbc076..2dccbcb 100755 --- a/vppcfg/tests.py +++ b/vppcfg/tests.py @@ -13,7 +13,7 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" This is a unit test suite for vppcfg """ +"""This is a unit test suite for vppcfg""" # pylint: disable=duplicate-code import os import sys diff --git a/vppcfg/vpp/__init__.py b/vppcfg/vpp/__init__.py index 81d730c..2c24131 100644 --- a/vppcfg/vpp/__init__.py +++ b/vppcfg/vpp/__init__.py @@ -13,4 +13,4 @@ # limitations under the License. # # -*- coding: utf-8 -*- -""" __init__.py added to suppress pylint error """ +"""__init__.py added to suppress pylint error""" diff --git a/vppcfg/vpp/dumper.py b/vppcfg/vpp/dumper.py index fdd7889..52d5788 100644 --- a/vppcfg/vpp/dumper.py +++ b/vppcfg/vpp/dumper.py @@ -309,9 +309,9 @@ class Dumper(VPPApi): acl_rule.srcport_or_icmptype_first ) else: - config_term[ - "icmp-type" - ] = f"{acl_rule.srcport_or_icmptype_first}-{maxval}" + config_term["icmp-type"] = ( + f"{acl_rule.srcport_or_icmptype_first}-{maxval}" + ) maxval = acl_rule.dstport_or_icmpcode_last if maxval > 255: @@ -324,9 +324,9 @@ class Dumper(VPPApi): acl_rule.dstport_or_icmpcode_first ) else: - config_term[ - "icmp-code" - ] = f"{acl_rule.dstport_or_icmpcode_first}-{maxval}" + config_term["icmp-code"] = ( + f"{acl_rule.dstport_or_icmpcode_first}-{maxval}" + ) elif acl_rule.proto in [6, 17]: if acl_rule.proto == 6: config_term["protocol"] = "tcp" @@ -340,9 +340,9 @@ class Dumper(VPPApi): acl_rule.srcport_or_icmptype_first ) else: - config_term[ - "source-port" - ] = f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}" + config_term["source-port"] = ( + f"{acl_rule.srcport_or_icmptype_first}-{acl_rule.srcport_or_icmptype_last}" + ) if ( acl_rule.dstport_or_icmpcode_first == acl_rule.dstport_or_icmpcode_last @@ -351,9 +351,9 @@ class Dumper(VPPApi): acl_rule.dstport_or_icmpcode_first ) else: - config_term[ - "destination-port" - ] = f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}" + config_term["destination-port"] = ( + f"{acl_rule.dstport_or_icmpcode_first}-{acl_rule.dstport_or_icmpcode_last}" + ) else: config_term["protocol"] = int(acl_rule.proto) diff --git a/vppcfg/vppcfg.py b/vppcfg/vppcfg.py index 24ea237..9b960b2 100755 --- a/vppcfg/vppcfg.py +++ b/vppcfg/vppcfg.py @@ -14,7 +14,7 @@ # # -*- coding: utf-8 -*- """vppcfg is a utility to configure a running VPP Dataplane using YAML -config files. See http://github.com/pimvanpelt/vppcfg/README.md for details. """ +config files. See http://github.com/pimvanpelt/vppcfg/README.md for details.""" # pylint: disable=duplicate-code import os import sys