imcsdk.utils package¶
Submodules¶
This module contains APIs to facilitate Imc backup and import
-
imcsdk.utils.imcbackup.
backup_imc
(handle, remote_host, remote_file, protocol, username, password, passphrase='', timeout_in_sec=600)[source]¶ backup_imc helps create and download Imc backups.
- Args:
handle (ImcHandle): Imc Connection handle remote_host (str): IP or Hostname for the remote host. remote_file (str): Absolute path and name for the backup file protocol (str) : “ftp”, “http”, “none”, “scp”, “sftp”, “tftp” username (str) : Remote Host user name password (str) : Remote Host user credentials/password passphrase (str) : Password for the backup file. timeout_in_sec (number) : time in seconds for which method waits
for the backUp file to generate before it exits.- Example:
remote_file = “/root/config_backup.xml” backup_imc(h,remote_file=remote_file,
protocol=”ftp”,username=”user”,password=”pass”, remote_host=”10.10.10.10”,passphrase=”xxxxxx”)
-
imcsdk.utils.imcbackup.
import_imc_backup
(handle, remote_host, remote_file, protocol, username, password, passphrase='')[source]¶ This operation uploads a Imc backup taken earlier via GUI or backup_imc operation for all configuration, system configuration, and logical configuration files. User can perform an import while the system is up and running.
- Args:
- handle (ImcHandle): connection handle remote_host (str): IP or Hostname for the remote host. remote_file (str): Absolute path and name for the backup file protocol (str) : “ftp”, “http”, “none”, “scp”, “sftp”, “tftp” username (str) : Remote Host user name password (str) : Remote Host user credentials/password passphrase (str) : Password for the backup file.
- Example:
remote_file = “/root/config_backup.xml” import_imc_backup(h,remote_file=remote_file,
protocol=”ftp”,username=”user”,password=”pass”, remote_host=”10.10.10.10”,passphrase=”xxxxxx”)
-
imcsdk.utils.imcfirmwareinstall.
update_imc_firmware_huu
(handle, remote_share, share_type, remote_ip, username, password, update_component, stop_on_error=None, timeout=None, verify_update=None, cimc_secure_boot=None)[source]¶
-
imcsdk.utils.imcfirmwareinstall.
validate_connection
(handle, timeout=900)[source]¶ Montiors IMC onnection, if connection exists return True else False Args:
handle (ImcHandle) timeout (number): timeout in seconds- Returns:
- True/False(bool)
- Raises:
- Exception if unable to connect to UCSM
This module contains the APIs used to create and download tech_support file.
-
imcsdk.utils.imctechsupport.
get_imc_tech_support
(handle, remote_host, remote_file, protocol, username, password, timeout_in_sec=600)[source]¶ This operation creates and downloads the technical support file for the specified Ucs server.
- Args:
handle (ImcHandle): Imc Connection handle remote_host (str): IP or Hostname for the remote host. remote_file (str): Absolute path and name for the tech support file protocol (str) : “ftp”, “http”, “none”, “scp”, “sftp”, “tftp” username (str) : Remote Host user name password (str) : Remote Host user credentials/password timeout_in_sec (number) : time in seconds for which method waits
for the backUp file to generate before it exits.- Example:
remote_file = “/root/tech_sup_backup.tar.gz” get_imc_tech_support(h,remote_file=remote_file,
protocol=”scp”,username=”user”,password=”pass”, remote_host=”10.10.10.10”)