Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

try:
from sonic_led.led_control_base import LedControlBase
import swsssdk
import threading
import os
import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

try:
from sonic_led.led_control_base import LedControlBase
import swsssdk
import threading
import os
import logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import logging
import struct
import syslog
import swsssdk
from swsscommon import swsscommon
from socket import *
from select import *
except ImportError, e:
Expand Down Expand Up @@ -96,7 +96,7 @@ def initialize_configdb(self):
aligned_last_byte = format(int(int(str(last_byte), 16) + 1), '02x')
mac_addr = mac_addr[:-2] + aligned_last_byte
DBG_PRINT("start connect swss config-db to set device mac-address")
swss = swsssdk.SonicV2Connector()
swss = swsscommon.SonicV2Connector()
swss.connect(swss.CONFIG_DB)
swss.set(swss.CONFIG_DB, "DEVICE_METADATA|localhost", 'mac', mac_addr)
mac_addr = swss.get(swss.CONFIG_DB, "DEVICE_METADATA|localhost", 'mac')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import logging
import struct
import syslog
import swsssdk
from swsscommon import swsscommon
from socket import *
from select import *
except ImportError, e:
Expand Down Expand Up @@ -96,7 +96,7 @@ def initialize_configdb(self):
aligned_last_byte = format(int(int(str(last_byte), 16) + 1), '02x')
mac_addr = mac_addr[:-2] + aligned_last_byte
DBG_PRINT("start connect swss config-db to set device mac-address")
swss = swsssdk.SonicV2Connector()
swss = swsscommon.SonicV2Connector()
swss.connect(swss.CONFIG_DB)
swss.set(swss.CONFIG_DB, "DEVICE_METADATA|localhost", 'mac', mac_addr)
mac_addr = swss.get(swss.CONFIG_DB, "DEVICE_METADATA|localhost", 'mac')
Expand Down