Platform class mini-cleanup

- Platform objects now export their physical port configuration
- Property updates.
This commit is contained in:
Jeffrey Townsend
2016-06-14 15:52:00 +00:00
parent 00e16b1f05
commit 5c3345bef4
14 changed files with 59 additions and 218 deletions

View File

@@ -1,23 +1,8 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for Celestica platforms.
#
############################################################
from onl.platform.base import *
class OnlPlatformCelestica(OnlPlatformBase):
def manufacturer(self):
return "Celestica"
def sys_oid_vendor(self):
return ".12290"
MANUFACTUTER='Celestica'
PRIVATE_ENTERPRISE_NUMBER=12290

View File

@@ -1,16 +1,9 @@
from onl.platform.base import *
from onl.platform.celestica import *
class OnlPlatform_x86_64_cel_redstone_xp_r0(OnlPlatformCelestica):
class OnlPlatform_x86_64_cel_redstone_xp_r0(OnlPlatformCelestica,
OnlPlatformPortConfig_48x10_6x40):
PLATFORM='x86-64-cel-redstone-xp-r0'
MODEL="Redstone XP"
SYS_OBJECT_ID=".2060.1"
def model(self):
return "Redstone XP"
def platform(self):
return "x86-64-cel-redstone-xp-r0"
def sys_oid_platform(self):
return ".2060.1"
def baseconfig(self):
return True

View File

@@ -1,23 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for DELL platforms.
#
############################################################
from onl.platform.base import *
class OnlPlatformDell(OnlPlatformBase):
def manufacturer(self):
return "Dell"
def sys_oid_vendor(self):
return ".674"
MANUFACTURER='Dell'
PRIVATE_ENTERPRISE_NUMBER=674

View File

@@ -1,22 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for DNI platforms.
#
############################################################
from onl.platform.base import *
class OnlPlatformDNI(OnlPlatformBase):
def manufacturer(self):
return "DNI"
def sys_oid_vendor(self):
return ".5324"
MANUFACTURER='DNI'
PRIVATE_ENTERPRISE_NUMBER=5324

View File

@@ -1,22 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for the KVM simulation platform.
#
############################################################
from onl.platform.base import *
class OnlPlatformKVM(OnlPlatformBase):
def manufacturer(self):
return "KVM"
def sys_oid_vendor(self):
return ".42623"
MANUFACTURER=KVM
PRIVATE_ENTERPRISE_NUMBER=42623

View File

@@ -2,15 +2,8 @@ from onl.platform.base import *
from onl.platform.kvm import *
class OnlPlatform_x86_64_kvm_x86_64_r0(OnlPlatformKVM):
def model(self):
return "KVM X86_64"
def platform(self):
return "x86-64-kvm-x86-64-r0"
def sys_oid_platform(self):
return ".1"
def baseconfig(self):
return True
PLATFORM='x86-64-kvm-x86-64-r0'
MODEL="KVM X86_64"
SYS_OBJECT_ID=".1"
PORT_COUNT=0
PORT_CONFIG="None"

View File

@@ -2,15 +2,8 @@ from onl.platform.base import *
from onl.platform.qemu import *
class OnlPlatform_arm_qemu_armv7a_r0(OnlPlatformQEMU):
def model(self):
return "QEMU ARMv7a"
def platform(self):
return "arm-qemu-armv7a-r0"
def sys_oid_platform(self):
return ".2"
def baseconfig(self):
return True
PLATFORM='arm-qemu-armv7a-r0'
MODEL="QEMU ARMv7a"
SYS_OBJECT_ID=".2"
PORT_COUNT=0
PORT_CONFIG=""

View File

@@ -1,22 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for the KVM simulation platform.
#
############################################################
from onl.platform.base import *
class OnlPlatformQEMU(OnlPlatformBase):
def manufacturer(self):
return "QEMU"
def sys_oid_vendor(self):
return ".42623"
MANUFACTURER='QEMU'
PRIVATE_ENTERPRISE_NUMBER=42623

View File

@@ -1,27 +1,13 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# Platform Driver for the Quanta LB9
#
############################################################
from onl.platform.base import *
from onl.platform.quanta import *
class OnlPlatform_powerpc_quanta_lb9_r0(OnlPlatformQuanta):
def model(self):
return "LB9"
def platform(self):
return "powerpc-quanta-lb9-r0"
class OnlPlatform_powerpc_quanta_lb9_r0(OnlPlatformQuanta,
OnlPlatformPortConfig_48x1_4x10):
PLATFORM='powerpc-quanta-lb9-r0'
MODEL="LB9"
SYS_OBJECT_ID=".1048.1"
def baseconfig(self):
platform_fancontrol="%s/etc/fancontrol" % self.basedir_onl()
@@ -35,7 +21,5 @@ class OnlPlatform_powerpc_quanta_lb9_r0(OnlPlatformQuanta):
return True
def sys_oid_platform(self):
return ".1048.1"

View File

@@ -1,18 +1,14 @@
#!/usr/bin/python
############################################################
#
############################################################
import subprocess
from onl.platform.base import *
from onl.platform.quanta import *
class OnlPlatform_powerpc_quanta_ly2_r0(OnlPlatformQuanta):
def model(self):
return "LY2"
def platform(self):
return "powerpc-quanta-ly2-r0"
class OnlPlatform_powerpc_quanta_ly2_r0(OnlPlatformQuanta,
OnlPlatformPortConfig_48x10_4x40):
PLATFORM='powerpc-quanta-ly2-r0'
MODEL="LY2"
SYS_OBJECT_ID=".3048.1"
def baseconfig(self):
subprocess.check_call("%s/sbin/gpio_init" % self.basedir_onl())
@@ -39,8 +35,7 @@ class OnlPlatform_powerpc_quanta_ly2_r0(OnlPlatformQuanta):
return True
def sys_oid_platform(self):
return ".3048.1"

View File

@@ -1,23 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for Quanta platforms.
#
############################################################
from onl.platform.base import *
class OnlPlatformQuanta(OnlPlatformBase):
def manufacturer(self):
return "Quanta"
def sys_oid_vendor(self):
return ".7244"
MANUFACTURER='Quanta'
PRIVATE_ENTERPRISE_NUMBER=7244

View File

@@ -1,16 +1,11 @@
from onl.platform.base import *
from onl.platform.quanta import *
class OnlPlatform_x86_64_quanta_ly6_rangeley_r0(OnlPlatformQuanta):
def model(self):
return "LY6"
def platform(self):
return "x86-64-quanta-ly6-rangeley-r0"
def sys_oid_platform(self):
return ".6.1"
class OnlPlatform_x86_64_quanta_ly6_rangeley_r0(OnlPlatformQuanta,
OnlPlatformPortConfig_32x40):
PLATFORM='x86-64-quanta-ly6-rangeley-r0'
MODEL='LY6'
SYS_OBJECT_ID='.6.1'
def baseconfig(self):
# fixme

View File

@@ -1,16 +1,11 @@
from onl.platform.base import *
from onl.platform.quanta import *
class OnlPlatform_x86_64_quanta_ly8_rangeley_r0(OnlPlatformQuanta):
def model(self):
return "LY8"
def platform(self):
return "x86-64-quanta-ly8-rangeley-r0"
def sys_oid_platform(self):
return ".8.1"
class OnlPlatform_x86_64_quanta_ly8_rangeley_r0(OnlPlatformQuanta,
OnlPlatformPortConfig_48x10_6x40):
PLATFORM='x86-64-quanta-ly8-rangeley-r0'
MODEL="LY8"
SYS_OBJECT_ID=".8.1"
def baseconfig(self):
# fixme

View File

@@ -1,22 +1,7 @@
#!/usr/bin/python
############################################################
# <bsn.cl fy=2013 v=none>
#
# Copyright 2013, 2014 BigSwitch Networks, Inc.
#
#
#
# </bsn.cl>
############################################################
#
# OnlPlatform support for WNC platforms.
#
############################################################
from onl.platform.base import *
class OnlPlatformWNC(OnlPlatformBase):
def manufacturer(self):
return "WNC"
def sys_oid_vendor(self):
return ".15756"
MANUFACTURER='WNC'
PRIVATE_ENTERPRISE_NUMBER=15756