Reformat with blcak 25.1.0 - to match GitHub
Some checks failed
Lint / lint (push) Has been cancelled
Some checks failed
Lint / lint (push) Has been cancelled
This commit is contained in:
@ -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"""
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
""" module to help locate unittest resources """
|
||||
"""module to help locate unittest resources"""
|
||||
|
||||
#!/usr/bin/env python
|
||||
#
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"""
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user