COT.platforms
module¶
Handles behavior that varies between guest platforms.
Classes
GenericPlatform |
Generic class for operations that depend on guest platform. |
CSR1000V |
Platform-specific logic for Cisco CSR1000V platform. |
IOSv |
Platform-specific logic for Cisco IOSv. |
IOSXRv |
Platform-specific logic for Cisco IOS XRv platform. |
IOSXRvRP |
Platform-specific logic for Cisco IOS XRv HA-capable RP. |
IOSXRvLC |
Platform-specific logic for Cisco IOS XRv line card. |
IOSXRv9000 |
Platform-specific logic for Cisco IOS XRv 9000 platform. |
NXOSv |
Platform-specific logic for Cisco NX-OSv (Titanium). |
-
class
GenericPlatform
[source]¶ Bases:
object
Generic class for operations that depend on guest platform.
To be used whenever the guest is unrecognized or does not need special handling.
-
classmethod
controller_type_for_device
(device_type)[source]¶ Get the default controller type for the given device type.
-
classmethod
guess_nic_name
(nic_number)[source]¶ Guess the name of the Nth NIC for this platform.
Note
This method counts from 1, not from 0!
-
classmethod
validate_cpu_count
(cpus)[source]¶ Throw an error if the number of CPUs is not a supported value.
-
classmethod
validate_memory_amount
(megabytes)[source]¶ Throw an error if the amount of RAM is not supported.
-
classmethod
validate_nic_count
(count)[source]¶ Throw an error if the number of NICs is not supported.
-
classmethod
validate_nic_type
(type_string)[source]¶ Throw an error if the NIC type string is not supported.
-
classmethod
validate_nic_types
(type_list)[source]¶ Throw an error if any NIC type string in the list is unsupported.
-
classmethod
validate_serial_count
(count)[source]¶ Throw an error if the number of serial ports is not supported.
-
BOOTSTRAP_DISK_TYPE
= 'cdrom'¶
-
CONFIG_TEXT_FILE
= 'config.txt'¶
-
LITERAL_CLI_STRING
= 'config'¶
-
PLATFORM_NAME
= '(unrecognized platform, generic)'¶
-
SECONDARY_CONFIG_TEXT_FILE
= None¶
-
SUPPORTED_NIC_TYPES
= ['E1000e', 'E1000', 'PCNet32', 'virtio', 'VMXNET3']¶
-
classmethod
-
class
CSR1000V
[source]¶ Bases:
COT.platforms.GenericPlatform
Platform-specific logic for Cisco CSR1000V platform.
-
classmethod
controller_type_for_device
(device_type)[source]¶ CSR1000V uses SCSI for hard disks and IDE for CD-ROMs.
-
classmethod
guess_nic_name
(nic_number)[source]¶ GigabitEthernet1, GigabitEthernet2, etc.
Warning
In all current CSR releases, NIC names start at “GigabitEthernet1”. Some early versions started at “GigabitEthernet0” but we don’t support that.
-
CONFIG_TEXT_FILE
= 'iosxe_config.txt'¶
-
LITERAL_CLI_STRING
= 'ios-config'¶
-
PLATFORM_NAME
= 'Cisco CSR1000V'¶
-
SUPPORTED_NIC_TYPES
= ['E1000', 'virtio', 'VMXNET3']¶
-
classmethod
-
class
IOSv
[source]¶ Bases:
COT.platforms.GenericPlatform
Platform-specific logic for Cisco IOSv.
-
classmethod
validate_memory_amount
(megabytes)[source]¶ IOSv has minimum 192 MB (with minimal feature set), max 3 GB.
-
BOOTSTRAP_DISK_TYPE
= 'harddisk'¶
-
CONFIG_TEXT_FILE
= 'ios_config.txt'¶
-
LITERAL_CLI_STRING
= None¶
-
PLATFORM_NAME
= 'Cisco IOSv'¶
-
SUPPORTED_NIC_TYPES
= ['E1000']¶
-
classmethod
-
class
IOSXRv
[source]¶ Bases:
COT.platforms.GenericPlatform
Platform-specific logic for Cisco IOS XRv platform.
-
classmethod
guess_nic_name
(nic_number)[source]¶ MgmtEth0/0/CPU0/0, GigabitEthernet0/0/0/0, Gig0/0/0/1, etc.
-
CONFIG_TEXT_FILE
= 'iosxr_config.txt'¶
-
LITERAL_CLI_STRING
= None¶
-
PLATFORM_NAME
= 'Cisco IOS XRv'¶
-
SECONDARY_CONFIG_TEXT_FILE
= 'iosxr_config_admin.txt'¶
-
SUPPORTED_NIC_TYPES
= ['E1000', 'virtio']¶
-
classmethod
-
class
IOSXRvRP
[source]¶ Bases:
COT.platforms.IOSXRv
Platform-specific logic for Cisco IOS XRv HA-capable RP.
-
classmethod
guess_nic_name
(nic_number)[source]¶ Fabric and management only.
- fabric
- MgmtEth0/{SLOT}/CPU0/0
-
PLATFORM_NAME
= 'Cisco IOS XRv route processor card'¶
-
classmethod
-
class
IOSXRvLC
[source]¶ Bases:
COT.platforms.IOSXRv
Platform-specific logic for Cisco IOS XRv line card.
-
classmethod
guess_nic_name
(nic_number)[source]¶ Fabric interface plus slot-appropriate GigabitEthernet interfaces.
- fabric
- GigabitEthernet0/{SLOT}/0/0
- GigabitEthernet0/{SLOT}/0/1
- etc.
-
classmethod
validate_serial_count
(count)[source]¶ No serial ports are needed but up to 4 can be used for debugging.
-
CONFIG_TEXT_FILE
= None¶
-
PLATFORM_NAME
= 'Cisco IOS XRv line card'¶
-
SECONDARY_CONFIG_TEXT_FILE
= None¶
-
classmethod
-
class
NXOSv
[source]¶ Bases:
COT.platforms.GenericPlatform
Platform-specific logic for Cisco NX-OSv (Titanium).
-
classmethod
guess_nic_name
(nic_number)[source]¶ NX-OSv names its NICs a bit interestingly...
- mgmt0
- Ethernet2/1
- Ethernet2/2
- ...
- Ethernet2/48
- Ethernet3/1
- Ethernet3/2
- ...
-
CONFIG_TEXT_FILE
= 'nxos_config.txt'¶
-
LITERAL_CLI_STRING
= None¶
-
PLATFORM_NAME
= 'Cisco NX-OSv'¶
-
SUPPORTED_NIC_TYPES
= ['E1000', 'virtio']¶
-
classmethod