mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Platform class mini-cleanup
- Platform objects now export their physical port configuration - Property updates.
This commit is contained in:
@@ -1,16 +1,8 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_arm_accton_as4610_54_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS4610-54"
|
||||
|
||||
def platform(self):
|
||||
return "arm-accton-as4610-54-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".4610"
|
||||
|
||||
def baseconfig(self):
|
||||
return True
|
||||
class OnlPlatform_arm_accton_as4610_54_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x1_4x10):
|
||||
PLATFORM='arm-accton-as4610-54-r0'
|
||||
MODEL="AS4610-54"
|
||||
SYS_OBJECT_ID=".4610"
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
#!/usr/bin/python
|
||||
############################################################
|
||||
#
|
||||
#
|
||||
#
|
||||
############################################################
|
||||
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as4600_54t_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return 'AS4600-54T'
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as4600-54t-r0'
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".4600.54"
|
||||
class OnlPlatform_powerpc_accton_as4600_54t_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x1_4x10):
|
||||
PLATFORM='powerpc-accton-as4600-54t-r0'
|
||||
MODEL='AS4600-54T'
|
||||
SYS_OBJECT_ID='.4600.54'
|
||||
|
||||
|
||||
@@ -1,23 +1,12 @@
|
||||
#!/usr/bin/python
|
||||
############################################################
|
||||
#
|
||||
#
|
||||
#
|
||||
############################################################
|
||||
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as5610_52x_r0(OnlPlatformAccton):
|
||||
|
||||
onie_base_address = "0xeff70000"
|
||||
|
||||
def model(self):
|
||||
return "AS5610-52X"
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as5610-52x-r0'
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5610.52"
|
||||
class OnlPlatform_powerpc_accton_as5610_52x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_4x40):
|
||||
PLATFORM='powerpc-accton-as5610-52x-r0'
|
||||
MODEL='AS5610-52X'
|
||||
SYS_OBJECT_ID='.5610.52'
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,13 @@
|
||||
#!/usr/bin/python
|
||||
############################################################
|
||||
#
|
||||
#
|
||||
#
|
||||
############################################################
|
||||
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as5710_54x_r0(OnlPlatformAccton):
|
||||
class OnlPlatform_powerpc_accton_as5710_54x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
PLATFORM='powerpc-accton-as5710-54x-r0'
|
||||
MODEL='AS5710-54X'
|
||||
SYS_OBJECT_ID='.5710.54'
|
||||
|
||||
CPLDVERSION="cpldversion"
|
||||
|
||||
def model(self):
|
||||
return "AS5710-54X"
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as5710-54x-r0'
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5710.54"
|
||||
|
||||
|
||||
@@ -6,16 +6,9 @@ import os
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as5710_54x_r0b(OnlPlatformAccton):
|
||||
|
||||
CPLDVERSION="cpldversion"
|
||||
|
||||
def model(self):
|
||||
return "AS5710-54X (R0B)"
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as5710-54x-r0b'
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5710.54"
|
||||
class OnlPlatform_powerpc_accton_as5710_54x_r0b(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
PLATFORM='powerpc-accton-as5710-54x-r0b'
|
||||
MODEL='AS5710-54X (R0B)'
|
||||
SYS_OBJECT_ID='.5710.54'
|
||||
|
||||
|
||||
@@ -5,19 +5,16 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as6700_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS6700-32X"
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as6700-32x-r0'
|
||||
class OnlPlatform_powerpc_accton_as6700_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x40):
|
||||
PLATFORM='powerpc-accton-as6700-32x-r0'
|
||||
MODEL="AS6700-32X"
|
||||
SYS_OBJECT_ID=".6700.32"
|
||||
|
||||
def baseconfig(self):
|
||||
with open("/etc/default/watchdog", 'a') as f:
|
||||
f.write("run_watchdog=0\n");
|
||||
return True
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".6700.32"
|
||||
|
||||
|
||||
|
||||
@@ -1,24 +1,17 @@
|
||||
#!/usr/bin/python
|
||||
############################################################
|
||||
#
|
||||
#
|
||||
#
|
||||
############################################################
|
||||
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_powerpc_accton_as6700_32x_r1(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS6700-32X"
|
||||
|
||||
def platform(self):
|
||||
return 'powerpc-accton-as6700-32x-r1'
|
||||
class OnlPlatform_powerpc_accton_as6700_32x_r1(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x40):
|
||||
PLATFORM='powerpc-accton-as6700-32x-r1'
|
||||
MODEL='AS6700-32X'
|
||||
SYS_OBJECT_ID='.6700.32'
|
||||
|
||||
def baseconfig(self):
|
||||
with open("/etc/default/watchdog", 'a') as f:
|
||||
f.write("run_watchdog=0\n");
|
||||
return True
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".6700.32"
|
||||
|
||||
|
||||
@@ -1,22 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
############################################################
|
||||
# <bsn.cl fy=2013 v=none>
|
||||
#
|
||||
# Copyright 2013, 2014 BigSwitch Networks, Inc.
|
||||
#
|
||||
#
|
||||
#
|
||||
# </bsn.cl>
|
||||
############################################################
|
||||
#
|
||||
# OnlPlatform support for Accton platforms.
|
||||
#
|
||||
############################################################
|
||||
|
||||
from onl.platform.base import *
|
||||
|
||||
class OnlPlatformAccton(OnlPlatformBase):
|
||||
def manufacturer(self):
|
||||
return "Accton"
|
||||
|
||||
def sys_oid_vendor(self):
|
||||
return ".259"
|
||||
MANUFACTURER='Accton'
|
||||
PRIVATE_ENTERPRISE_NUMBER=259
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as5512_54x_r0(OnlPlatformAccton):
|
||||
|
||||
|
||||
def model(self):
|
||||
return "AS5512-54X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as5512-54x-r0"
|
||||
|
||||
def sys_init(self):
|
||||
pass
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5512.54.1"
|
||||
class OnlPlatform_x86_64_accton_as5512_54x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
PLATFORM='x86-64-accton-as5512-54x-r0'
|
||||
MODEL="AS5512-54X"
|
||||
SYS_OBJECT_ID=".5512.54.1"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as5712_54x_r0(OnlPlatformAccton):
|
||||
class OnlPlatform_x86_64_accton_as5712_54x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
|
||||
def model(self):
|
||||
return "AS5712-54X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as5712-54x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5712.54"
|
||||
PLATFORM='x86-64-accton-as5712-54x-r0'
|
||||
MODEL="AS5712-54X"
|
||||
SYS_OBJECT_ID=".5712.54"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,20 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as5812_54t_r0(OnlPlatformAccton):
|
||||
|
||||
|
||||
def model(self):
|
||||
return "AS5812-54T"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as5812-54t-r0"
|
||||
|
||||
def sys_init(self):
|
||||
pass
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5812.54.2"
|
||||
class OnlPlatform_x86_64_accton_as5812_54t_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
PLATFORM='x86-64-accton-as5812-54t-r0'
|
||||
MODEL="AS5812-54T"
|
||||
SYS_OBJECT_ID=".5812.54.2"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,20 +1,12 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as5812_54x_r0(OnlPlatformAccton):
|
||||
class OnlPlatform_x86_64_accton_as5812_54x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_48x10_6x40):
|
||||
|
||||
|
||||
def model(self):
|
||||
return "AS5812-54X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as5812-54x-r0"
|
||||
|
||||
def sys_init(self):
|
||||
pass
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".5812.54.1"
|
||||
PLATFORM='x86-64-accton-as5812-54x-r0'
|
||||
MODEL="AS5812-54X"
|
||||
SYS_OBJECT_ID=".5812.54.1"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as6712_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS6712-32X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as6712-32x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".6712.32"
|
||||
|
||||
class OnlPlatform_x86_64_accton_as6712_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x40):
|
||||
PLATFORM='x86-64-accton-as6712-32x-r0'
|
||||
MODEL="AS6712-32X"
|
||||
SYS_OBJECT_ID=".6712.32"
|
||||
|
||||
def baseconfig(self):
|
||||
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as6812_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS6812-32X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as6812-32x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".6812.32"
|
||||
|
||||
class OnlPlatform_x86_64_accton_as6812_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x40):
|
||||
PLATFORM='x86-64-accton-as6812-32x-r0'
|
||||
MODEL="AS6812-32X"
|
||||
SYS_OBJECT_ID=".6812.32"
|
||||
|
||||
def baseconfig(self):
|
||||
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS7512-32X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as7512-32x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".7512.32"
|
||||
class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x100):
|
||||
PLATFORM='x86-64-accton-as7512-32x-r0'
|
||||
MODEL="AS7512-32X"
|
||||
SYS_OBJECT_ID=".7512.32"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
@@ -70,6 +65,7 @@ class OnlPlatform_x86_64_accton_as7512_32x_r0(OnlPlatformAccton):
|
||||
self.new_i2c_device('as7512_32x_sfp2', 0x50, 19)
|
||||
self.new_i2c_device('as7512_32x_sfp3', 0x50, 20)
|
||||
self.new_i2c_device('as7512_32x_sfp4', 0x50, 21)
|
||||
|
||||
self.new_i2c_device('as7512_32x_sfp5', 0x50, 22)
|
||||
self.new_i2c_device('as7512_32x_sfp6', 0x50, 23)
|
||||
self.new_i2c_device('as7512_32x_sfp7', 0x50, 24)
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as7712_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS7712-32X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as7712-32x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".7712.32"
|
||||
class OnlPlatform_x86_64_accton_as7712_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x100):
|
||||
PLATFORM='x86-64-accton-as7712-32x-r0'
|
||||
MODEL="AS7712-32X"
|
||||
SYS_OBJECT_ID=".7712.32"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
from onl.platform.base import *
|
||||
from onl.platform.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_as7716_32x_r0(OnlPlatformAccton):
|
||||
|
||||
def model(self):
|
||||
return "AS7716-32X"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-as7716-32x-r0"
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".7716.32"
|
||||
class OnlPlatform_x86_64_accton_as7716_32x_r0(OnlPlatformAccton,
|
||||
OnlPlatformPortConfig_32x100):
|
||||
PLATFORM='x86-64-accton-as7716-32x-r0'
|
||||
MODEL="AS7716-32X"
|
||||
SYS_OBJECT_ID=".7716.32"
|
||||
|
||||
def baseconfig(self):
|
||||
########### initialize I2C bus 0 ###########
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
from onl.platform.base import *
|
||||
from onl.vendor.accton import *
|
||||
|
||||
class OnlPlatform_x86_64_accton_wedge_16x_r0(OpenNetworkPlatformAccton):
|
||||
class OnlPlatform_x86_64_accton_wedge_16x_r0(OnlPlatformAccton):
|
||||
PLATFORM='x86-64-accton-wedge-16x-r0'
|
||||
MODEL="Wedge-16X"
|
||||
SYS_OBJECT_ID=".16.1"
|
||||
|
||||
def model(self):
|
||||
return "Wedge-16X"
|
||||
PORT_COUNT=16
|
||||
PORT_CONFIG="16x40"
|
||||
|
||||
def platform(self):
|
||||
return "x86-64-accton-wedge-16x-r0"
|
||||
|
||||
def baseconfig(self):
|
||||
return True
|
||||
|
||||
def sys_oid_platform(self):
|
||||
return ".16.1"
|
||||
|
||||
Reference in New Issue
Block a user