Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyof/foundation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from enum import Enum, IntEnum

# Local source tree imports
from pyof.foundation.exceptions import (BadValueException, PackException,
UnpackException, ValidationError)
from pyof.foundation.exceptions import (
BadValueException, PackException, UnpackException, ValidationError)

# Third-party imports

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x01/asynchronous/packet_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import (BinaryData, Pad, UBInt8, UBInt16,
UBInt32)
from pyof.foundation.basic_types import (
BinaryData, Pad, UBInt8, UBInt16, UBInt32)
from pyof.v0x01.common.constants import NO_BUFFER
from pyof.v0x01.common.header import Header, Type

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x01/common/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# Local source tree imports
from pyof.foundation.base import GenericBitMask, GenericStruct
from pyof.foundation.basic_types import (FixedTypeList, HWAddress, Pad, UBInt8,
UBInt16, UBInt32)
from pyof.foundation.basic_types import (
FixedTypeList, HWAddress, Pad, UBInt8, UBInt16, UBInt32)
from pyof.foundation.constants import UBINT16_MAX_VALUE

# Third-party imports
Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x01/common/flow_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

# Local source tree imports
from pyof.foundation.base import GenericBitMask, GenericStruct
from pyof.foundation.basic_types import (HWAddress, IPAddress, Pad, UBInt8,
UBInt16, UBInt32)
from pyof.foundation.basic_types import (
HWAddress, IPAddress, Pad, UBInt8, UBInt16, UBInt32)

__all__ = ('Match', 'FlowWildCards')

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x01/common/phy_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Local source tree imports
from pyof.foundation.base import GenericBitMask, GenericStruct
from pyof.foundation.basic_types import (Char, FixedTypeList, HWAddress,
UBInt16, UBInt32)
from pyof.foundation.basic_types import (
Char, FixedTypeList, HWAddress, UBInt16, UBInt32)
from pyof.foundation.constants import OFP_MAX_PORT_NAME_LEN

# Third-party imports
Expand Down
8 changes: 4 additions & 4 deletions pyof/v0x01/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
from pyof.v0x01.controller2switch.get_config_request import GetConfigRequest
from pyof.v0x01.controller2switch.packet_out import PacketOut
from pyof.v0x01.controller2switch.port_mod import PortMod
from pyof.v0x01.controller2switch.queue_get_config_reply import \
QueueGetConfigReply
from pyof.v0x01.controller2switch.queue_get_config_request import \
QueueGetConfigRequest
from pyof.v0x01.controller2switch.queue_get_config_reply import (
QueueGetConfigReply)
from pyof.v0x01.controller2switch.queue_get_config_request import (
QueueGetConfigRequest)
from pyof.v0x01.controller2switch.set_config import SetConfig
from pyof.v0x01.controller2switch.stats_reply import StatsReply
from pyof.v0x01.controller2switch.stats_request import StatsRequest
Expand Down
8 changes: 4 additions & 4 deletions pyof/v0x01/controller2switch/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from enum import IntEnum

from pyof.foundation.base import GenericMessage, GenericStruct
from pyof.foundation.basic_types import (Char, Pad, UBInt8, UBInt16, UBInt32,
UBInt64)
from pyof.foundation.constants import (DESC_STR_LEN, OFP_MAX_TABLE_NAME_LEN,
SERIAL_NUM_LEN)
from pyof.foundation.basic_types import (
Char, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.foundation.constants import (
DESC_STR_LEN, OFP_MAX_TABLE_NAME_LEN, SERIAL_NUM_LEN)
# Local source tree imports
from pyof.v0x01.common.action import ListOfActions
from pyof.v0x01.common.flow_match import FlowWildCards, Match
Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/asynchronous/packet_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import (BinaryData, Pad, UBInt8, UBInt16,
UBInt32, UBInt64)
from pyof.foundation.basic_types import (
BinaryData, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.v0x04.common.flow_match import Match
from pyof.v0x04.common.header import Header, Type

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/common/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# Local source tree imports
from pyof.foundation.base import GenericStruct
from pyof.foundation.basic_types import (FixedTypeList, Pad, UBInt8, UBInt16,
UBInt32)
from pyof.foundation.basic_types import (
FixedTypeList, Pad, UBInt8, UBInt16, UBInt32)

# Third-party imports

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/common/flow_instructions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

# Local source tree imports
from pyof.foundation.base import GenericStruct
from pyof.foundation.basic_types import (FixedTypeList, Pad, UBInt8, UBInt16,
UBInt32, UBInt64)
from pyof.foundation.basic_types import (
FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.v0x04.common.action import ListOfActions
from pyof.v0x04.controller2switch.meter_mod import Meter

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/common/port.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Local source tree imports
from pyof.foundation.base import GenericBitMask, GenericStruct
from pyof.foundation.basic_types import (Char, FixedTypeList, HWAddress, Pad,
UBInt32)
from pyof.foundation.basic_types import (
Char, FixedTypeList, HWAddress, Pad, UBInt32)
from pyof.foundation.constants import OFP_MAX_PORT_NAME_LEN

# Third-party imports
Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/common/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# Local source tree imports
from pyof.foundation.base import GenericStruct
from pyof.foundation.basic_types import (BinaryData, FixedTypeList, Pad,
UBInt16, UBInt32)
from pyof.foundation.basic_types import (
BinaryData, FixedTypeList, Pad, UBInt16, UBInt32)

# Third-party imports

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/common/table_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericStruct
from pyof.foundation.basic_types import (Char, FixedTypeList, Pad, UBInt8,
UBInt16, UBInt32, UBInt64)
from pyof.foundation.basic_types import (
Char, FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
# Local source tree imports
from pyof.foundation.constants import OFP_MAX_TABLE_NAME_LEN
from pyof.v0x04.common.action import ListOfActions
Expand Down
8 changes: 4 additions & 4 deletions pyof/v0x04/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
from pyof.v0x04.controller2switch.multipart_request import MultipartRequest
from pyof.v0x04.controller2switch.packet_out import PacketOut
from pyof.v0x04.controller2switch.port_mod import PortMod
from pyof.v0x04.controller2switch.queue_get_config_reply import \
QueueGetConfigReply
from pyof.v0x04.controller2switch.queue_get_config_request import \
QueueGetConfigRequest
from pyof.v0x04.controller2switch.queue_get_config_reply import (
QueueGetConfigReply)
from pyof.v0x04.controller2switch.queue_get_config_request import (
QueueGetConfigRequest)
from pyof.v0x04.controller2switch.role_reply import RoleReply
from pyof.v0x04.controller2switch.role_request import RoleRequest
from pyof.v0x04.controller2switch.set_async import SetAsync
Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/controller2switch/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericMessage, GenericStruct
from pyof.foundation.basic_types import (Char, FixedTypeList, Pad, UBInt8,
UBInt16, UBInt32, UBInt64)
from pyof.foundation.basic_types import (
Char, FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.foundation.constants import OFP_MAX_TABLE_NAME_LEN
from pyof.v0x04.asynchronous.flow_removed import FlowRemovedReason
from pyof.v0x04.asynchronous.packet_in import PacketInReason
Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/controller2switch/group_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import (FixedTypeList, Pad, UBInt8, UBInt16,
UBInt32)
from pyof.foundation.basic_types import (
FixedTypeList, Pad, UBInt8, UBInt16, UBInt32)
from pyof.v0x04.common.header import Header, Type
from pyof.v0x04.controller2switch.common import Bucket

Expand Down
4 changes: 2 additions & 2 deletions pyof/v0x04/controller2switch/meter_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from enum import IntEnum

from pyof.foundation.base import GenericBitMask, GenericMessage
from pyof.foundation.basic_types import (FixedTypeList, GenericStruct, Pad,
UBInt8, UBInt16, UBInt32)
from pyof.foundation.basic_types import (
FixedTypeList, GenericStruct, Pad, UBInt8, UBInt16, UBInt32)
from pyof.v0x04.common.header import Header, Type

__all__ = ('MeterMod', 'Meter', 'MeterModCommand', 'MeterFlags',
Expand Down
14 changes: 7 additions & 7 deletions pyof/v0x04/controller2switch/multipart_reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

# Local source tree imports
from pyof.foundation.base import GenericBitMask, GenericMessage, GenericStruct
from pyof.foundation.basic_types import (BinaryData, Char, FixedTypeList, Pad,
UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.foundation.basic_types import (
BinaryData, Char, FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.foundation.constants import DESC_STR_LEN, SERIAL_NUM_LEN
from pyof.v0x04.common.flow_match import Match
from pyof.v0x04.common.header import Header, Type
from pyof.v0x04.common.port import Port
from pyof.v0x04.controller2switch.common import (Bucket, BucketCounter,
ExperimenterMultipartHeader,
MultipartTypes, TableFeatures)
from pyof.v0x04.controller2switch.meter_mod import (ListOfMeterBandHeader,
MeterBandType, MeterFlags)
from pyof.v0x04.controller2switch.common import (
Bucket, BucketCounter, ExperimenterMultipartHeader, MultipartTypes,
TableFeatures)
from pyof.v0x04.controller2switch.meter_mod import (
ListOfMeterBandHeader, MeterBandType, MeterFlags)

# Third-party imports

Expand Down
8 changes: 4 additions & 4 deletions pyof/v0x04/controller2switch/multipart_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

# Local source tree imports
from pyof.foundation.base import GenericMessage, GenericStruct
from pyof.foundation.basic_types import (BinaryData, FixedTypeList, Pad,
UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.foundation.basic_types import (
BinaryData, FixedTypeList, Pad, UBInt8, UBInt16, UBInt32, UBInt64)
from pyof.v0x04.common.flow_match import Match
from pyof.v0x04.common.header import Header, Type
from pyof.v0x04.controller2switch.common import (ExperimenterMultipartHeader,
MultipartTypes, TableFeatures)
from pyof.v0x04.controller2switch.common import (
ExperimenterMultipartHeader, MultipartTypes, TableFeatures)

# Third-party imports

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ ignore = D105,D203,D213,I0011

[isort]
known_first_party = pyof
multi_line_output = 4
5 changes: 2 additions & 3 deletions tests/v0x01/test_asynchronous/test_error_msg.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
"""Testing Error Message."""
from pyof.foundation.basic_types import BinaryData
from pyof.v0x01.asynchronous.error_msg import (BadRequestCode, ErrorMsg,
ErrorType)

from pyof.v0x01.asynchronous.error_msg import (
BadRequestCode, ErrorMsg, ErrorType)
from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_asynchronous/test_flow_removed.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pyof.foundation.basic_types import HWAddress, IPAddress
from pyof.v0x01.asynchronous.flow_removed import FlowRemoved, FlowRemovedReason
from pyof.v0x01.common.flow_match import Match

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_asynchronous/test_packet_in.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Packet in message tests."""
from pyof.v0x01.asynchronous.packet_in import PacketIn, PacketInReason

from tests.test_struct import TestStruct


Expand Down
5 changes: 2 additions & 3 deletions tests/v0x01/test_asynchronous/test_port_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from pyof.foundation.basic_types import HWAddress
from pyof.foundation.constants import OFP_MAX_PORT_NAME_LEN
from pyof.v0x01.asynchronous.port_status import PortReason, PortStatus
from pyof.v0x01.common.phy_port import (PhyPort, PortConfig, PortFeatures,
PortState)

from pyof.v0x01.common.phy_port import (
PhyPort, PortConfig, PortFeatures, PortState)
from tests.test_struct import TestStruct


Expand Down
9 changes: 3 additions & 6 deletions tests/v0x01/test_common/test_action.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
"""Testing Port structures."""
from pyof.v0x01.common.action import (ActionDLAddr, ActionEnqueue,
ActionNWAddr, ActionNWTos, ActionOutput,
ActionTPPort, ActionType,
ActionVendorHeader, ActionVlanPCP,
ActionVlanVid)
from pyof.v0x01.common.action import (
ActionDLAddr, ActionEnqueue, ActionNWAddr, ActionNWTos, ActionOutput,
ActionTPPort, ActionType, ActionVendorHeader, ActionVlanPCP, ActionVlanVid)
from pyof.v0x01.common.phy_port import Port

from tests.test_struct import TestStruct


Expand Down
4 changes: 2 additions & 2 deletions tests/v0x01/test_common/test_phy_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from unittest import TestCase, skip

from pyof.foundation.constants import OFP_MAX_PORT_NAME_LEN
from pyof.v0x01.common.phy_port import (PhyPort, PortConfig, PortFeatures,
PortState)
from pyof.v0x01.common.phy_port import (
PhyPort, PortConfig, PortFeatures, PortState)


class TestPhyPort(TestCase):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Test for AggregateStatsReply message."""
from pyof.v0x01.controller2switch.common import AggregateStatsReply, StatsTypes
from pyof.v0x01.controller2switch.stats_reply import StatsReply

from tests.test_struct import TestStruct


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
"""Test AggregateStatsRequest message."""
from pyof.v0x01.common.flow_match import Match
from pyof.v0x01.common.phy_port import Port
from pyof.v0x01.controller2switch.common import (AggregateStatsRequest,
StatsTypes)
from pyof.v0x01.controller2switch.common import (
AggregateStatsRequest, StatsTypes)
from pyof.v0x01.controller2switch.stats_request import StatsRequest

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_barrier_reply.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Barrier reply message tests."""
from pyof.v0x01.controller2switch.barrier_reply import BarrierReply

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_barrier_request.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Barrier request message tests."""
from pyof.v0x01.controller2switch.barrier_request import BarrierRequest

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_desc_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pyof.foundation.constants import DESC_STR_LEN
from pyof.v0x01.controller2switch.common import DescStats, StatsTypes
from pyof.v0x01.controller2switch.stats_reply import StatsReply

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_features_reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pyof.foundation.basic_types import DPID, HWAddress
from pyof.v0x01.common.phy_port import PhyPort, PortConfig, PortState
from pyof.v0x01.controller2switch.features_reply import FeaturesReply

from tests.test_struct import TestStruct


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Feature request message tests."""
from pyof.v0x01.controller2switch.features_request import FeaturesRequest

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_flow_mod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pyof.v0x01.common.flow_match import Match
from pyof.v0x01.common.phy_port import Port
from pyof.v0x01.controller2switch.flow_mod import FlowMod, FlowModCommand

from tests.test_struct import TestStruct


Expand Down
1 change: 0 additions & 1 deletion tests/v0x01/test_controller2switch/test_flow_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pyof.v0x01.common.flow_match import Match
from pyof.v0x01.controller2switch.common import FlowStats, StatsTypes
from pyof.v0x01.controller2switch.stats_reply import StatsReply

from tests.test_struct import TestStruct


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from pyof.v0x01.common.flow_match import Match
from pyof.v0x01.controller2switch.common import FlowStatsRequest, StatsTypes
from pyof.v0x01.controller2switch.stats_request import StatsRequest

from tests.test_struct import TestStruct


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Test GetConfigReply message."""
from pyof.v0x01.controller2switch.common import ConfigFlags
from pyof.v0x01.controller2switch.get_config_reply import GetConfigReply

from tests.test_struct import TestStruct


Expand Down
Loading