### PackageManager Installation Methods Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Methods for installing builds and pip packages. Supports installation for all devices or specific device IDs, and allows for custom flags and timeouts. ```APIDOC ## PackageManager Installation Methods ### Description Provides methods to install software builds and Python packages. Supports installing for all devices or specific `DeviceID`s, with options for custom flags and reboot timeouts. ### Method `install_build(self, build_path: Union[str, "Path"], device_id: Optional["DeviceID"] = None, reboot_timeout: int = 120, cflags: Optional[Union[Dict, str]] = None) -> None` `install_build_for_device_id(self, build_path: Union[str, "Path"], device_id: "DeviceID", reboot_timeout: int = 120, cflags: Optional[Union[Dict, str]] = None) -> None` `pip_install_packages(self, package_list: List[str], python_executable: Optional[str] = None, index_url: str = "https://pypi.org/simple", use_trusted_host: bool = False, force_install: bool = False, no_proxy: Optional[str] = None, use_connection_interpreter: bool = False,)` `pip_install_package(self, package: str, python_executable: Optional[str] = None, index_url: str = "https://pypi.org/simple", use_trusted_host: bool = False, force_install: bool = False, no_proxy: Optional[str] = None, use_connection_interpreter: bool = False,)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # Install a build for all devices package_manager.install_build(build_path="/path/to/build") # Install a build for a specific device package_manager.install_build_for_device_id(build_path="/path/to/build", device_id=device_id_object) # Install multiple pip packages package_manager.pip_install_packages(["paramiko==2.5.2", "netmiko"]) # Install a single pip package package_manager.pip_install_package("requests") ``` ### Response #### Success Response (200) None (These methods do not return a value upon success) #### Response Example None ``` -------------------------------- ### ESXi VIB and Module Management Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides APIs for managing VIBs (vSphere Installation Bundles) and kernel modules on ESXi systems. This includes installation, uninstallation, and parameter configuration for modules. ```python def get_driver_info(self, interface_name: str) -> DriverInfo: # Get driver info (name, version). pass def get_installed_vibs(self) -> List[VIBData]: # Get installed VIBs. pass def get_module_params(self, module_name: str) -> str: # Get module params. pass def get_module_params_as_dict(self, module_name: str) -> Dict[str, str]: # Get module params as dictionary, e.g.: {"vmdq": "1,1,0,0"}. pass def install_vib(self, vib_path: Union["Path", str], params: Optional[str] = None) -> "ConnectionCompletedProcess": # Install VIB. pass def uninstall_vib(self, vib_name: str) -> "ConnectionCompletedProcess": # Uninstall VIB. pass def load_module(self, module_name: str, params: str = "") -> "ConnectionCompletedProcess": # Load module with configuration parameters. pass def unload_module(self, module_name: str) -> "ConnectionCompletedProcess": # Unload module from system. pass ``` -------------------------------- ### Install Python Packages using pip Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Shows how to install Python packages using the `pip_install_packages` and `pip_install_package` methods. Supports specifying package versions, custom index URLs, and proxy settings. Can optionally use a remote interpreter. ```python package_manager.pip_install_packages(package_list=["paramiko==2.5.2", "netmiko"]) package_manager.pip_install_package(package="some_package", python_executable="/usr/bin/python3", index_url="https://my.private.repo/simple") ``` -------------------------------- ### Windows Driver Management with Pnputil Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides functionalities to install, uninstall, and query Windows drivers using Pnputil and registry access. It allows for managing driver installations, version retrieval, and device status checks. Dependencies include standard Python libraries and potentially Windows-specific APIs. ```python def delete_driver_via_pnputil(self, inf_filename: str) -> "ConnectionCompletedProcess": # delete driver using pnputil. pass def install_inf_driver_for_matching_devices(self, inf_path: Union[str, "Path"]) -> "ConnectionCompletedProcess": # add and install driver using pnputil install for compatible devices. pass def unload_driver(self, pnp_device_id: str) -> "ConnectionCompletedProcess": # remove device specified by device instance ID. pass def install_certificates_from_driver(self, inf_path: Union["Path", str]) -> None: # install certificates from driver. pass ``` -------------------------------- ### UnixPackageManager Module and Build Methods Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Methods for checking if a module is loaded and executing 'make' commands for building, installing, uninstalling, cleaning, and uninstalling modules. ```APIDOC ## UnixPackageManager Module and Build Methods ### Description Provides methods for interacting with the system's kernel modules and build processes on Unix-like systems. Includes checking module status and executing various 'make' targets. ### Method `is_module_loaded(self, module_name: str) -> bool` `make(self, targets: Optional[Union[List, str]] = None, jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, cwd: Optional[Union[str, "Path"]] = None,)` `make_install(self, jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, cwd: Optional[Union[str, "Path"]] = None,)` `make_uninstall(self, jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, cwd: Optional[Union[str, "Path"]] = None,)` `make_clean(self, jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, cwd: Optional[Union[str, "Path"]] = None,)` `make_modules_uninstall(self, jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, cwd: Optional[Union[str, "Path"]] = None,)` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python # Check if a module is loaded is_loaded = unix_package_manager.is_module_loaded("i40e") # Execute 'make' command unix_package_manager.make(targets="all", jobs=4) # Execute 'make clean' unix_package_manager.make_clean(cwd="/path/to/source") ``` ### Response #### Success Response (200) - **is_module_loaded**: bool - Returns `True` if the module is loaded, `False` otherwise. - Other methods do not return values upon success. #### Response Example ```json // Example for is_module_loaded: true ``` ``` -------------------------------- ### Linux Package Management with RPM Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides functions to install and uninstall packages using the RPM package manager on Linux systems. It allows verifying installation status and building RPM packages. ```python def install_package_via_rpm(self, package: str, cwd: Optional[Union[Path, str]] = None) -> "ConnectionCompletedProcess": # install package using rpm pass def uninstall_package_via_rpm(self, package_name: str) -> "ConnectionCompletedProcess": # uninstall package using rpm tool. pass def is_package_installed_via_rpm(self, package: str, cwd: "Path | str | None" = None) -> bool: # verify if package installed using rpm pass def build_rpm(self, module_path: Union["Path", str], module_filename: str) -> None: # build RPM using RPM Package Manager. pass ``` -------------------------------- ### Execute 'make' Commands in Unix Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides methods to execute various 'make' commands (`make`, `make install`, `make uninstall`, `make clean`, `make module_uninstall`) in Unix-like environments. Allows specifying targets, jobs, compiler flags, and working directory. ```python package_manager.make(targets="all", jobs=4, cflags="-O2", cwd="/path/to/source") package_manager.make_install(cwd="/path/to/source") package_manager.make_uninstall(cwd="/path/to/source") package_manager.make_clean(cwd="/path/to/source") package_manager.make_modules_uninstall(cwd="/path/to/source") ``` -------------------------------- ### PackageManager Device ID Methods Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Methods to retrieve device IDs for installation and finding the management interface. ```APIDOC ## PackageManager Device ID Methods ### Description Provides methods to get a list of device IDs recommended for build installation and to find the device ID of the management interface based on the connection's IP address. ### Method `get_device_ids_to_install() -> List[DeviceID]` `find_management_device_id() -> DeviceID` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python devices = package_manager.get_device_ids_to_install() management_device = package_manager.find_management_device_id() ``` ### Response #### Success Response (200) - **get_device_ids_to_install**: List[DeviceID] - A list of device IDs suggested for installation. - **find_management_device_id**: DeviceID - The device ID of the management interface. #### Response Example ```json // Example for get_device_ids_to_install: [ "device_id_1", "device_id_2" ] // Example for find_management_device_id: "management_device_id" ``` ``` -------------------------------- ### Linux Package Verification with DPKG Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Includes a function to verify if a package is installed on a Linux system using the `dpkg` package manager. This is useful for checking software prerequisites. ```python def is_package_installed_via_dpkg(self, package: str, cwd: "Path | str | None" = None) -> bool: # verify if package installed using dpkg pass ``` -------------------------------- ### Automated Git Commit Signing Configuration Source: https://github.com/intel/mfd-package-manager/blob/main/CONTRIBUTING.md This example demonstrates how to configure Git to automatically sign your commits using the `-s` flag. By setting the `user.name` and `user.email` Git configurations, you can simplify the process of signing your contributions. ```git git commit -s ``` -------------------------------- ### Generate MFD-Package-Manager Docs using Python Source: https://github.com/intel/mfd-package-manager/blob/main/sphinx-doc/README.md This snippet demonstrates the command to generate Sphinx documentation for the MFD-Package-Manager. It requires an activated virtual environment with dependencies installed from 'requirements-docs.txt' and assumes the current directory is '/sphinx-doc'. The output will be an HTML documentation accessible in '/sphinx-doc/build/html/index.html'. ```shell $ python generate_docs.py ``` -------------------------------- ### Windows Device Status and Installed Drivers Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Functions to check the status of a specific Windows device and retrieve a list of drivers currently installed and utilized by that device. These methods are crucial for diagnostics and driver management. ```python def get_installed_drivers_for_device(self, device_id: "DeviceID") -> List[str]: # get list of drivers installed in system used by device. pass def check_device_status(self, device_id: "DeviceID") -> bool: # check if there is problem with device pass ``` -------------------------------- ### Git Commit Signing Example Source: https://github.com/intel/mfd-package-manager/blob/main/CONTRIBUTING.md This snippet shows the required format for signing off on a Git commit. It includes the 'Signed-off-by' line with a real name and email address. This ensures that contributions are made under the project's open-source license. ```git Signed-off-by: Joe Smith ``` -------------------------------- ### Linux Kernel Module Management Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides a comprehensive set of tools for managing Linux kernel modules, including loading, unloading, inserting, blacklisting, and retrieving information. It also supports driver installation and recompilation. ```python def add_module_to_blacklist(self, module_name: str) -> "ConnectionCompletedProcess": # add module to modprobe blacklist. pass def remove_module_from_blacklist(self, module_name: str) -> "ConnectionCompletedProcess": # remove module from modprobe blacklist. pass def is_module_on_blacklist(self, module_name: str) -> bool: # check if module is on blacklist. pass def get_driver_info(self, driver_name: str) -> "DriverInfo": # get driver information (name, version) pass def insert_module(self, module_path: Union[str, "Path"], params: str) -> "ConnectionCompletedProcess": # add kernel module. pass def load_module(self, module_name: str, params: str) -> "ConnectionCompletedProcess": # load kernel module. pass def list_modules(self, module_name: Optional[str] = None) -> List[LsModOutput]: # get loaded modules. pass def unload_module(self, module_name: str, options: Optional[str] = None, *, with_dependencies: bool = False) -> "ConnectionCompletedProcess": # unload module from system using rmmod or modprobe -r pass def uninstall_module(self, module_name: str, kernel_version: Optional[str] = None) -> "ConnectionCompletedProcess": # remove intel driver from kernel pass def update_driver_dependencies(self) -> None: # update driver dependencies using depmod pass def remove_driver_from_initramfs(self, module_name: str) -> List[Path]: # unload module and refresh initramfs pass def read_driver_details(self, driver_tar_filename: str) -> Tuple[str, str]: # get name and version of driver based on the name of tar. pass def get_drivers_details(self, list_of_drivers: List[Path]) -> List[DriverDetails]: # get list of drivers details (path, version, name). pass def is_loaded_driver_inbox(self, driver_name: str) -> bool: # check if loaded driver is inbox. pass def recompile_and_load_driver( driver_name: str, build_path: Union[str, "Path"], jobs: Optional[Union[str, int]] = None, cflags: Optional[Union[Dict, str]] = None, ) -> "ConnectionCompletedProcess": # recompile and reload the driver. pass def install_build(self, build_path: Union[str, "Path"], device_id: "DeviceID", reboot_timeout: int = 120, cflags: Optional[Union[Dict, str]] = None) -> None: # install build from path for passed device id pass def find_drivers(self, build_path: Union[str, Path], device_id) -> List[Path]: # get paths for compatible drivers for device_id from build on controller. pass ``` -------------------------------- ### Linux Package Management with YUM/DNF Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Offers functionalities to install and remove packages using YUM and DNF package managers on Linux. These functions are essential for managing software dependencies and applications. ```python def install_package_via_yum(self, package: str, cwd: Optional[Union[Path, str]] = None) -> "ConnectionCompletedProcess": # install package using yum pass def remove_package_via_yum(self, package: str, cwd: Optional[Union[Path, str]] = None) -> "ConnectionCompletedProcess": # remove package using yum pass def install_package_via_dnf(self, package: str, cwd: "Path | str | None" = None) -> "ConnectionCompletedProcess": # install package using dnf pass def remove_package_via_dnf(self, package: str, cwd: Optional[Union[Path, str]] = None) -> "ConnectionCompletedProcess": # remove package using dnf pass ``` -------------------------------- ### BSD Kernel Module Management Source: https://github.com/intel/mfd-package-manager/blob/main/README.md API for managing kernel modules in a BSD environment. It supports loading and unloading modules, retrieving their filenames, and getting their version information. These operations are essential for kernel-level driver management. ```python def load_module(self, module_path: Union[str, "Path"], params: Optional[dict[str, str]]) -> "ConnectionCompletedProcess": # Load given kernel module. pass def unload_module(self, module: str) -> "ConnectionCompletedProcess": # Unload module from system. pass def get_module_filename(self, module_name: str) -> Union[str, None]: # Get filename of the module loaded in the kernel. pass def get_driver_version(self, module_name: str) -> Union[str, int]: # Get module version. pass ``` -------------------------------- ### Initialize and Use PackageManager in Python Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Demonstrates how to initialize the PackageManager with connection objects and perform basic operations like checking if a module is loaded and performing 'make' operations. Requires `mfd_package_manager` library and connection objects. ```python from mfd_package_manager import PackageManager package_manager = PackageManager(connection=, controller_connection=) package_manager.is_module_loaded("i40e") connection = package_manager.make(targets="clean", cwd="/home/user/builds/Test_Build/96_31275/PROXGB/FREEBSD/ixv-1.5.33/src") package_manager.make_clean(cwd=connection.path("/home/user/builds/Test_Build/96_31275/PROXGB/FREEBSD/ixv-1.5.33/src")) ``` -------------------------------- ### ESXiPackageManager API Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides functionalities for managing VIBs, modules, and drivers on ESXi systems. ```APIDOC ## ESXiPackageManager API ### Description This API allows for the management of VIBs (vSphere Installation Bundles), kernel modules, and drivers on VMware ESXi systems. ### Endpoints #### Get Driver Info ##### Method `get_driver_info` ##### Description Retrieves information (name, version) about a specific driver on an ESXi host. ##### Parameters - **interface_name** (str) - Required - The name of the network interface or driver. #### Get Installed VIBs ##### Method `get_installed_vibs` ##### Description Retrieves a list of all installed VIBs on the ESXi host. #### Get Module Parameters ##### Method `get_module_params` ##### Description Retrieves the parameters for a given kernel module as a string. ##### Parameters - **module_name** (str) - Required - The name of the kernel module. #### Get Module Parameters as Dictionary ##### Method `get_module_params_as_dict` ##### Description Retrieves the parameters for a given kernel module as a dictionary. ##### Parameters - **module_name** (str) - Required - The name of the kernel module. #### Install VIB ##### Method `install_vib` ##### Description Installs a VIB package onto the ESXi host. ##### Parameters - **vib_path** (Union[Path, str]) - Required - The path to the VIB file. - **params** (Optional[str]) - Optional - Installation parameters for the VIB. #### Uninstall VIB ##### Method `uninstall_vib` ##### Description Uninstalls a VIB package from the ESXi host. ##### Parameters - **vib_name** (str) - Required - The name of the VIB to uninstall. #### Load Module ##### Method `load_module` ##### Description Loads a kernel module into the ESXi system with specified parameters. ##### Parameters - **module_name** (str) - Required - The name of the module to load. - **params** (str) - Optional - Configuration parameters for the module (default: ""). #### Unload Module ##### Method `unload_module` ##### Description Unloads a kernel module from the ESXi system. ##### Parameters - **module_name** (str) - Required - The name of the module to unload. ``` -------------------------------- ### PackageManager Constructor Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Initializes the PackageManager with connection objects. The controller_connection is optional and defaults to a local connection. ```APIDOC ## PackageManager Constructor ### Description Initializes the package manager. The `controller_connection` is optional and defaults to a local connection. ### Method `PackageManager(connection: "Connection", controller_connection: "Connection" = LocalConnection()) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```python from mfd_package_manager import PackageManager package_manager = PackageManager(connection=mfd_connection_object) ``` ### Response #### Success Response (200) None (Constructor does not return a value directly) #### Response Example None ``` -------------------------------- ### WindowsPackageManager API Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides methods for managing drivers on Windows systems using pnputil and registry operations. ```APIDOC ## WindowsPackageManager API ### Description This API allows for the installation, uninstallation, and querying of drivers on Windows systems. ### Methods #### `delete_driver_via_pnputil` * **Description**: Deletes a driver using the pnputil utility. * **Method**: Not specified (likely POST or DELETE based on action) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful deletion. * **Response Example**: None #### `get_driver_filename_from_registry` * **Description**: Retrieves the driver filename from the system registry. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the driver filename as a string. * **Response Example**: `{"driver_filename": "oem15.inf"}` #### `install_inf_driver_for_matching_devices` * **Description**: Installs a driver from an INF file for all compatible devices using pnputil. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful installation. * **Response Example**: None #### `unload_driver` * **Description**: Unloads a device driver specified by its PnP device ID. * **Method**: Not specified (likely DELETE) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful unloading. * **Response Example**: None #### `get_driver_version_by_inf_name` * **Description**: Retrieves the version of a driver identified by its INF name. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the driver version as a string. * **Response Example**: `{"driver_version": "1.16.202.10"}` #### `get_driver_path_in_system_for_interface` * **Description**: Gets the system driver path for a given interface name. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the driver path as a string. * **Response Example**: `{"driver_path": "C:\\Windows\\System32\\drivers\\mynet.sys"}` #### `install_certificates_from_driver` * **Description**: Installs certificates embedded within a driver's INF file. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful certificate installation. * **Response Example**: None #### `get_driver_files` * **Description**: Retrieves a list of all driver files present in the Windows DriverStore. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns a list of `WindowsStoreDriver` objects. * **Response Example**: `{"drivers": [{"published_name": "oem15.inf", "original_name": "i40ea68.inf", "provider_name": "Intel", "class_name": "Network adapters", "class_guid": "{4d36e972-e325-11ce-bfc1-08002be10318}", "driver_version": "12/22/2022 1.16.202.10", "signer_name": "Microsoft Windows Hardware Compatibility Publisher"}]}` #### `find_drivers` * **Description**: Finds paths for drivers compatible with a given device ID from a specified build path. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns a list of driver paths. * **Response Example**: `{"driver_paths": ["/home/user/build/PRO40GB/Winx64/NDIS68/i40ea48.inf"]}` #### `get_matching_drivers` * **Description**: Filters a list of driver paths to find those compatible with a specific device. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns a list of `DriverDetails` objects. * **Response Example**: `{"matching_drivers": [{"driver_path": "/home/user/build/PRO40GB/Winx64/NDIS68/i40ea48.inf", "driver_version": "1.1.2.12", "driver_name": "i40ea48"}]}` #### `read_version_of_inf_driver` * **Description**: Reads the version information from the content of an INF file. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the driver version as a string. * **Response Example**: `{"driver_version": "1.1.2.12"}` #### `get_installed_drivers_for_device` * **Description**: Retrieves a list of drivers currently installed in the system for a given device ID. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns a list of installed driver names. * **Response Example**: `{"installed_drivers": ["oem15.inf", "oem16.inf"]}` #### `check_device_status` * **Description**: Checks for any problems or errors with a specified device. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns `true` if the device has no issues, `false` otherwise. * **Response Example**: `{"device_status": true}` #### `create_default_values_dict_from_inf_file` * **Description**: Generates a dictionary of default feature values from an INF file for a specific device and OS build. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns a dictionary of default values. * **Response Example**: `{"default_values": {"feature1": "value1", "feature2": "value2"}}` ``` -------------------------------- ### BSDPackageManager API Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides methods for managing kernel modules on BSD-based systems. ```APIDOC ## BSDPackageManager API ### Description This API interacts with the Unix Package Manager to load, unload, and query kernel modules. ### Methods #### `load_module` * **Description**: Loads a kernel module into the system with optional parameters. * **Method**: Not specified (likely POST) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful module loading. * **Response Example**: None #### `unload_module` * **Description**: Unloads a specified kernel module from the system. * **Method**: Not specified (likely DELETE) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Indicates successful module unloading. * **Response Example**: None #### `get_module_filename` * **Description**: Retrieves the filename of a module currently loaded in the kernel. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the module filename or `null` if not found. * **Response Example**: `{"module_filename": "mynet.ko"}` #### `get_driver_version` * **Description**: Gets the version of a specified kernel module. * **Method**: Not specified (likely GET) * **Endpoint**: Not specified * **Parameters**: * **Path Parameters**: None * **Query Parameters**: None * **Request Body**: None * **Request Example**: None * **Response**: * **Success Response (200)**: Returns the module version as a string or integer. * **Response Example**: `{"module_version": "1.2.3"}` ``` -------------------------------- ### Windows INF File Parsing for Driver Configuration Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Utility functions for parsing Windows INF files to extract driver information and default configurations. This includes reading file content, creating base dictionaries, updating sections, and identifying device-specific or OS-specific configuration sections. ```python def read_version_of_inf_driver(self, driver_file_content: str): # read version of driver bases on inf file. pass def create_default_values_dict_from_inf_file(self, build_path: Union[str, "Path"], os_build: str, driver_name: str, device_id: "DeviceID", component_id: str, is_client_os: bool) -> Dict[str, str]: # get the default feature values from the inf file for a given device and store them in a dictionary pass def _get_inf_file_content(self, file: "Path") -> Tuple[Union[str, bytes], bool]: # get the contents of the specified inf file pass def _read_inf_file_and_create_base_dictionary(self, file: "Path") -> Tuple[Dict[str, List], List[str]]: # read the inf file and create the base dictionary for storing the section names and inf file lines for each section pass def _update_section_dictionary(self, section_dictionary: Dict[str, List[str]], file_content: List[str]) -> Dict[str, List[str]]: # fill in the section dictionary values with the lines from the inf file that fall under each section header key pass def _get_inf_device_section_name(self, build: str, section_dictionary: Dict[str, List[str]], component_id: str, client_os: bool) -> str: # get the section name from the parsed section dictionary corresponding to the specified component id pass def _get_server_or_client_section(self, section_dictionary: Dict[str, List[str]], client_os: bool) -> List[str]: # get all the component ids from the parsed section dictionary for either the server or client OS section pass def _get_default_vals_from_inf(self, device_section_name: str, section_dictionary: Dict[str, List[str]]) -> List[Tuple[str, str]]: # get all advanced feature names and the default value for each feature pass ``` -------------------------------- ### Linux Initramfs Updates Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Handles the updating of the initial RAM filesystem (initramfs) using standard Linux utilities like `update-initramfs` and `dracut`. This ensures that necessary modules are available during early boot. ```python def update_initramfs_via_update(self) -> "ConnectionCompletedProcess": # update initramfs using update-initramfs pass def update_initramfs_via_dracut(self) -> "ConnectionCompletedProcess": # update initramfs using dracut pass ``` -------------------------------- ### Windows Driver Information Retrieval Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Enables retrieving detailed information about Windows drivers, including their filenames from the registry, versions, system paths, and files from the DriverStore. It also supports finding compatible drivers for specific devices from a build path. ```python def get_driver_filename_from_registry(self, driver_name: str) -> str: # get driver filename from registry pass def get_driver_version_by_inf_name(self, inf_name: str) -> str: # get version of inf driver from system. pass def get_driver_path_in_system_for_interface(self, interface_name: str) -> str: # read system driver path for interface. pass def get_driver_files(self) -> List[WindowsStoreDriver]: # read driver from DriverStore. pass def find_drivers(self, build_path: Union[str, Path], device_id) -> List[Path]: # get paths for compatible drivers for device_id from build on controller. pass def get_matching_drivers(self, list_of_drivers: List[Path], device_id: "DeviceID") -> List[DriverDetails]: # get list of drivers compatible with device. pass ``` -------------------------------- ### LinuxPackageManager API Source: https://github.com/intel/mfd-package-manager/blob/main/README.md Provides functionalities for managing packages, modules, and drivers on Linux systems. ```APIDOC ## LinuxPackageManager API ### Description This API allows for the installation, removal, and management of software packages, kernel modules, and drivers on Linux systems. ### Endpoints #### Install Build ##### Method `install_build` ##### Description Installs a build from a specified path for a given device ID. ##### Parameters - **build_path** (Union[str, Path]) - Required - The path to the build to be installed. - **device_id** (DeviceID) - Required - The ID of the target device. - **reboot_timeout** (int) - Optional - Timeout in seconds for reboot after installation (default: 120). - **cflags** (Optional[Union[Dict, str]]) - Optional - Compiler flags for the build. #### Bind Driver ##### Method `bind_driver` ##### Description Binds a driver to a PCI address. ##### Parameters - **pci_address** (PCIAddress) - Required - The PCI address of the device. - **driver_name** (str) - Required - The name of the driver to bind. #### Unbind Driver ##### Method `unbind_driver` ##### Description Unbinds a driver from a PCI address. ##### Parameters - **pci_address** (PCIAddress) - Required - The PCI address of the device. - **driver_name** (str) - Required - The name of the driver to unbind. #### Add Module to Blacklist ##### Method `add_module_to_blacklist` ##### Description Adds a kernel module to the modprobe blacklist. ##### Parameters - **module_name** (str) - Required - The name of the module to add to the blacklist. #### Remove Module from Blacklist ##### Method `remove_module_from_blacklist` ##### Description Removes a kernel module from the modprobe blacklist. ##### Parameters - **module_name** (str) - Required - The name of the module to remove from the blacklist. #### Is Module on Blacklist ##### Method `is_module_on_blacklist` ##### Description Checks if a kernel module is currently on the modprobe blacklist. ##### Parameters - **module_name** (str) - Required - The name of the module to check. #### Get Driver Info ##### Method `get_driver_info` ##### Description Retrieves information about a specific driver. ##### Parameters - **driver_name** (str) - Required - The name of the driver. #### Insert Kernel Module ##### Method `insert_module` ##### Description Inserts a kernel module into the system. ##### Parameters - **module_path** (Union[str, Path]) - Required - The path to the kernel module file. - **params** (str) - Required - Parameters for the module. #### Load Kernel Module ##### Method `load_module` ##### Description Loads a kernel module into the system. ##### Parameters - **module_name** (str) - Required - The name of the module to load. - **params** (str) - Required - Parameters for the module. #### List Modules ##### Method `list_modules` ##### Description Retrieves a list of currently loaded kernel modules. ##### Parameters - **module_name** (Optional[str]) - Optional - Filter by module name. #### Unload Module ##### Method `unload_module` ##### Description Unloads a kernel module from the system. ##### Parameters - **module_name** (str) - Required - The name of the module to unload. - **options** (Optional[str]) - Optional - Additional options for unloading. - **with_dependencies** (bool) - Optional - Whether to unload with dependencies (default: false). #### Install Package via RPM ##### Method `install_package_via_rpm` ##### Description Installs a package using the RPM package manager. ##### Parameters - **package** (str) - Required - The name of the package to install. - **cwd** (Optional[Union[Path, str]]) - Optional - The current working directory. #### Install Package via YUM ##### Method `install_package_via_yum` ##### Description Installs a package using the YUM package manager. ##### Parameters - **package** (str) - Required - The name of the package to install. - **cwd** (Optional[Union[Path, str]]) - Optional - The current working directory. #### Remove Package via YUM ##### Method `remove_package_via_yum` ##### Description Removes a package using the YUM package manager. ##### Parameters - **package** (str) - Required - The name of the package to remove. - **cwd** (Optional[Union[Path, str]]) - Optional - The current working directory. #### Remove Package via DNF ##### Method `remove_package_via_dnf` ##### Description Removes a package using the DNF package manager. ##### Parameters - **package** (str) - Required - The name of the package to remove. - **cwd** (Optional[Union[Path, str]]) - Optional - The current working directory. #### Update Initramfs via Update ##### Method `update_initramfs_via_update` ##### Description Updates the initramfs using the `update-initramfs` tool. #### Update Initramfs via Dracut ##### Method `update_initramfs_via_dracut` ##### Description Updates the initramfs using the `dracut` tool. #### Uninstall Module ##### Method `uninstall_module` ##### Description Removes a driver from the kernel. ##### Parameters - **module_name** (str) - Required - The name of the module to uninstall. - **kernel_version** (Optional[str]) - Optional - The kernel version from which to uninstall. #### Update Driver Dependencies ##### Method `update_driver_dependencies` ##### Description Updates driver dependencies using `depmod`. #### Uninstall Package via RPM ##### Method `uninstall_package_via_rpm` ##### Description Uninstalls a package using the RPM package manager. ##### Parameters - **package_name** (str) - Required - The name of the package to uninstall. #### Build RPM ##### Method `build_rpm` ##### Description Builds an RPM package from a module path and filename. ##### Parameters - **module_path** (Union[Path, str]) - Required - The path to the module. - **module_filename** (str) - Required - The filename of the module. #### Find Drivers ##### Method `find_drivers` ##### Description Finds compatible drivers for a device ID from a build on the controller. ##### Parameters - **build_path** (Union[str, Path]) - Required - The path to the build. - **device_id** (any) - Required - The ID of the device. #### Remove Driver from Initramfs ##### Method `remove_driver_from_initramfs` ##### Description Unloads a module and refreshes the initramfs. ##### Parameters - **module_name** (str) - Required - The name of the module to remove. #### Read Driver Details ##### Method `read_driver_details` ##### Description Retrieves the name and version of a driver from its tar filename. ##### Parameters - **driver_tar_filename** (str) - Required - The filename of the driver tarball. #### Get Drivers Details ##### Method `get_drivers_details` ##### Description Retrieves the details (path, version, name) for a list of drivers. ##### Parameters - **list_of_drivers** (List[Path]) - Required - A list of driver paths. #### Is Loaded Driver Inbox ##### Method `is_loaded_driver_inbox` ##### Description Checks if a loaded driver is an inbox driver. ##### Parameters - **driver_name** (str) - Required - The name of the driver to check. #### Recompile and Load Driver ##### Method `recompile_and_load_driver` ##### Description Recompiles and reloads a driver. ##### Parameters - **driver_name** (str) - Required - The name of the driver. - **build_path** (Union[str, Path]) - Required - The path to the build. - **jobs** (Optional[Union[str, int]]) - Optional - Number of parallel jobs for compilation. - **cflags** (Optional[Union[Dict, str]]) - Optional - Compiler flags. #### Is Package Installed via RPM ##### Method `is_package_installed_via_rpm` ##### Description Verifies if a package is installed using RPM. ##### Parameters - **package** (str) - Required - The name of the package. - **cwd** (Path | str | None) - Optional - The current working directory. #### Is Package Installed via DPKG ##### Method `is_package_installed_via_dpkg` ##### Description Verifies if a package is installed using DPKG. ##### Parameters - **package** (str) - Required - The name of the package. - **cwd** (Path | str | None) - Optional - The current working directory. #### Install Package via DNF ##### Method `install_package_via_dnf` ##### Description Installs a package using the DNF package manager. ##### Parameters - **package** (str) - Required - The name of the package to install. - **cwd** (Path | str | None) - Optional - The current working directory. ```