Module for keeping const values.
Project description
[!IMPORTANT] This project is under development. All source code and features on the main branch are for the purpose of testing or evaluation and not production ready.
MFD Const
Module for keeping const values.
Available data structures
DEVICE_IDS- family: device_id mapping like "CPK": ["0xF0A5", "0xF0A5"]DEVID_CLASS_MAP_NICINSTALLER- speed: device_id mapping.DRIVER_DIRECTORY_MAP- driver: directory mapping like "ice": "PROCGB"DRIVER_DEVICE_ID_MAP- driver: device_id mapping like "ice": {DeviceID(0x124C), DeviceID(0x124D)}SPEED_IDS- speed: device_id mapping like "@1G": DEVICE_IDS["PVL"]Family- Enum class of available families likeFamily.PVLfamily_to_full_name- Dict with mapping Family to full name likeFamily.CVL: "Columbiaville"Speed- Enum class of available speeds likeSpeed.G100FREEBSD_ADVERTISE_SPEED- advertise_speed: speed mapping like "1G": {"ice": 0x4, "ixl": 0x2, "ix": 0x2}MANAGEMENT_NETWORK- list of networks used for management connectionLOCAL_DEFAULT_MAP(qos.py) - QoS Default map for DCB local settingsLOCAL_ISCSI_MAP(qos.py) - ISCSI map for QoSSAN_DCB_MAP(qos.py) - SAN DCB map for QoSALT_SAN_DCB(qos.py) - ALT SAN DCB map for QoSISCSI_POLICY(qos.py) - ISCSI PolicyFreeBSDDriverNames- Enum class of FreeBSD Driver NamesDESIGNED_NUMBER_VFS_BY_SPEED- Designed number of VFs for every speed class, like for 100G NIC is designed 256 VFsSUPPORTED_ADAPTER_RESET_TYPES- Supporting reset types for NIC.Milestone- Enum class of available milestones likeMilestone.PV
Usage
from mfd_const import SPEED_IDS
logger.info(f"Device ids for 1G == {SPEED_IDS['@1G']}")
from mfd_const import FREEBSD_ADVERTISE_SPEED
logger.info(f"Value for 1G advertise speed on ix driver is: {FREEBSD_ADVERTISE_SPEED['1G']['ix']}")
from mfd_const import MANAGEMENT_NETWORK
from ipaddress import IPv4Interface
ip = IPv4Interface("10.10.10.10")
for mng_sub in MANAGEMENT_NETWORK:
if ip in mng_sub:
logger.info(f"{ip} is management IP.")
# To apply DCB settings related to QOS, please use the flags as below.
from mfd_const.qos import (LOCAL_PFC, LOCAL_DEFAULT_MAP)
res = dcb.verify_dcb(LOCAL_DEFAULT_MAP)
if res:
logger.info("DCB Configuration sustains the local settings")
qos
Temporary path for copying tools from SUT/Controller to any host under test
DCB_TOOL_PATH_LNX : Path for dcbnl.py - Netlink message generation/parsing script
Issue reporting
If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue here.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mfd_const-0.24.0-py3-none-any.whl.
File metadata
- Download URL: mfd_const-0.24.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd61cbb6b43477dddb495dec0a2015de73d0801257e2cc14e3ef315f26f1ba8d
|
|
| MD5 |
d654961f15050ba9a21688bf495ea6da
|
|
| BLAKE2b-256 |
6d8a0f564848cbd03cf9ac4e55e45c914fe862778adedb642dfa9453da965c2f
|