diff --git a/packages/platforms/celestica/vendor-config/src/python/celestica/__init__.py b/packages/platforms/celestica/vendor-config/src/python/celestica/__init__.py index 722f43d9..08a5db35 100644 --- a/packages/platforms/celestica/vendor-config/src/python/celestica/__init__.py +++ b/packages/platforms/celestica/vendor-config/src/python/celestica/__init__.py @@ -1,23 +1,8 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/celestica/x86-64/x86-64-cel-redstone-xp/platform-config/r0/src/python/x86_64_cel_redstone_xp_r0/__init__.py b/packages/platforms/celestica/x86-64/x86-64-cel-redstone-xp/platform-config/r0/src/python/x86_64_cel_redstone_xp_r0/__init__.py index 0226ddd8..f3d6c214 100644 --- a/packages/platforms/celestica/x86-64/x86-64-cel-redstone-xp/platform-config/r0/src/python/x86_64_cel_redstone_xp_r0/__init__.py +++ b/packages/platforms/celestica/x86-64/x86-64-cel-redstone-xp/platform-config/r0/src/python/x86_64_cel_redstone_xp_r0/__init__.py @@ -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 diff --git a/packages/platforms/dell/vendor-config/src/python/dell/__init__.py b/packages/platforms/dell/vendor-config/src/python/dell/__init__.py index 8c2ee967..3b69223e 100644 --- a/packages/platforms/dell/vendor-config/src/python/dell/__init__.py +++ b/packages/platforms/dell/vendor-config/src/python/dell/__init__.py @@ -1,23 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/dni/vendor-config/src/python/dni/__init__.py b/packages/platforms/dni/vendor-config/src/python/dni/__init__.py index 83562176..6878a215 100644 --- a/packages/platforms/dni/vendor-config/src/python/dni/__init__.py +++ b/packages/platforms/dni/vendor-config/src/python/dni/__init__.py @@ -1,22 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/kvm/vendor-config/src/python/kvm/__init__.py b/packages/platforms/kvm/vendor-config/src/python/kvm/__init__.py index 62338900..c6122468 100644 --- a/packages/platforms/kvm/vendor-config/src/python/kvm/__init__.py +++ b/packages/platforms/kvm/vendor-config/src/python/kvm/__init__.py @@ -1,22 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/python/x86_64_kvm_x86_64_r0/__init__.py b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/python/x86_64_kvm_x86_64_r0/__init__.py index d4d79074..29d18aba 100644 --- a/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/python/x86_64_kvm_x86_64_r0/__init__.py +++ b/packages/platforms/kvm/x86-64/x86-64-kvm-x86-64/platform-config/r0/src/python/x86_64_kvm_x86_64_r0/__init__.py @@ -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" diff --git a/packages/platforms/qemu/arm/arm-qemu-armv7a/platform-config/r0/src/python/arm_qemu_armv7a_r0/__init__.py b/packages/platforms/qemu/arm/arm-qemu-armv7a/platform-config/r0/src/python/arm_qemu_armv7a_r0/__init__.py index 91cf4771..8454c3c8 100644 --- a/packages/platforms/qemu/arm/arm-qemu-armv7a/platform-config/r0/src/python/arm_qemu_armv7a_r0/__init__.py +++ b/packages/platforms/qemu/arm/arm-qemu-armv7a/platform-config/r0/src/python/arm_qemu_armv7a_r0/__init__.py @@ -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="" diff --git a/packages/platforms/qemu/vendor-config/src/python/qemu/__init__.py b/packages/platforms/qemu/vendor-config/src/python/qemu/__init__.py index 82b0e38e..0557dc29 100644 --- a/packages/platforms/qemu/vendor-config/src/python/qemu/__init__.py +++ b/packages/platforms/qemu/vendor-config/src/python/qemu/__init__.py @@ -1,22 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/quanta/powerpc/powerpc-quanta-lb9/platform-config/r0/src/python/powerpc_quanta_lb9_r0/__init__.py b/packages/platforms/quanta/powerpc/powerpc-quanta-lb9/platform-config/r0/src/python/powerpc_quanta_lb9_r0/__init__.py index 61872744..abb2c5ac 100644 --- a/packages/platforms/quanta/powerpc/powerpc-quanta-lb9/platform-config/r0/src/python/powerpc_quanta_lb9_r0/__init__.py +++ b/packages/platforms/quanta/powerpc/powerpc-quanta-lb9/platform-config/r0/src/python/powerpc_quanta_lb9_r0/__init__.py @@ -1,27 +1,13 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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" diff --git a/packages/platforms/quanta/powerpc/powerpc-quanta-ly2/platform-config/r0/src/python/powerpc_quanta_ly2_r0/__init__.py b/packages/platforms/quanta/powerpc/powerpc-quanta-ly2/platform-config/r0/src/python/powerpc_quanta_ly2_r0/__init__.py index 79f42461..49319b5e 100644 --- a/packages/platforms/quanta/powerpc/powerpc-quanta-ly2/platform-config/r0/src/python/powerpc_quanta_ly2_r0/__init__.py +++ b/packages/platforms/quanta/powerpc/powerpc-quanta-ly2/platform-config/r0/src/python/powerpc_quanta_ly2_r0/__init__.py @@ -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" + diff --git a/packages/platforms/quanta/vendor-config/src/python/quanta/__init__.py b/packages/platforms/quanta/vendor-config/src/python/quanta/__init__.py index 8d5adc04..44a2951b 100644 --- a/packages/platforms/quanta/vendor-config/src/python/quanta/__init__.py +++ b/packages/platforms/quanta/vendor-config/src/python/quanta/__init__.py @@ -1,23 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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 diff --git a/packages/platforms/quanta/x86-64/x86-64-quanta-ly6-rangeley/platform-config/r0/src/python/x86_64_quanta_ly6_rangeley_r0/__init__.py b/packages/platforms/quanta/x86-64/x86-64-quanta-ly6-rangeley/platform-config/r0/src/python/x86_64_quanta_ly6_rangeley_r0/__init__.py index 8c7095e4..66694cb1 100644 --- a/packages/platforms/quanta/x86-64/x86-64-quanta-ly6-rangeley/platform-config/r0/src/python/x86_64_quanta_ly6_rangeley_r0/__init__.py +++ b/packages/platforms/quanta/x86-64/x86-64-quanta-ly6-rangeley/platform-config/r0/src/python/x86_64_quanta_ly6_rangeley_r0/__init__.py @@ -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 diff --git a/packages/platforms/quanta/x86-64/x86-64-quanta-ly8-rangeley/platform-config/r0/src/python/x86_64_quanta_ly8_rangeley_r0/__init__.py b/packages/platforms/quanta/x86-64/x86-64-quanta-ly8-rangeley/platform-config/r0/src/python/x86_64_quanta_ly8_rangeley_r0/__init__.py index c86405b1..899e821c 100644 --- a/packages/platforms/quanta/x86-64/x86-64-quanta-ly8-rangeley/platform-config/r0/src/python/x86_64_quanta_ly8_rangeley_r0/__init__.py +++ b/packages/platforms/quanta/x86-64/x86-64-quanta-ly8-rangeley/platform-config/r0/src/python/x86_64_quanta_ly8_rangeley_r0/__init__.py @@ -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 diff --git a/packages/platforms/wnc/vendor-config/src/python/wnc/__init__.py b/packages/platforms/wnc/vendor-config/src/python/wnc/__init__.py index 2002920a..1d5c41fa 100644 --- a/packages/platforms/wnc/vendor-config/src/python/wnc/__init__.py +++ b/packages/platforms/wnc/vendor-config/src/python/wnc/__init__.py @@ -1,22 +1,7 @@ #!/usr/bin/python -############################################################ -# -# -# Copyright 2013, 2014 BigSwitch Networks, Inc. -# -# -# -# -############################################################ -# -# 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