Skip to content

Commit

Permalink
[port_util] Do not use Enum, for python2 compatibility (sonic-net#38)
Browse files Browse the repository at this point in the history
Signed-off-by: Mykola Faryma <[email protected]>
  • Loading branch information
mykolaf authored and lguohan committed Oct 1, 2018
1 parent d67519c commit 7ce52d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/swsssdk/port_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
"""
import swsssdk
import re
from enum import Enum


SONIC_ETHERNET_RE_PATTERN = "^Ethernet(\d+)$"
SONIC_PORTCHANNEL_RE_PATTERN = "^PortChannel(\d+)$"
SONIC_MGMT_PORT_RE_PATTERN = "^eth(\d+)$"


class BaseIdx(int, Enum):
class BaseIdx:
ethernet_base_idx = 1
portchannel_base_idx = 1000
mgmt_port_base_idx = 10000
Expand Down

0 comments on commit 7ce52d8

Please sign in to comment.