├── .editorconfig ├── .flake8 ├── .gitignore ├── .pre-commit-config.yaml ├── .project ├── .travis.yml ├── AUTHORS.md ├── CHANGELOG.md ├── LICENSE.md ├── Makefile ├── Makefile.openssl1 ├── Makefile2 ├── MakefileSDK.ps1 ├── MakefileWin.ps1 ├── MakefileWin36.ps1 ├── MakefileWin4.ps1 ├── MakefileWin41.ps1 ├── MakefileWinLocal41.ps1 ├── MakefileWin_new.ps1 ├── Makefile_vmware ├── Makefile_vmware_code ├── Makefile_vmware_code_dsdk ├── README.rst ├── assets └── style.css ├── delapptoken.c ├── detectonly.c ├── docs ├── slate │ ├── .dockerignore │ ├── .editorconfig │ ├── .gitattributes │ ├── .github │ │ ├── ISSUE_TEMPLATE.md │ │ └── PULL_REQUEST_TEMPLATE.md │ ├── .gitignore │ ├── .travis.yml │ ├── CHANGELOG.md │ ├── CODE_OF_CONDUCT.md │ ├── Dockerfile │ ├── Gemfile │ ├── Gemfile.lock │ ├── LICENSE │ ├── README.md │ ├── Readme.txt │ ├── Vagrantfile │ ├── config.rb │ ├── deploy.sh │ ├── font-selection.json │ ├── lib │ │ ├── monokai_sublime_slate.rb │ │ ├── multilang.rb │ │ ├── nesting_unique_head.rb │ │ ├── toc_data.rb │ │ └── unique_head.rb │ ├── slate.sh │ └── source │ │ ├── fonts │ │ ├── slate.eot │ │ ├── slate.svg │ │ ├── slate.ttf │ │ ├── slate.woff │ │ └── slate.woff2 │ │ ├── images │ │ ├── BIOSPassword_1.png │ │ ├── BIOSPassword_2.png │ │ ├── BIOSPassword_3.png │ │ ├── BIOSPassword_4.png │ │ ├── BootOrder_1.png │ │ ├── BootOrder_2.png │ │ ├── BootOrder_3.png │ │ ├── BootOrder_4.png │ │ ├── BootOrder_5.png │ │ ├── BootOrder_6.png │ │ ├── FileBasedMode_1.png │ │ ├── InteractiveMode_1.png │ │ ├── MacAddress1.png │ │ ├── MacAddress2.png │ │ ├── NIC.png │ │ ├── Security_1.png │ │ ├── Security_2.png │ │ ├── Security_3.png │ │ ├── Security_4.png │ │ ├── TPM_disable.png │ │ ├── TPM_enable.png │ │ ├── checkbox-small.png │ │ ├── encryptionsettings.png │ │ ├── globalflags.png │ │ ├── logo.png │ │ ├── navbar.png │ │ ├── power.png │ │ ├── softwareinventory.png │ │ ├── tab_command.gif │ │ ├── tab_props.gif │ │ ├── tab_schema.gif │ │ ├── tab_types.gif │ │ ├── timezone1.png │ │ └── timezone2.png │ │ ├── includes │ │ ├── _advancedusage.md │ │ ├── _bioscommands.md │ │ ├── _changelog.md │ │ ├── _commands.md │ │ ├── _errors.md │ │ ├── _examplecommandsscripts.md │ │ ├── _globalcommands.md │ │ ├── _glossaryterms.md │ │ ├── _gowrong.md │ │ ├── _highsecurity.md │ │ ├── _ilocommands.md │ │ ├── _ilorepositorycommands.md │ │ ├── _installation.md │ │ ├── _knownissues.md │ │ ├── _macrocommandsandscripts.md │ │ ├── _overview.md │ │ ├── _persistentmemorycommands.md │ │ ├── _rawcommands.md │ │ ├── _smartarraycommands.md │ │ ├── _smartniccommands.md │ │ ├── _support.md │ │ └── _usage.md │ │ ├── index.html.md │ │ ├── javascripts │ │ ├── all.js │ │ ├── all_nosearch.js │ │ ├── app │ │ │ ├── _copy.js │ │ │ ├── _lang.js │ │ │ ├── _search.js │ │ │ └── _toc.js │ │ └── lib │ │ │ ├── _energize.js │ │ │ ├── _imagesloaded.min.js │ │ │ ├── _jquery.highlight.js │ │ │ ├── _jquery.js │ │ │ ├── _jquery.tocify.js │ │ │ ├── _jquery_ui.js │ │ │ └── _lunr.js │ │ ├── layouts │ │ └── layout.erb │ │ └── stylesheets │ │ ├── _icon-font.scss │ │ ├── _normalize.scss │ │ ├── _rtl.scss │ │ ├── _variables.scss │ │ ├── print.css.scss │ │ └── screen.css.scss └── sphinx │ ├── Makefile │ ├── conf.py │ ├── ilorest.rst │ └── make.bat ├── examples ├── Linux │ ├── Abort_Directory_Test.sh │ ├── Add_Federation_Group.sh │ ├── Add_User.sh │ ├── Administrator_reset_pw.sh │ ├── Basic_Auth_Login.sh │ ├── Boot_spp.sh │ ├── Cert_Auth_Login.sh │ ├── Cert_Request.sh │ ├── Change_Password.sh │ ├── Clear_AHS_Data.sh │ ├── Clear_EventLog.sh │ ├── Clear_IML.sh │ ├── Computer_Lock_Config.sh │ ├── Delete_Federation_Group.sh │ ├── Delete_User.sh │ ├── DriveLED-rawpatch.json │ ├── ERS_DC_SetWebProxy.sh │ ├── ERS_Get_Settings.sh │ ├── Eject_Virtual_Media.sh │ ├── Factory_Defaults.sh │ ├── Get_AHS_Status.sh │ ├── Get_All_Languages.sh │ ├── Get_All_Licenses.sh │ ├── Get_All_User_Info.sh │ ├── Get_Asset_Tag.sh │ ├── Get_Boot_Mode.sh │ ├── Get_Current_Boot_Mode.sh │ ├── Get_Directory_Test_Results.sh │ ├── Get_EmHealth.sh │ ├── Get_Embedded_Health.sh │ ├── Get_Encrypt.sh │ ├── Get_FIPS_Status.sh │ ├── Get_FW_Version.sh │ ├── Get_Federation_All_Groups_Info.sh │ ├── Get_Federation_Group.sh │ ├── Get_Federation_Multicast_Options.sh │ ├── Get_Global.sh │ ├── Get_Host_APO.sh │ ├── Get_Host_Power.sh │ ├── Get_Host_Power_Saver.sh │ ├── Get_Host_Pwr_Micro_Ver.sh │ ├── Get_Hotkey_Config.sh │ ├── Get_IML.sh │ ├── Get_LDAP_CA_Cert_Status.sh │ ├── Get_Language.sh │ ├── Get_Network.sh │ ├── Get_OA_Info.sh │ ├── Get_One_Time_Boot_Order.sh │ ├── Get_PS_Data.sh │ ├── Get_Persistent_Boot_Order.sh │ ├── Get_Persmouse_Status.sh │ ├── Get_PowerCap.sh │ ├── Get_Power_On_Time.sh │ ├── Get_Power_Readings.sh │ ├── Get_Product_Name.sh │ ├── Get_Pwreg_Alert_Threshold.sh │ ├── Get_Rack_Settings.sh │ ├── Get_SDCard_Status.sh │ ├── Get_SNMP_IM.sh │ ├── Get_SSO_Settings.sh │ ├── Get_Security_Msg.sh │ ├── Get_Server_FQDN.sh │ ├── Get_Server_Name.sh │ ├── Get_Supported_Boot_Mode.sh │ ├── Get_TPM_Status.sh │ ├── Get_UID_Status.sh │ ├── Get_User.sh │ ├── Get_VM_Status.sh │ ├── Get_iLO_Log.sh │ ├── Hotkey_Config.json │ ├── Hotkey_Config.sh │ ├── Import_Cert.sh │ ├── Import_LDAP_CA_Cert.sh │ ├── Insert_Virtual_Media.sh │ ├── License.sh │ ├── Mod_Encrypt_Settings.sh │ ├── Mod_Federation_Group.sh │ ├── Mod_Network_Settings.sh │ ├── Mod_SNMP_IM_Settings.sh │ ├── Mod_SSO_Settings.sh │ ├── Mod_User.sh │ ├── Mod_VLAN.sh │ ├── Mod_VM_Port_Settings.sh │ ├── RBSU_POST_IP.sh │ ├── Reset_RIB.sh │ ├── Reset_Server.sh │ ├── Send_Snmp_Test_Trap.sh │ ├── Set_AHS_Status.sh │ ├── Set_Asset_Tag.sh │ ├── Set_Boot_Mode.sh │ ├── Set_Brownout.sh │ ├── Set_Drives_Ledinidicator.sh │ ├── Set_FIPS_Enable.sh │ ├── Set_Federation_Multicast_Options.sh │ ├── Set_Host_APO.sh │ ├── Set_Host_Power.sh │ ├── Set_Host_Power_Saver.sh │ ├── Set_Language.sh │ ├── Set_One_Time_Boot_Order.sh │ ├── Set_Persistent_Boot_Order.sh │ ├── Set_Persmouse_Status.sh │ ├── Set_Power_Cap.sh │ ├── Set_Pwreg_Alert_Threshold.sh │ ├── Set_Security_Msg.sh │ ├── Set_Server_Name.sh │ ├── Set_Virtual_Power_BTN.sh │ ├── Shared_Network_Port.sh │ ├── Start_Directory_Test.sh │ ├── UID_Control.sh │ ├── Update_Firmware.sh │ ├── Update_Language.sh │ ├── add_sso_rec.sh │ └── delete_sso_rec.sh └── Windows │ ├── Abort_Directory_Test.bat │ ├── Add_Federation_Group.bat │ ├── Add_User.bat │ ├── Administrator_reset_pw.bat │ ├── Basic_Auth_Login.bat │ ├── Boot_spp.bat │ ├── Cert_Auth_Login.bat │ ├── Cert_Request.bat │ ├── Change_Password.bat │ ├── Clear_AHS_Data.bat │ ├── Clear_EventLog.bat │ ├── Clear_IML.bat │ ├── Computer_Lock_Config.bat │ ├── Delete_Federation_Group.bat │ ├── Delete_User.bat │ ├── ERS_DC_SetWebProxy.bat │ ├── ERS_Get_Settings.bat │ ├── Eject_Virtual_Media.bat │ ├── Factory_Defaults.bat │ ├── Get_AHS_Status.bat │ ├── Get_All_Languages.bat │ ├── Get_All_Licenses.bat │ ├── Get_All_User_Info.bat │ ├── Get_Asset_Tag.bat │ ├── Get_Boot_Mode.bat │ ├── Get_Current_Boot_Mode.bat │ ├── Get_Directory_Test_Results.bat │ ├── Get_EmHealth.bat │ ├── Get_Embedded_Health.bat │ ├── Get_Encrypt.bat │ ├── Get_FIPS_Status.bat │ ├── Get_FW_Version.bat │ ├── Get_Federation_All_Groups_Info.bat │ ├── Get_Federation_Group.bat │ ├── Get_Federation_Multicast_Options.bat │ ├── Get_Global.bat │ ├── Get_Host_APO.bat │ ├── Get_Host_Power.bat │ ├── Get_Host_Power_Saver.bat │ ├── Get_Host_Pwr_Micro_Ver.bat │ ├── Get_Hotkey_Config.bat │ ├── Get_IML.bat │ ├── Get_LDAP_CA_Cert_Status.bat │ ├── Get_Language.bat │ ├── Get_Network.bat │ ├── Get_OA_Info.bat │ ├── Get_One_Time_Boot_Order.bat │ ├── Get_PS_Data.bat │ ├── Get_Persistent_Boot_Order.bat │ ├── Get_Persmouse_Status.bat │ ├── Get_PowerCap.bat │ ├── Get_Power_On_Time.bat │ ├── Get_Power_Readings.bat │ ├── Get_Product_Name.bat │ ├── Get_Pwreg_Alert_Threshold.bat │ ├── Get_Rack_Settings.bat │ ├── Get_SDCard_Status.bat │ ├── Get_SNMP_IM.bat │ ├── Get_SSO_Settings.bat │ ├── Get_Security_Msg.bat │ ├── Get_Server_FQDN.bat │ ├── Get_Server_Name.bat │ ├── Get_Supported_Boot_Mode.bat │ ├── Get_TPM_Status.bat │ ├── Get_UID_Status.bat │ ├── Get_User.bat │ ├── Get_VM_Status.bat │ ├── Get_iLO_Log.bat │ ├── Hotkey_Config.bat │ ├── Hotkey_Config.json │ ├── Import_Cert.bat │ ├── Import_LDAP_CA_Cert.bat │ ├── Insert_Virtual_Media.bat │ ├── License.bat │ ├── Mod_Encrypt_Settings.bat │ ├── Mod_Federation_Group.bat │ ├── Mod_SNMP_IM_Settings.bat │ ├── Mod_SSO_Settings.bat │ ├── Mod_User.bat │ ├── Mod_VLAN.bat │ ├── Mod_VM_Port_Settings.bat │ ├── RBSU_POST_IP.bat │ ├── Reset_RIB.bat │ ├── Reset_Server.bat │ ├── Send_Snmp_Test_Trap.bat │ ├── Set_AHS_Status.bat │ ├── Set_Asset_Tag.bat │ ├── Set_Boot_Mode.bat │ ├── Set_Brownout.bat │ ├── Set_FIPS_Enable.bat │ ├── Set_Federation_Multicast_Options.bat │ ├── Set_Host_APO.bat │ ├── Set_Host_Power.bat │ ├── Set_Host_Power_Saver.bat │ ├── Set_Language.bat │ ├── Set_One_Time_Boot_Order.bat │ ├── Set_Persistent_Boot_Order.bat │ ├── Set_Persmouse_Status.bat │ ├── Set_PowerCap.bat │ ├── Set_Pwreg_Alert_Threshold.bat │ ├── Set_Security_Msg.bat │ ├── Set_Server_Name.bat │ ├── Set_Virtual_Power_BTN.bat │ ├── Shared_Network_Port.bat │ ├── Start_Directory_Test.bat │ ├── UID_Control.bat │ ├── Update_Firmware.bat │ ├── Update_Language.bat │ ├── add_sso_rec.bat │ └── delete_sso_rec.bat ├── extension_template └── NewCommand.py ├── genapptoken.c ├── hpe.ico ├── ilorest.sc ├── ilorest ├── __init__.py ├── chiflibrary │ └── __init__.py ├── cliutils.py ├── config │ ├── __init__.py │ ├── config.py │ └── rdmc_config.py ├── extensions │ ├── BIOS_COMMANDS │ │ ├── BiosDefaultsCommand.py │ │ ├── BootOrderCommand.py │ │ ├── IscsiConfigCommand.py │ │ ├── SetPasswordCommand.py │ │ └── __init__.py │ ├── COMMANDS │ │ ├── CommitCommand.py │ │ ├── DetectiLOCommand.py │ │ ├── GetCommand.py │ │ ├── InfoCommand.py │ │ ├── ListCommand.py │ │ ├── LoadCommand.py │ │ ├── LoginCommand.py │ │ ├── LogoutCommand.py │ │ ├── PendingChangesCommand.py │ │ ├── REQUIREDCOMMANDS │ │ │ ├── ExitCommand.py │ │ │ ├── HelpCommand.py │ │ │ └── __init__.py │ │ ├── ResultsCommand.py │ │ ├── SaveCommand.py │ │ ├── SelectCommand.py │ │ ├── SetCommand.py │ │ ├── StatusCommand.py │ │ ├── TypesCommand.py │ │ └── __init__.py │ ├── PERSISTENT_MEMORY_COMMANDS │ │ ├── AdvancedPmmConfigCommand.py │ │ ├── ApplyPmemConfigCommand.py │ │ ├── ClearPendingConfigCommand.py │ │ ├── DisplaySecurityStateCommand.py │ │ ├── ShowPmemCommand.py │ │ ├── ShowPmemPendingConfigCommand.py │ │ ├── ShowRecommendedConfigCommand.py │ │ ├── __init__.py │ │ └── lib │ │ │ ├── DisplayHelpers.py │ │ │ ├── Mapper.py │ │ │ ├── MapperRenderers.py │ │ │ ├── PmemHelpers.py │ │ │ ├── RestHelpers.py │ │ │ └── __init__.py │ ├── RAW_COMMANDS │ │ ├── RawDeleteCommand.py │ │ ├── RawGetCommand.py │ │ ├── RawHeadCommand.py │ │ ├── RawPatchCommand.py │ │ ├── RawPostCommand.py │ │ ├── RawPutCommand.py │ │ └── __init__.py │ ├── SMART_ARRAY_COMMANDS │ │ ├── ClearControllerConfigCommand.py │ │ ├── CreateVolumeCommand.py │ │ ├── DeleteVolumeCommand.py │ │ ├── DriveSanitizeCommand.py │ │ ├── FactoryResetControllerCommand.py │ │ ├── StorageControllerCommand.py │ │ └── __init__.py │ ├── SMART_NIC_COMMANDS │ │ ├── SmartNicCommand.py │ │ └── __init__.py │ ├── __init__.py │ ├── _hidden_commands │ │ ├── AHSdiagCommand.py │ │ ├── AutomaticTestingCommand.py │ │ ├── ExportAllConfigCommand.py │ │ ├── GetInventoryCommand.py │ │ ├── HpGooeyCommand.py │ │ ├── ISToolCommand.py │ │ ├── MonolithCommand.py │ │ ├── SMBiosCommand.py │ │ ├── SecurityStatusCommand.py │ │ └── __init__.py │ ├── iLO_COMMANDS │ │ ├── AppAccountCommand.py │ │ ├── CertificateCommand.py │ │ ├── ChannelInterfaceCommand.py │ │ ├── ClearRestApiStateCommand.py │ │ ├── ComputeOpsManagementCommand.py │ │ ├── DirectoryCommand.py │ │ ├── DisableIloFunctionalityCommand.py │ │ ├── ESKMCommand.py │ │ ├── EthernetCommand.py │ │ ├── FactoryDefaultsCommand.py │ │ ├── FirmwareIntegrityCheckCommand.py │ │ ├── FirmwareUpdateCommand.py │ │ ├── IPProfilesCommand.py │ │ ├── IloAccountsCommand.py │ │ ├── IloBackupRestoreCommand.py │ │ ├── IloFederationCommand.py │ │ ├── IloLicenseCommand.py │ │ ├── IloResetCommand.py │ │ ├── OneButtonEraseCommand.py │ │ ├── RebootCommand.py │ │ ├── SendTestCommand.py │ │ ├── ServerCloneCommand.py │ │ ├── ServerConfigurationLockCommand.py │ │ ├── ServerInfoCommand.py │ │ ├── ServerStateCommand.py │ │ ├── ServerlogsCommand.py │ │ ├── SetTwoFactorAuthenticationCommand.py │ │ ├── SigRecomputeCommand.py │ │ ├── SingleSignOnCommand.py │ │ ├── VirtualMediaCommand.py │ │ └── __init__.py │ └── iLO_REPOSITORY_COMMANDS │ │ ├── DeleteComponentCommand.py │ │ ├── DownloadComponentCommand.py │ │ ├── FwpkgCommand.py │ │ ├── InstallSetCommand.py │ │ ├── ListComponentCommand.py │ │ ├── MaintenanceWindowCommand.py │ │ ├── MakeInstallSetCommand.py │ │ ├── UpdateTaskQueueCommand.py │ │ ├── UploadComponentCommand.py │ │ └── __init__.py ├── hpe.ico ├── ilorest.sh ├── rdmc.py ├── rdmc_base_classes.py ├── rdmc_helper.py └── versioning.py ├── libcrypt.so.1 ├── linux_local_build_creation.sh ├── patches ├── openssl-python.patch └── ssl-patch.patch ├── pull_request_template ├── pyproject.toml ├── rdmc-linux.conf ├── rdmc-pyinstaller-lin.spc ├── rdmc-pyinstaller-lin.spec ├── rdmc-pyinstaller-mac.spec ├── rdmc-pyinstaller-windows.spec ├── rdmc-windows.conf ├── rdmc.spec.in ├── rdmc.spec10.in ├── rdmc.spec11.in ├── rdmc.spec12.in ├── rebuild.sh ├── requirements.txt ├── setup.cfg ├── setup.py ├── src ├── cliutils.py ├── config │ ├── __init__.py │ ├── config.py │ └── rdmc_config.py ├── extensions │ ├── BIOS_COMMANDS │ │ ├── BiosDefaultsCommand.py │ │ ├── BootOrderCommand.py │ │ ├── IscsiConfigCommand.py │ │ ├── SetPasswordCommand.py │ │ └── __init__.py │ ├── COMMANDS │ │ ├── CommitCommand.py │ │ ├── GetCommand.py │ │ ├── InfoCommand.py │ │ ├── ListCommand.py │ │ ├── LoadCommand.py │ │ ├── LoginCommand.py │ │ ├── LogoutCommand.py │ │ ├── PendingChangesCommand.py │ │ ├── REQUIREDCOMMANDS │ │ │ ├── ExitCommand.py │ │ │ ├── HelpCommand.py │ │ │ └── __init__.py │ │ ├── ResultsCommand.py │ │ ├── SaveCommand.py │ │ ├── SelectCommand.py │ │ ├── SetCommand.py │ │ ├── StatusCommand.py │ │ ├── TypesCommand.py │ │ └── __init__.py │ ├── PERSISTENT_MEMORY_COMMANDS │ │ ├── AdvancedPmmConfigCommand.py │ │ ├── ApplyPmemConfigCommand.py │ │ ├── ClearPendingConfigCommand.py │ │ ├── DisplaySecurityStateCommand.py │ │ ├── ShowPmemCommand.py │ │ ├── ShowPmemPendingConfigCommand.py │ │ ├── ShowRecommendedConfigCommand.py │ │ ├── __init__.py │ │ └── lib │ │ │ ├── DisplayHelpers.py │ │ │ ├── Mapper.py │ │ │ ├── MapperRenderers.py │ │ │ ├── PmemHelpers.py │ │ │ ├── RestHelpers.py │ │ │ └── __init__.py │ ├── RAW_COMMANDS │ │ ├── RawDeleteCommand.py │ │ ├── RawGetCommand.py │ │ ├── RawHeadCommand.py │ │ ├── RawPatchCommand.py │ │ ├── RawPostCommand.py │ │ ├── RawPutCommand.py │ │ └── __init__.py │ ├── SMART_ARRAY_COMMANDS │ │ ├── ClearControllerConfigCommand.py │ │ ├── CreateLogicalDriveCommand.py │ │ ├── CreateVolumeCommand.py │ │ ├── DeleteLogicalDriveCommand.py │ │ ├── DeleteVolumeCommand.py │ │ ├── DriveSanitizeCommand.py │ │ ├── FactoryResetControllerCommand.py │ │ ├── SmartArrayCommand.py │ │ ├── StorageControllerCommand.py │ │ └── __init__.py │ ├── SMART_NIC_COMMANDS │ │ ├── SmartNicCommand.py │ │ └── __init__.py │ ├── __init__.py │ ├── iLO_COMMANDS │ │ ├── CertificateCommand.py │ │ ├── ClearRestApiStateCommand.py │ │ ├── ComputeOpsManagementCommand.py │ │ ├── DirectoryCommand.py │ │ ├── DisableIloFunctionalityCommand.py │ │ ├── ESKMCommand.py │ │ ├── EthernetCommand.py │ │ ├── FactoryDefaultsCommand.py │ │ ├── FirmwareIntegrityCheckCommand.py │ │ ├── FirmwareUpdateCommand.py │ │ ├── IPProfilesCommand.py │ │ ├── IloAccountsCommand.py │ │ ├── IloBackupRestoreCommand.py │ │ ├── IloFederationCommand.py │ │ ├── IloLicenseCommand.py │ │ ├── IloResetCommand.py │ │ ├── OneButtonEraseCommand.py │ │ ├── RebootCommand.py │ │ ├── SendTestCommand.py │ │ ├── ServerCloneCommand.py │ │ ├── ServerConfigurationLockCommand.py │ │ ├── ServerInfoCommand.py │ │ ├── ServerStateCommand.py │ │ ├── ServerlogsCommand.py │ │ ├── SetTwoFactorAuthenticationCommand.py │ │ ├── SigRecomputeCommand.py │ │ ├── SingleSignOnCommand.py │ │ ├── VirtualMediaCommand.py │ │ └── __init__.py │ └── iLO_REPOSITORY_COMMANDS │ │ ├── DeleteComponentCommand.py │ │ ├── DownloadComponentCommand.py │ │ ├── FwpkgCommand.py │ │ ├── InstallSetCommand.py │ │ ├── ListComponentCommand.py │ │ ├── MaintenanceWindowCommand.py │ │ ├── MakeInstallSetCommand.py │ │ ├── UpdateTaskQueueCommand.py │ │ ├── UploadComponentCommand.py │ │ └── __init__.py ├── hpe.ico ├── ilorest.sh ├── rdmc.py ├── rdmc_base_classes.py ├── rdmc_helper.py └── versioning.py ├── tox.ini └── win32 ├── hpe.ico ├── rdmc-envs.bat ├── rdmc-pyinstaller.spec.in ├── rdmc.x86_64.wxs └── symlink.bat /.editorconfig: -------------------------------------------------------------------------------- 1 | max-line-length = 120 2 | extend-ignore = E203 3 | [*.py] 4 | profile = black 5 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- 1 | [flake8] 2 | max-line-length = 120 3 | extend-ignore = E203, E722, C901, E731 4 | exclude = 5 | .git, 6 | packaging, 7 | __pycache__, 8 | build, 9 | dist, 10 | docs, 11 | tests, 12 | src\\extensions\\_hidden_commands\\AutomaticTestingCommand.py, 13 | max-complexity = 10 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | src/ilorest.log 5 | /build 6 | /dist 7 | .settings 8 | .idea/ 9 | .cache/ 10 | ilorest_chif.dll 11 | ilorest.egg-info 12 | .eggs 13 | docs/slate/ubuntu-*-console.log 14 | *.log 15 | *.json 16 | venv 17 | pip-wheel-metadata 18 | ilorest/redfish 19 | src 20 | 21 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v4.4.0 4 | hooks: 5 | - id: check-yaml 6 | - id: end-of-file-fixer 7 | - id: trailing-whitespace 8 | - repo: https://github.com/psf/black 9 | rev: 22.10.0 10 | hooks: 11 | - id: black 12 | language_version: python3.11 13 | - id: black-jupyter 14 | language_version: python3.11 15 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | rdmc 4 | 5 | 6 | redfish 7 | 8 | 9 | 10 | org.python.pydev.PyDevBuilder 11 | 12 | 13 | 14 | 15 | 16 | org.python.pydev.pythonNature 17 | 18 | 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3 | - "3.7" 4 | install: 5 | - python --version 6 | - pip install -U pip 7 | - easy_install distribute 8 | - pip install --upgrade distribute 9 | - pip install -U pytest 10 | - pip install codecov 11 | # command to run tests 12 | script: nosetests 13 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Original Contribution: 2 | 3 | * [Jack Garcia](//github.com/lumbajack) - HPE - Hewlett Packard Enterprise Restful API Group 4 | 5 | # Other Key Contributions: 6 | 7 | *For a list of people who have contributed to the codebase, see [GitHub's list of contributors](https://github.com/DMTF/python-redfish-utility/contributors).* 8 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | # Change Log 3 | 4 | ## [1.0.0] - 2017-01-12 5 | - Initial Public Release -- supports Redfish 1.0 features 6 | -------------------------------------------------------------------------------- /docs/slate/.dockerignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .github/ 3 | -------------------------------------------------------------------------------- /docs/slate/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # Top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | indent_style = space 11 | indent_size = 2 12 | trim_trailing_whitespace = true 13 | 14 | [*.rb] 15 | charset = utf-8 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /docs/slate/.gitattributes: -------------------------------------------------------------------------------- 1 | source/javascripts/lib/* linguist-vendored 2 | -------------------------------------------------------------------------------- /docs/slate/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | If this is a question or feature request, make sure to: 2 | 3 | - [ ] The title starts with `Question:` or `Feature:`. 4 | 5 | If this is an bug report, not a question, make sure to: 6 | 7 | - [ ] I'm not running Windows (which is unsupported), or if I am, I can confirm this issue appears on another platform, or Vagrant. 8 | - [ ] This issue appears in the latest `dev` branch. 9 | - [ ] I've included my browser and Ruby version in this issue. 10 | -------------------------------------------------------------------------------- /docs/slate/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Make sure you've checked off all these things before submitting: 2 | 3 | - [ ] This pull request isn't for a company's fork, it's intended for the upstream Slate shared by everybody. 4 | - [ ] This pull request is submitted to the `dev` branch. 5 | - [ ] If it makes frontend changes, this pull request has been tested in the latest version of Firefox, Chrome, IE, and Safari. 6 | -------------------------------------------------------------------------------- /docs/slate/.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.rbc 3 | .bundle 4 | .config 5 | coverage 6 | InstalledFiles 7 | lib/bundler/man 8 | pkg 9 | rdoc 10 | spec/reports 11 | test/tmp 12 | test/version_tmp 13 | tmp 14 | *.DS_STORE 15 | build/ 16 | .cache 17 | .vagrant 18 | .sass-cache 19 | .yardoc 20 | _yardoc 21 | doc/ 22 | .idea/ 23 | ubuntu-*-console.log 24 | -------------------------------------------------------------------------------- /docs/slate/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: ruby 4 | 5 | rvm: 6 | - 2.0.0 7 | - 2.1.0 8 | 9 | cache: bundler 10 | script: bundle exec middleman build 11 | -------------------------------------------------------------------------------- /docs/slate/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ruby:2.6-slim 2 | 3 | WORKDIR /srv/slate 4 | 5 | VOLUME /srv/slate/build 6 | VOLUME /srv/slate/source 7 | 8 | EXPOSE 4567 9 | 10 | COPY Gemfile . 11 | COPY Gemfile.lock . 12 | 13 | RUN apt-get update \ 14 | && apt-get install -y --no-install-recommends \ 15 | build-essential \ 16 | git \ 17 | nodejs \ 18 | && gem install bundler \ 19 | && bundle install \ 20 | && apt-get remove -y build-essential git \ 21 | && apt-get autoremove -y \ 22 | && rm -rf /var/lib/apt/lists/* 23 | 24 | COPY . /srv/slate 25 | 26 | RUN chmod +x /srv/slate/slate.sh 27 | 28 | ENTRYPOINT ["/srv/slate/slate.sh"] 29 | CMD ["build"] 30 | -------------------------------------------------------------------------------- /docs/slate/Gemfile: -------------------------------------------------------------------------------- 1 | ruby '>= 2.5' 2 | source 'https://rubygems.org' 3 | 4 | # Middleman 5 | gem 'middleman', '~> 4.4' 6 | gem 'middleman-syntax', '~> 3.2' 7 | gem 'middleman-autoprefixer', '~> 3.0' 8 | gem 'middleman-sprockets', '~> 4.1' 9 | gem 'rouge', '~> 3.21' 10 | gem 'redcarpet', '~> 3.5.0' 11 | gem 'nokogiri', '~> 1.12.1' 12 | gem 'sass' 13 | gem 'webrick' -------------------------------------------------------------------------------- /docs/slate/lib/multilang.rb: -------------------------------------------------------------------------------- 1 | module Multilang 2 | def block_code(code, full_lang_name) 3 | if full_lang_name 4 | parts = full_lang_name.split('--') 5 | rouge_lang_name = (parts) ? parts[0] : "" # just parts[0] here causes null ref exception when no language specified 6 | super(code, rouge_lang_name).sub("highlight #{rouge_lang_name}") do |match| 7 | match + " tab-" + full_lang_name 8 | end 9 | else 10 | super(code, full_lang_name) 11 | end 12 | end 13 | end 14 | 15 | require 'middleman-core/renderers/redcarpet' 16 | Middleman::Renderers::MiddlemanRedcarpetHTML.send :include, Multilang 17 | -------------------------------------------------------------------------------- /docs/slate/lib/nesting_unique_head.rb: -------------------------------------------------------------------------------- 1 | # Nested unique header generation 2 | require 'middleman-core/renderers/redcarpet' 3 | 4 | class NestingUniqueHeadCounter < Middleman::Renderers::MiddlemanRedcarpetHTML 5 | def initialize 6 | super 7 | @@headers_history = {} if !defined?(@@headers_history) 8 | end 9 | 10 | def header(text, header_level) 11 | friendly_text = text.gsub(/<[^>]*>/,"").parameterize 12 | @@headers_history[header_level] = text.parameterize 13 | 14 | if header_level > 1 15 | for i in (header_level - 1).downto(1) 16 | friendly_text.prepend("#{@@headers_history[i]}-") if @@headers_history.key?(i) 17 | end 18 | end 19 | 20 | return "#{text}" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /docs/slate/lib/toc_data.rb: -------------------------------------------------------------------------------- 1 | require 'nokogiri' 2 | 3 | def toc_data(page_content) 4 | html_doc = Nokogiri::HTML::DocumentFragment.parse(page_content) 5 | 6 | # get a flat list of headers 7 | headers = [] 8 | html_doc.css('h1, h2, h3, h4, h5').each do |header| 9 | headers.push({ 10 | id: header.attribute('id').to_s, 11 | content: header.children, 12 | title: header.children.to_s.gsub(/<[^>]*>/, ''), 13 | level: header.name[1].to_i, 14 | children: [] 15 | }) 16 | end 17 | 18 | [5,4,3,2].each do |header_level| 19 | header_to_nest = nil 20 | headers = headers.reject do |header| 21 | if header[:level] == header_level 22 | header_to_nest[:children].push header if header_to_nest 23 | true 24 | else 25 | header_to_nest = header if header[:level] < header_level 26 | false 27 | end 28 | end 29 | end 30 | headers 31 | end 32 | -------------------------------------------------------------------------------- /docs/slate/lib/unique_head.rb: -------------------------------------------------------------------------------- 1 | # Unique header generation 2 | require 'middleman-core/renderers/redcarpet' 3 | require 'digest' 4 | class UniqueHeadCounter < Middleman::Renderers::MiddlemanRedcarpetHTML 5 | def initialize 6 | super 7 | @head_count = {} 8 | end 9 | def header(text, header_level) 10 | friendly_text = text.gsub(/<[^>]*>/,"").parameterize 11 | if friendly_text.strip.length == 0 12 | # Looks like parameterize removed the whole thing! It removes many unicode 13 | # characters like Chinese and Russian. To get a unique URL, let's just 14 | # URI escape the whole header 15 | friendly_text = Digest::SHA1.hexdigest(text)[0,10] 16 | end 17 | @head_count[friendly_text] ||= 0 18 | @head_count[friendly_text] += 1 19 | if @head_count[friendly_text] > 1 20 | friendly_text += "-#{@head_count[friendly_text]}" 21 | end 22 | return "#{text}" 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /docs/slate/source/fonts/slate.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/fonts/slate.eot -------------------------------------------------------------------------------- /docs/slate/source/fonts/slate.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/fonts/slate.ttf -------------------------------------------------------------------------------- /docs/slate/source/fonts/slate.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/fonts/slate.woff -------------------------------------------------------------------------------- /docs/slate/source/fonts/slate.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/fonts/slate.woff2 -------------------------------------------------------------------------------- /docs/slate/source/images/BIOSPassword_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BIOSPassword_1.png -------------------------------------------------------------------------------- /docs/slate/source/images/BIOSPassword_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BIOSPassword_2.png -------------------------------------------------------------------------------- /docs/slate/source/images/BIOSPassword_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BIOSPassword_3.png -------------------------------------------------------------------------------- /docs/slate/source/images/BIOSPassword_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BIOSPassword_4.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_1.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_2.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_3.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_4.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_5.png -------------------------------------------------------------------------------- /docs/slate/source/images/BootOrder_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/BootOrder_6.png -------------------------------------------------------------------------------- /docs/slate/source/images/FileBasedMode_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/FileBasedMode_1.png -------------------------------------------------------------------------------- /docs/slate/source/images/InteractiveMode_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/InteractiveMode_1.png -------------------------------------------------------------------------------- /docs/slate/source/images/MacAddress1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/MacAddress1.png -------------------------------------------------------------------------------- /docs/slate/source/images/MacAddress2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/MacAddress2.png -------------------------------------------------------------------------------- /docs/slate/source/images/NIC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/NIC.png -------------------------------------------------------------------------------- /docs/slate/source/images/Security_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/Security_1.png -------------------------------------------------------------------------------- /docs/slate/source/images/Security_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/Security_2.png -------------------------------------------------------------------------------- /docs/slate/source/images/Security_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/Security_3.png -------------------------------------------------------------------------------- /docs/slate/source/images/Security_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/Security_4.png -------------------------------------------------------------------------------- /docs/slate/source/images/TPM_disable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/TPM_disable.png -------------------------------------------------------------------------------- /docs/slate/source/images/TPM_enable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/TPM_enable.png -------------------------------------------------------------------------------- /docs/slate/source/images/checkbox-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/checkbox-small.png -------------------------------------------------------------------------------- /docs/slate/source/images/encryptionsettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/encryptionsettings.png -------------------------------------------------------------------------------- /docs/slate/source/images/globalflags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/globalflags.png -------------------------------------------------------------------------------- /docs/slate/source/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/logo.png -------------------------------------------------------------------------------- /docs/slate/source/images/navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/navbar.png -------------------------------------------------------------------------------- /docs/slate/source/images/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/power.png -------------------------------------------------------------------------------- /docs/slate/source/images/softwareinventory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/softwareinventory.png -------------------------------------------------------------------------------- /docs/slate/source/images/tab_command.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/tab_command.gif -------------------------------------------------------------------------------- /docs/slate/source/images/tab_props.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/tab_props.gif -------------------------------------------------------------------------------- /docs/slate/source/images/tab_schema.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/tab_schema.gif -------------------------------------------------------------------------------- /docs/slate/source/images/tab_types.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/tab_types.gif -------------------------------------------------------------------------------- /docs/slate/source/images/timezone1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/timezone1.png -------------------------------------------------------------------------------- /docs/slate/source/images/timezone2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/docs/slate/source/images/timezone2.png -------------------------------------------------------------------------------- /docs/slate/source/includes/_commands.md: -------------------------------------------------------------------------------- 1 | # Commands for the RESTful Interface Tool -------------------------------------------------------------------------------- /docs/slate/source/includes/_overview.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | The RESTful Interface Tool (iLOREST) is a command-line interface that allows you to manage Hewlett Packard Enterprise 4 | products that take advantage of RESTful APIs. For this release of the tool, you can manage HPE Gen11 servers running iLO6 1.10 onwards or Gen10 servers running iLO 5 version 2.10 or later and Gen9 servers running iLO 4 version 2.10 or later through iLO RESTful APIs. 5 | You can install the tool on your laptop(windows/mac) for remote use or you can install the tool locally on a server with a Windows/Linux/Ubuntu/ESXi OS. In addition to using the tool manually to execute individual commands, 6 | you can create scripts to automate tasks. 7 | 8 | iLOREST can display and set parameters for the following: 9 | 10 | - **HPE BIOS/UEFI (including secure boot)** 11 | - **HPE iLO 4/iLO 5** 12 | - **HPE iLO Repository** 13 | - **Smart Array support** 14 | -------------------------------------------------------------------------------- /docs/slate/source/index.html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: RESTful Interface Tool 3.2.2 User Guide 3 | 4 | language_tabs: 5 | - shell: Shell 6 | 7 | toc_footers: 8 | - Hewlett Packard Enterprise Development LP 9 | - Copyright © 2016-2023 10 | 11 | includes: 12 | - overview 13 | - changelog 14 | - installation 15 | - usage 16 | - highsecurity 17 | - globalcommands 18 | - bioscommands 19 | - ilocommands 20 | - ilorepositorycommands 21 | - smartarraycommands 22 | - smartniccommands 23 | - persistentmemorycommands 24 | - rawcommands 25 | - advancedusage 26 | - examplecommandsscripts 27 | - gowrong 28 | - support 29 | - knownissues 30 | - errors 31 | - glossaryterms 32 | 33 | search: true 34 | --- 35 | -------------------------------------------------------------------------------- /docs/slate/source/javascripts/all.js: -------------------------------------------------------------------------------- 1 | //= require ./all_nosearch 2 | //= require ./app/_search 3 | -------------------------------------------------------------------------------- /docs/slate/source/javascripts/all_nosearch.js: -------------------------------------------------------------------------------- 1 | //= require ./lib/_energize 2 | //= require ./app/_copy 3 | //= require ./app/_toc 4 | //= require ./app/_lang 5 | 6 | function adjustLanguageSelectorWidth() { 7 | const elem = $('.dark-box > .lang-selector'); 8 | elem.width(elem.parent().width()); 9 | } 10 | 11 | $(function() { 12 | loadToc($('#toc'), '.toc-link', '.toc-list-h2, .toc-list-h3, .toc-list-h4', 10); 13 | setupLanguages($('body').data('languages')); 14 | $('.content').imagesLoaded( function() { 15 | window.recacheHeights(); 16 | window.refreshToc(); 17 | }); 18 | 19 | $(window).resize(function() { 20 | adjustLanguageSelectorWidth(); 21 | }); 22 | adjustLanguageSelectorWidth(); 23 | }); 24 | 25 | window.onpopstate = function() { 26 | activateLanguage(getLanguageFromQueryString()); 27 | }; 28 | -------------------------------------------------------------------------------- /docs/slate/source/javascripts/app/_copy.js: -------------------------------------------------------------------------------- 1 | function copyToClipboard(container) { 2 | const el = document.createElement('textarea'); 3 | el.value = container.textContent.replace(/\n$/, ''); 4 | document.body.appendChild(el); 5 | el.select(); 6 | document.execCommand('copy'); 7 | document.body.removeChild(el); 8 | } 9 | 10 | function setupCodeCopy() { 11 | $('pre.highlight').prepend('
Copy to Clipboard
'); 12 | $('.copy-clipboard').on('click', function() { 13 | copyToClipboard(this.parentNode.children[1]); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /docs/slate/source/stylesheets/_icon-font.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'slate'; 3 | src:font-url('slate.eot?-syv14m'); 4 | src:font-url('slate.eot?#iefix-syv14m') format('embedded-opentype'), 5 | font-url('slate.woff2?-syv14m') format('woff2'), 6 | font-url('slate.woff?-syv14m') format('woff'), 7 | font-url('slate.ttf?-syv14m') format('truetype'), 8 | font-url('slate.svg?-syv14m#slate') format('svg'); 9 | font-weight: normal; 10 | font-style: normal; 11 | } 12 | 13 | %icon { 14 | font-family: 'slate'; 15 | speak: none; 16 | font-style: normal; 17 | font-weight: normal; 18 | font-variant: normal; 19 | text-transform: none; 20 | line-height: 1; 21 | } 22 | 23 | %icon-exclamation-sign { 24 | @extend %icon; 25 | content: "\e600"; 26 | } 27 | %icon-info-sign { 28 | @extend %icon; 29 | content: "\e602"; 30 | } 31 | %icon-ok-sign { 32 | @extend %icon; 33 | content: "\e606"; 34 | } 35 | %icon-search { 36 | @extend %icon; 37 | content: "\e607"; 38 | } 39 | -------------------------------------------------------------------------------- /examples/Linux/Abort_Directory_Test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to abort directory # 7 | # test on following device: # 8 | # Integrated Lights-Out 5 (iLO 5) # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # values with values that are appropriate for your # 12 | # environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | 17 | runLocal(){ 18 | ilorest directory test stop -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest directory test stop --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Abort_Directory_Test.sh ^ ^ ^" 30 | echo "local: Abort_Directory_Test.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Boot_spp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to mount the SPP # 7 | # media image, reboot the system, and boot to it. # 8 | 9 | # NOTE: You will need to replace the # 10 | # http://xx.xx.xx.xx/images/media.iso with the location of # 11 | # the SPP you want to mount. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --bootnextreset --reboot=ForceRestart 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --bootnextreset --reboot=ForceRestart --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Boot_spp.sh ^ ^ ^" 30 | echo "local: Boot_spp.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Change_Password.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to change a user's # 7 | # password in the database of local users on # 8 | # following devices: # 9 | # Integrated Lights-Out 4 (iLO 4) # 10 | # Integrated Lights-Out 5 (iLO 5) # 11 | 12 | # NOTE: You will need to replace the values inside the quote # 13 | # marks with values that are appropriate for your # 14 | # environment. # 15 | 16 | runLocal(){ 17 | ilorest iloaccounts changepass USERNAME NEWPASSWORD -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest iloaccounts changepass USERNAME NEWPASSWORD --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Change_Password.sh ^ ^ ^" 29 | echo "local: Change_Password.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Clear_AHS_Data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to clear AHS # 7 | # data. # 8 | 9 | # Firmware support information for this script: # 10 | # iLO 4 - All versions. # 11 | # iLO 5 - All versions. # 12 | 13 | 14 | runLocal(){ 15 | ilorest serverlogs --selectlog=AHS --clearlog -u USER_LOGIN -p PASSWORD 16 | ilorest logout 17 | } 18 | 19 | runRemote(){ 20 | ilorest serverlogs --selectlog=AHS --clearlog --url=$1 --user $2 --password $3 21 | ilorest logout 22 | } 23 | 24 | error(){ 25 | echo "Usage:" 26 | echo "remote: Clear_AHS_Data.sh ^ ^ ^" 27 | echo "local: Clear_AHS_Data.sh" 28 | } 29 | 30 | if [ "$#" -eq "3" ] 31 | then 32 | runRemote "$1" "$2" "$3" 33 | elif [ "$#" -eq "0" ] 34 | then 35 | runLocal 36 | else 37 | error 38 | fi -------------------------------------------------------------------------------- /examples/Linux/Clear_EventLog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to clear the event # 7 | # log on following devices: # 8 | # Integrated Lights-Out 4 (iLO 4) # 9 | # Integrated Lights-Out 5 (iLO 5) # 10 | 11 | # Firmware support information for this script: # 12 | # iLO 5 - All versions. # 13 | # iLO 4 - All versions. # 14 | 15 | runLocal(){ 16 | ilorest serverlogs --selectlog=IEL --clearlog -u USER_LOGIN -p PASSWORD 17 | ilorest logout 18 | } 19 | 20 | runRemote(){ 21 | ilorest serverlogs --selectlog=IEL --clearlog --url=$1 --user $2 --password $3 22 | ilorest logout 23 | } 24 | 25 | error(){ 26 | echo "Usage:" 27 | echo "remote: Clear_EventLog.sh ^ ^ ^" 28 | echo "local: Clear_EventLog.sh" 29 | } 30 | 31 | if [ "$#" -eq "3" ] 32 | then 33 | runRemote "$1" "$2" "$3" 34 | elif [ "$#" -eq "0" ] 35 | then 36 | runLocal 37 | else 38 | error 39 | fi -------------------------------------------------------------------------------- /examples/Linux/Clear_IML.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample batch script to clear the server # 7 | # IML log from following devices: # 8 | # Integrated Lights-Out 4 (iLO 4) # 9 | # Integrated Lights-Out 5 (iLO 5) # 10 | 11 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 12 | # values with values that are appropriate for your # 13 | # environment. # 14 | 15 | # Firmware support information for this script: # 16 | # iLO 5 - All versions # 17 | # iLO 4 - All versions # 18 | 19 | runLocal(){ 20 | ilorest serverlogs --selectlog=IML --clearlog -u USER_LOGIN -p PASSWORD 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest serverlogs --selectlog=IML --clearlog --url=$1 --user $2 --password $3 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Clear_IML.sh ^ ^ ^" 32 | echo "local: Clear_IML.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi -------------------------------------------------------------------------------- /examples/Linux/DriveLED-rawpatch.json: -------------------------------------------------------------------------------- 1 | LIT JSON file 2 | { 3 | "path": "/redfish/v1/Systems/1/Storage/XXX/Drives/XXX", 4 | "body": { 5 | "IndicatorLED": "Lit" 6 | } 7 | } 8 | 9 | OFF JSON file 10 | { 11 | "path": "/redfish/v1/Systems/1/Storage/XXX/Drives/XXX", 12 | "body": { 13 | "IndicatorLED": "Off" 14 | } 15 | } -------------------------------------------------------------------------------- /examples/Linux/ERS_Get_Settings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample batch script to retrieve current # 7 | # ERS settings # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN, and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest get --selector=RemoteSupport. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get --selector=RemoteSupport. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: ERS_Get_Settings.sh ^ ^ ^" 29 | echo "local: ERS_Get_Settings.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Factory_Defaults.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to set the # 7 | # Lights-Out device to factory default settings. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest factorydefaults -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest factorydefaults --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Factory_Defaults.sh ^ ^ ^" 30 | echo "local: Factory_Defaults.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_AHS_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to find out if # 7 | # AHS is enabled or disabled. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get AHSEnabled --selector=iLOActiveHealthSystem. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get AHSEnabled --selector=iLOActiveHealthSystem. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_AHS_Status.sh ^ ^ ^" 30 | echo "local: Get_AHS_Status.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_All_Licenses.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the license # 7 | # information. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - version 1.20 and above # 16 | 17 | runLocal(){ 18 | ilorest get License --selector=iLOLicense. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get License --selector=iLOLicense. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_All_Licenses.sh ^ ^ ^" 30 | echo "local: Get_All_Licenses.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_All_User_Info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return all user's # 7 | # account information in the local user database. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | runLocal(){ 17 | ilorest iloaccounts -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest iloaccounts --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_All_User_Info.sh ^ ^ ^" 29 | echo "local: Get_All_User_Info.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Asset_Tag.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample batch script to get the asset # 7 | # tag. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - 1.05 or later. # 16 | runLocal(){ 17 | ilorest get ServerAssetTag --selector=Bios. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get ServerAssetTag --selector=Bios. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Asset_Tag.sh ^ ^ ^" 29 | echo "local: Get_Asset_Tag.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Boot_Mode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the pending # 7 | # boot mode. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - version 1.40 or later. # 16 | runLocal(){ 17 | ilorest get BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get BootMode --selector=Bios. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Boot_Mode.sh ^ ^ ^" 29 | echo "local: Get_Boot_Mode.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Current_Boot_Mode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the current # 7 | # boot mode. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - version 1.40 or later. # 16 | runLocal(){ 17 | ilorest get BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get BootMode --selector=Bios. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Current_Boot_Mode.sh ^ ^ ^" 29 | echo "local: Get_Current_Boot_Mode.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Directory_Test_Results.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get directory # 7 | # test results. # 8 | 9 | # The directory test results are reset when directory settings # 10 | # are saved, or when the directory tests are started. # 11 | 12 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 13 | # values with values that are appropriate for your # 14 | # environment. # 15 | 16 | # Firmware support information for this script: # 17 | # iLO 5 - All versions # 18 | 19 | runLocal(){ 20 | ilorest directory test viewresults -u USER_LOGIN -p PASSWORD 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest directory test viewresults --url=$1 --user $2 --password $3 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Get_Directory_Test_Results.sh ^ ^ ^" 32 | echo "local: Get_Directory_Test_Results.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_EmHealth.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve health # 7 | # information of the server. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_EmHealth.sh ^ ^ ^" 29 | echo "local: Get_EmHealth.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Embedded_Health.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve health # 7 | # information of the server. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Embedded_Health.sh ^ ^ ^" 29 | echo "local: Get_Embedded_Health.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Encrypt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return current # 7 | # smart array controller encryption settings # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - 1.40 or later. # 16 | 17 | runLocal(){ 18 | ilorest list --selector=SmartStorageArrayController. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest list --selector=SmartStorageArrayController. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Encrypt.sh ^ ^ ^" 30 | echo "local: Get_Encrypt.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_FIPS_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # current FIPs Mode # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest get TpmFips --selector=Bios. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get TpmFips --selector=Bios. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_FIPS_Status.sh ^ ^ ^" 29 | echo "local: Get_FIPS_Status.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Federation_All_Groups_Info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve a list # 7 | # of all Federation group memberships and granted # 8 | # privileges. # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # values with values that are appropriate for your # 12 | # environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | # iLO 4 - 1.40 or later. # 17 | 18 | runLocal(){ 19 | ilorest ilofederation -u USER_LOGIN -p PASSWORD 20 | ilorest logout 21 | } 22 | 23 | runRemote(){ 24 | ilorest ilofederation --url=$1 --user $2 --password $3 25 | ilorest logout 26 | } 27 | 28 | error(){ 29 | echo "Usage:" 30 | echo "remote: Get_Federation_All_Groups_Info.sh ^ ^ ^" 31 | echo "local: Get_Federation_All_Groups_Info.sh" 32 | } 33 | 34 | if [ "$#" -eq "3" ] 35 | then 36 | runRemote "$1" "$2" "$3" 37 | elif [ "$#" -eq "0" ] 38 | then 39 | runLocal 40 | else 41 | error 42 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Federation_Group.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample batch script to retrieve the # 7 | # privileges granted to a specified Federation # 8 | # group. # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # and other values inside the quotation marks with # 12 | # values that are appropriate for your environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | # iLO 4 - 1.40 or later. # 17 | 18 | runLocal(){ 19 | ilorest get Privileges --filter Id=DEFAULT --selector=ilofederation -u USER_LOGIN -p PASSWORD 20 | ilorest logout 21 | } 22 | 23 | runRemote(){ 24 | ilorest get Privileges --filter Id=DEFAULT --selector=ilofederation --url=$1 --user $2 --password $3 25 | ilorest logout 26 | } 27 | 28 | error(){ 29 | echo "Usage:" 30 | echo "remote: Get_Federation_Group.sh ^ ^ ^" 31 | echo "local: Get_Federation_Group.sh" 32 | } 33 | 34 | if [ "$#" -eq "3" ] 35 | then 36 | runRemote "$1" "$2" "$3" 37 | elif [ "$#" -eq "0" ] 38 | then 39 | runLocal 40 | else 41 | error 42 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Host_APO.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the automatic # 7 | # power on and power on delay settings of the # 8 | # server. # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # values with values that are appropriate for your # 12 | # environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | # iLO 4 - All versions. # 17 | 18 | runLocal(){ 19 | ilorest get AutoPowerOn --selector=Bios. -u USER_LOGIN -p PASSWORD 20 | ilorest logout 21 | } 22 | 23 | runRemote(){ 24 | ilorest get AutoPowerOn --selector=Bios. --url=$1 --user $2 --password $3 25 | ilorest logout 26 | } 27 | 28 | error(){ 29 | echo "Usage:" 30 | echo "remote: Get_Host_APO.sh ^ ^ ^" 31 | echo "local: Get_Host_APO.sh" 32 | } 33 | 34 | if [ "$#" -eq "3" ] 35 | then 36 | runRemote "$1" "$2" "$3" 37 | elif [ "$#" -eq "0" ] 38 | then 39 | runLocal 40 | else 41 | error 42 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Host_Power.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # current power state for the host server. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get PowerState --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get PowerState --selector=ComputerSystem. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Host_Power.sh ^ ^ ^" 30 | echo "local: Get_Host_Power.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Host_Power_Saver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # configuration of the ProLiant Power Regulator # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get PowerRegulator --selector=Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get PowerRegulator --selector=Bios. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Host_Power_Saver.sh ^ ^ ^" 30 | echo "local: Get_Host_Power_Saver.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Host_Pwr_Micro_Ver.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # Power Micro Firmware revision information of the # 8 | # ProLiant server # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # values with values that are appropriate for your # 12 | # environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | 17 | runLocal(){ 18 | ilorest list Name Version --filter "Name=Power Management Controller Firmware" --selector=SoftwareInventory -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest list Name Version --filter "Name=Power Management Controller Firmware" --selector=SoftwareInventory --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Host_Pwr_Micro_Ver.sh ^ ^ ^" 30 | echo "local: Get_Host_Pwr_Micro_Ver.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Hotkey_Config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the Remote # 7 | # Console hot-keys. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | 17 | runLocal(){ 18 | ilorest list Oem/Hpe/IntegratedRemoteConsole/Hotkeys --selector=Manager. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest list Oem/Hpe/IntegratedRemoteConsole/Hotkeys --selector=Manager. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Hotkey_Config.sh ^ ^ ^" 30 | echo "local: Get_Hotkey_Config.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_IML.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve the # 7 | # Integrated Management Log. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest serverlogs --selectlog=IML -f IMLlog.txt -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest serverlogs --selectlog=IML -f IMLlog.txt --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_IML.sh ^ ^ ^" 30 | echo "local: Get_IML.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_One_Time_Boot_Order.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve the # 7 | # current State of the One Time Boot. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get Boot/BootSourceOverrideTarget Boot/BootSourceOverrideEnabled --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get Boot/BootSourceOverrideTarget Boot/BootSourceOverrideEnabled --selector=ComputerSystem. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_One_Time_Boot_Order.sh ^ ^ ^" 30 | echo "local: Get_One_Time_Boot_Order.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_PS_Data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve power # 7 | # supply information of the server. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions. # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get PowerSupplies --selector=Power -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get PowerSupplies --selector=Power --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_PS_Data.sh ^ ^ ^" 30 | echo "local: Get_PS_Data.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Persistent_Boot_Order.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve the # 7 | # current State of the Boot Order. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get PersistentBootConfigOrder --selector=ServerBootSettings. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get PersistentBootConfigOrder --selector=ServerBootSettings. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Persistent_Boot_Order.sh ^ ^ ^" 30 | echo "local: Get_Persistent_Boot_Order.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Persmouse_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the # 7 | # persistent mouse and keyboard status. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest list Oem/Hpe/PersistentMouseKeyboardEnabled --selector=Manager. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest list Oem/Hpe/PersistentMouseKeyboardEnabled --selector=Manager. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Persmouse_Status.sh ^ ^ ^" 29 | echo "local: Get_Persmouse_Status.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_PowerCap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # Power Cap setting on the host server. # 8 | 9 | # The power cap values are returned and received in Watts. # 10 | 11 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 12 | # and other values inside the quotation marks with values # 13 | # that are appropriate for your environment. # 14 | 15 | # Firmware support information for this script: # 16 | # iLO 5 - All versions # 17 | # iLO 4 - All versions. # 18 | 19 | runLocal(){ 20 | ilorest get PowerControl/PowerLimit --selector=Power. -u USER_LOGIN -p PASSWORD 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest get PowerControl/PowerLimit --selector=Power. --url=$1 --user $2 --password $3 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Get_PowerCap.sh ^ ^ ^" 32 | echo "local: Get_PowerCap.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi 44 | -------------------------------------------------------------------------------- /examples/Linux/Get_Power_On_Time.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the server # 7 | # power on time. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest list Oem/Hpe/PowerOnMinutes --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest list Oem/Hpe/PowerOnMinutes --selector=ComputerSystem. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Power_On_Time.sh ^ ^ ^" 29 | echo "local: Get_Power_On_Time.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Power_Readings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the power # 7 | # readings from the server. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest serverinfo --power -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest serverinfo --power --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Power_Readings.sh ^ ^ ^" 30 | echo "local: Get_Power_Readings.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Product_Name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the product # 7 | # name. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - Version 1.30 or later. # 16 | 17 | runLocal(){ 18 | ilorest get Model --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get Model --selector=ComputerSystem. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Product_Name.sh ^ ^ ^" 30 | echo "local: Get_Product_Name.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Pwreg_Alert_Threshold.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the power # 7 | # alert threshold. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest list Oem/Hpe/SNMPPowerThresholdAlert --selector=Power -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest list Oem/Hpe/SNMPPowerThresholdAlert --selector=Power --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Pwreg_Alert_Threshold.sh ^ ^ ^" 30 | echo "local: Get_Pwreg_Alert_Threshold.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Rack_Settings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return # 7 | # enclosure data for c-Class blade infrastructure # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - Version 1.20 or later. # 16 | 17 | runLocal(){ 18 | ilorest list Oem/Hpe/Manager/Blade --selector=ServiceRoot. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest info 24 | ilorest list Oem/Hpe/Manager/Blade --selector=ServiceRoot. --url=$1 --user $2 --password $3 25 | ilorest logout 26 | } 27 | 28 | error(){ 29 | echo "Usage:" 30 | echo "remote: Get_Rack_Settings.sh ^ ^ ^" 31 | echo "local: Get_Rack_Settings.sh" 32 | } 33 | 34 | if [ "$#" -eq "3" ] 35 | then 36 | runRemote "$1" "$2" "$3" 37 | elif [ "$#" -eq "0" ] 38 | then 39 | runLocal 40 | else 41 | error 42 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_SDCard_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to know whether # 7 | # there is an SD card connected to the server. # 8 | # Possible return values are "PRESENT", "Absent" # 9 | # and "UNKNOWN" # 10 | 11 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 12 | # values with values that are appropriate for your # 13 | # environment. # 14 | 15 | # Firmware support information for this script: # 16 | # iLO 5 - All versions # 17 | # iLO 4 - version 2.10 or later. # 18 | 19 | runLocal(){ 20 | ilorest get SDCard/Status --selector=EmbeddedMedia. -u USER_LOGIN -p PASSWORD 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest get SDCard/Status --selector=EmbeddedMedia. --url=$1 --user $2 --password $3 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Get_SDCard_Status.sh ^ ^ ^" 32 | echo "local: Get_SDCard_Status.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_SNMP_IM.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return current # 7 | # SNMP and Insight Manager security settings. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest get --selector=iLOSnmpService. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get --selector=iLOSnmpService. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_SNMP_IM.sh ^ ^ ^" 29 | echo "local: Get_SNMP_IM.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_SSO_Settings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This a sample bash script to retrieve the HPE SIM # 7 | # Single Sign-On (SSO) settings. # 8 | 9 | # NOTE: You will need to replace the values inside the quotation # 10 | # marks with values that are appropriate for your # 11 | # environment. # 12 | 13 | # HPE SIM Single Sign-On requires iLO Advanced or iLO # 14 | # Select license. # 15 | 16 | # Firmware support information for this script: # 17 | # iLO 5 - All versions # 18 | # iLO 4 - All versions. # 19 | 20 | runLocal(){ 21 | ilorest get SSOsettings --selector=SSO. -u USER_LOGIN -p PASSWORD 22 | ilorest logout 23 | } 24 | 25 | runRemote(){ 26 | ilorest get SSOsettings --selector=SSO. --url=$1 --user $2 --password $3 27 | ilorest logout 28 | } 29 | 30 | error(){ 31 | echo "Usage:" 32 | echo "remote: Get_SSO_Settings.sh ^ ^ ^" 33 | echo "local: Get_SSO_Settings.sh" 34 | } 35 | 36 | if [ "$#" -eq "3" ] 37 | then 38 | runRemote "$1" "$2" "$3" 39 | elif [ "$#" -eq "0" ] 40 | then 41 | runLocal 42 | else 43 | error 44 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Security_Msg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve the # 7 | # current security text message set in the iLO Login Banner. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest get LoginSecurityBanner/SecurityMessage --selector=SecurityService. -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest get LoginSecurityBanner/SecurityMessage --selector=SecurityService. --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_Security_Msg.sh ^ ^ ^" 29 | echo "local: Get_Security_Msg.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Server_FQDN.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the host # 7 | # server FQDN. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - Version 1.20 or later. # 16 | 17 | runLocal(){ 18 | ilorest list Oem/Hpe/ServerFQDN --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest list Oem/Hpe/ServerFQDN --selector=ComputerSystem. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Server_FQDN.sh ^ ^ ^" 30 | echo "local: Get_Server_FQDN.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Server_Name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the host # 7 | # server name. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest get ServerName --selector=Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get ServerName --selector=Bios. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Server_Name.sh ^ ^ ^" 30 | echo "local: Get_Server_Name.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_Supported_Boot_Mode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to get the supported # 7 | # boot mode(s). # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # and other values inside the quotation marks with values # 11 | # that are appropriate for your environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - version 1.40 or later. # 16 | 17 | runLocal(){ 18 | ilorest info BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest info BootMode --selector=Bios. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_Supported_Boot_Mode.sh ^ ^ ^" 30 | echo "local: Get_Supported_Boot_Mode.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_TPM_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the status # 7 | # of TPM (Trusted Platform Module). # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - Version 1.40 or later. # 16 | 17 | runLocal(){ 18 | ilorest get TPMState --selector=Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest get TPMState --selector=Bios. --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_TPM_Status.sh ^ ^ ^" 30 | echo "local: Get_TPM_Status.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_UID_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to return the # 7 | # current state of the Unit ID LED of the host # 8 | # server. # 9 | 10 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 11 | # values with values that are appropriate for your # 12 | # environment. # 13 | 14 | # Firmware support information for this script: # 15 | # iLO 5 - All versions # 16 | # iLO 4 - All versions. # 17 | 18 | runLocal(){ 19 | ilorest get IndicatorLED --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 20 | ilorest logout 21 | } 22 | 23 | runRemote(){ 24 | ilorest get IndicatorLED --selector=ComputerSystem. --url=$1 --user $2 --password $3 25 | ilorest logout 26 | } 27 | 28 | error(){ 29 | echo "Usage:" 30 | echo "remote: Get_TPMS_Status.sh ^ ^ ^" 31 | echo "local: Get_TPMS_Status.sh" 32 | } 33 | 34 | if [ "$#" -eq "3" ] 35 | then 36 | runRemote "$1" "$2" "$3" 37 | elif [ "$#" -eq "0" ] 38 | then 39 | runLocal 40 | else 41 | error 42 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_VM_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to obtain the # 7 | # status of the virtual media devices. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest virtualmedia -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest virtualmedia --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Get_VM_Status.sh ^ ^ ^" 30 | echo "local: Get_VM_Status.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Get_iLO_Log.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to retrieve the Event # 7 | # Log. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values that are appropriate for your environment. # 11 | 12 | # Firmware support information for this script: # 13 | # iLO 5 - All versions # 14 | # iLO 4 - All versions. # 15 | 16 | runLocal(){ 17 | ilorest serverlogs --selectlog=IEL -f IELlog.txt -u USER_LOGIN -p PASSWORD 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest serverlogs --selectlog=IEL -f IELlog.txt --url=$1 --user $2 --password $3 23 | ilorest logout 24 | } 25 | 26 | error(){ 27 | echo "Usage:" 28 | echo "remote: Get_iLO_Log.sh ^ ^ ^" 29 | echo "local: Get_iLO_Log.sh" 30 | } 31 | 32 | if [ "$#" -eq "3" ] 33 | then 34 | runRemote "$1" "$2" "$3" 35 | elif [ "$#" -eq "0" ] 36 | then 37 | runLocal 38 | else 39 | error 40 | fi -------------------------------------------------------------------------------- /examples/Linux/Import_Cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to import a signed # 7 | # certificate into iLO. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest certificate tls certfile.txt -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest certificate tls certfile.txt --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Import_Cert.sh ^ ^ ^" 30 | echo "local: Import_Cert.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Import_LDAP_CA_Cert.sh: -------------------------------------------------------------------------------- 1 | # RESTful Interface Tool Sample Script for HPE iLO Products # 2 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 3 | 4 | # Description: This is a sample bash script to import LDAP CA # 5 | # certificate on following device: # 6 | # Integrated Lights-Out 4 (iLO 4) # 7 | # Integrated Lights-Out 5 (iLO 5) # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - v2.53 onwards # 16 | 17 | runLocal(){ 18 | ilorest certificate ca certfile.txt -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest certificate ca certfile.txt --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Import_LDAP_CA_cert.sh ^ ^ ^" 30 | echo "local: Import_LDAP_CA_cert.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Insert_Virtual_Media.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to insert a virtual # 7 | # media image. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. You will also need to replace the # 12 | # http://xx.xx.xx.xx/images/media.iso with the location of # 13 | # the virtual media you want to mount. # 14 | 15 | # Firmware support information for this script: # 16 | # iLO 5 - All versions # 17 | # iLO 4 - All versions. # 18 | 19 | runLocal(){ 20 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso -u USER_LOGIN -p PASSWORD 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --url=$1 --user $2 --password $3 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Insert_Virtual_Media.sh ^ ^ ^" 32 | echo "local: Insert_Virtual_Media.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi -------------------------------------------------------------------------------- /examples/Linux/Reset_RIB.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to reset (reboot) # 7 | # the Integrated Lights-Out(iLO). # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # All active connections (including Remote Console and # 14 | # Virtual Media sessions) to the Lights-Out device will be # 15 | # dropped immediately when this script executes. # 16 | 17 | # Firmware support information for this script: # 18 | # iLO 5 - All versions # 19 | # iLO 4 - All versions. # 20 | 21 | runLocal(){ 22 | ilorest iloreset -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | } 25 | 26 | runRemote(){ 27 | ilorest iloreset --url=$1 --user $2 --password $3 28 | ilorest logout 29 | } 30 | 31 | error(){ 32 | echo "Usage:" 33 | echo "remote: Reset_RIB.sh ^ ^ ^" 34 | echo "local: Reset_RIB.sh" 35 | } 36 | 37 | if [ "$#" -eq "3" ] 38 | then 39 | runRemote "$1" "$2" "$3" 40 | elif [ "$#" -eq "0" ] 41 | then 42 | runLocal 43 | else 44 | error 45 | fi -------------------------------------------------------------------------------- /examples/Linux/Send_Snmp_Test_Trap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample batch script to send a test # 7 | # SNMP trap to the alert destinations configured for the iLO # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - version 2.10 or later. # 16 | 17 | runLocal(){ 18 | ilorest sendtest snmpalert -u USER_LOGIN -p PASSWORD 19 | ilorest logout 20 | } 21 | 22 | runRemote(){ 23 | ilorest sendtest snmpalert --url=$1 --user $2 --password $3 24 | ilorest logout 25 | } 26 | 27 | error(){ 28 | echo "Usage:" 29 | echo "remote: Send_Snmp_Test_Trap.sh ^ ^ ^" 30 | echo "local: Send_Snmp_Test_Trap.sh" 31 | } 32 | 33 | if [ "$#" -eq "3" ] 34 | then 35 | runRemote "$1" "$2" "$3" 36 | elif [ "$#" -eq "0" ] 37 | then 38 | runLocal 39 | else 40 | error 41 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_AHS_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to enable or disable # 7 | # AHS logging. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest select ActiveHealthSystem -u USER_LOGIN -p PASSWORD 19 | # Possible Values: Set to "Enable" or "False". # 20 | ilorest set AHSEnabled=True --commit 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest select ActiveHealthSystem --url=$1 --user $2 --password $3 26 | # Possible Values: Set to "Enable" or "False". # 27 | ilorest set AHSEnabled=True --commit 28 | ilorest logout 29 | } 30 | 31 | error(){ 32 | echo "Usage:" 33 | echo "remote: Set_Boot_Mode.sh ^ ^ ^" 34 | echo "local: Set_Boot_Mode.sh" 35 | } 36 | 37 | if [ "$#" -eq "3" ] 38 | then 39 | runRemote "$1" "$2" "$3" 40 | elif [ "$#" -eq "0" ] 41 | then 42 | runLocal 43 | else 44 | error 45 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_Boot_Mode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to set the pending # 7 | # boot mode. # 8 | 9 | # Firmware support information for this script: # 10 | # iLO 5 - All versions # 11 | # iLO 4 - version 1.40 or later. # 12 | 13 | runLocal(){ 14 | ilorest select Bios. -u USER_LOGIN -p PASSWORD 15 | # Possible Values: LegacyBios or Uefi # 16 | ilorest set BootMode=Uefi 17 | ilorest commit 18 | ilorest logout 19 | } 20 | 21 | runRemote(){ 22 | ilorest select Bios. --url=$1 --user $2 --password $3 23 | # Possible Values: LegacyBios or Uefi # 24 | ilorest set BootMode=Uefi 25 | ilorest commit 26 | ilorest logout 27 | } 28 | 29 | error(){ 30 | echo "Usage:" 31 | echo "remote: Set_Boot_Mode.sh ^ ^ ^" 32 | echo "local: Set_Boot_Mode.sh" 33 | } 34 | 35 | if [ "$#" -eq "3" ] 36 | then 37 | runRemote "$1" "$2" "$3" 38 | elif [ "$#" -eq "0" ] 39 | then 40 | runLocal 41 | else 42 | error 43 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_Drives_Ledinidicator.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | ilorest rawget /redfish/v1/Systems/1/Storage/ | grep 'Storage\/DA' | cut -f4 -d'"' > disk.list 5 | 6 | rm -f ilorest_input.list 7 | 8 | # create list of NVMe targets. 9 | while 10 | read i 11 | do 12 | echo -n $i >> ilorest_input.list 13 | echo -n "Drives/" >> ilorest_input.list 14 | echo $i | cut -f7 -d'/' >> ilorest_input.list 15 | done < disk.list 16 | 17 | # Turn on the Indicator LED for each NVMe target device. 18 | while 19 | read i 20 | do 21 | name=`echo $i | cut -f9 -d'/'` 22 | echo "name = $name" 23 | sed "s/XXX/$name/g" lit_template.json > lit.json 24 | ilorest rawpatch lit.json 25 | done < ilorest_input.list 26 | 27 | # Display Indicator LED setting. 28 | while 29 | read i 30 | do 31 | echo -e "\n=> $i" 32 | ilorest rawget $i | grep Indicator 33 | done < ilorest_input.list 34 | 35 | # Turn off the Indicator LED for each NVMe target device. 36 | while 37 | read i 38 | do 39 | name=`echo $i | cut -f9 -d'/'` 40 | echo "name = $name" 41 | sed "s/XXX/$name/g" off_template.json > off.json 42 | ilorest rawpatch off.json 43 | done < ilorest_input.list 44 | 45 | # Display Indicator LED setting. 46 | while 47 | read i 48 | do 49 | echo -e "\n=> $i" 50 | ilorest rawget $i | grep Indicator 51 | done < ilorest_input.list 52 | 53 | -------------------------------------------------------------------------------- /examples/Linux/Set_FIPS_Enable.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to enable FIPs mode. # 7 | 8 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 9 | # values with values that are appropriate for your # 10 | # environment. # 11 | 12 | # All active connections (including Remote Console and # 13 | # Virtual Media sessions) to the Lights-Out device will be # 14 | # dropped immediately when this script executes. # 15 | 16 | # Firmware support information for this script: # 17 | # iLO 5 - All versions # 18 | # iLO 4 - 1.20 or later # 19 | 20 | runLocal(){ 21 | ilorest set SecurityState=Production --selector=SecurityService. --commit -u USER_LOGIN -p PASSWORD 22 | ilorest logout 23 | } 24 | 25 | runRemote(){ 26 | ilorest set SecurityState=Production --selector=SecurityService. --commit --url=$1 --user $2 --password $3 27 | ilorest logout 28 | } 29 | 30 | error(){ 31 | echo "Usage:" 32 | echo "remote: Set_FIPS_Enable.sh ^ ^ ^" 33 | echo "local: Set_FIPS_Enable.sh" 34 | } 35 | 36 | if [ "$#" -eq "3" ] 37 | then 38 | runRemote "$1" "$2" "$3" 39 | elif [ "$#" -eq "0" ] 40 | then 41 | runLocal 42 | else 43 | error 44 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_Language.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to set the default # 7 | # language on iLO # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest select Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest set UtilityLang=English 20 | ilorest commit 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest select Bios. --url=$1 --user $2 --password $3 26 | ilorest set UtilityLang=English 27 | ilorest commit 28 | ilorest logout 29 | } 30 | 31 | error(){ 32 | echo "Usage:" 33 | echo "remote: Set_Language.sh ^ ^ ^" 34 | echo "local: Set_Language.sh" 35 | } 36 | 37 | if [ "$#" -eq "3" ] 38 | then 39 | runRemote "$1" "$2" "$3" 40 | elif [ "$#" -eq "0" ] 41 | then 42 | runLocal 43 | else 44 | error 45 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_Persmouse_Status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to set the # 7 | # persistent mouse and keyboard. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | 16 | runLocal(){ 17 | ilorest select Manager. -u USER_LOGIN -p PASSWORD 18 | ilorest set Oem/Hpe/PersistentMouseKeyboardEnabled=False 19 | ilorest commit 20 | ilorest logout 21 | } 22 | 23 | runRemote(){ 24 | ilorest select Manager. --url=$1 --user $2 --password $3 25 | ilorest set Oem/Hpe/PersistentMouseKeyboardEnabled=False 26 | ilorest commit 27 | ilorest logout 28 | } 29 | 30 | error(){ 31 | echo "Usage:" 32 | echo "remote: Set_Persmouse_Status.sh ^ ^ ^" 33 | echo "local: Set_Persmouse_Status.sh" 34 | } 35 | 36 | if [ "$#" -eq "3" ] 37 | then 38 | runRemote "$1" "$2" "$3" 39 | elif [ "$#" -eq "0" ] 40 | then 41 | runLocal 42 | else 43 | error 44 | fi -------------------------------------------------------------------------------- /examples/Linux/Set_Server_Name.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # RESTful Interface Tool Sample Script for HPE iLO Products # 4 | # Copyright 2014, 2020 Hewlett Packard Enterprise Development LP # 5 | 6 | # Description: This is a sample bash script to set the host # 7 | # server name. # 8 | 9 | # NOTE: You will need to replace the USER_LOGIN and PASSWORD # 10 | # values with values that are appropriate for your # 11 | # environment. # 12 | 13 | # Firmware support information for this script: # 14 | # iLO 5 - All versions # 15 | # iLO 4 - All versions. # 16 | 17 | runLocal(){ 18 | ilorest select Bios. -u USER_LOGIN -p PASSWORD 19 | ilorest set ServerName=MyServerName 20 | ilorest commit 21 | ilorest logout 22 | } 23 | 24 | runRemote(){ 25 | ilorest select Bios. --url=$1 --user $2 --password $3 26 | ilorest set ServerName=MyServerName 27 | ilorest commit 28 | ilorest logout 29 | } 30 | 31 | error(){ 32 | echo "Usage:" 33 | echo "remote: Set_Server_Name.sh ^ ^ ^" 34 | echo "local: Set_Server_Name.sh" 35 | } 36 | 37 | if [ "$#" -eq "3" ] 38 | then 39 | runRemote "$1" "$2" "$3" 40 | elif [ "$#" -eq "0" ] 41 | then 42 | runLocal 43 | else 44 | error 45 | fi -------------------------------------------------------------------------------- /examples/Windows/Abort_Directory_Test.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to abort directory :: 5 | :: test on following device: :: 6 | :: Integrated Lights-Out 5 (iLO 5) :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: values with values that are appropriate for your :: 10 | :: environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest directory test stop -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | 27 | :remote 28 | ilorest directory test stop --url=%1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Abort_Directory_Test.bat ^ ^ ^ 35 | echo local: Abort_Directory_Test.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Boot_spp.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to mount the SPP :: 5 | :: media image, reboot the system, and boot to it. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --bootnextreset --reboot=ForceRestart 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --bootnextreset --reboot=ForceRestart --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Boot_spp.bat ^ ^ ^ 34 | echo local: Boot_spp.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Change_Password.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to change a user's :: 5 | :: password in the database of local users on :: 6 | :: following devices: :: 7 | :: Integrated Lights-Out 4 (iLO 4) :: 8 | :: Integrated Lights-Out 5 (iLO 5) :: 9 | 10 | :: NOTE: You will need to replace the values inside the quote :: 11 | :: marks with values that are appropriate for your :: 12 | :: environment. :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest iloaccounts changepass "username" "password" 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest iloaccounts changepass "username" "password" --url=%1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Change_Password.bat ^ ^ ^ 33 | echo local: Change_Password.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Clear_AHS_Data.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to clear AHS :: 5 | :: data. :: 6 | 7 | :: This script was written for iLO 4 firmware version 1.00 :: 8 | :: release. :: 9 | 10 | :: Firmware support information for this script: :: 11 | :: iLO 4 - All versions. :: 12 | :: iLO 5 - All versions. :: 13 | 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest serverlogs --selectlog=AHS --clearlog 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest serverlogs --selectlog=AHS --clearlog --url=%1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Clear_AHS_Data.bat ^ ^ ^ 34 | echo local: Clear_AHS_Data.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Clear_EventLog.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to clear the event :: 5 | :: log on following devices: :: 6 | :: Integrated Lights-Out 4 (iLO 4) :: 7 | :: Integrated Lights-Out 5 (iLO 5) :: 8 | 9 | :: Firmware support information for this script: :: 10 | :: iLO 5 - All versions. :: 11 | :: iLO 4 - All versions. :: 12 | 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest serverlogs --selectlog=IEL --clearlog 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest serverlogs --selectlog=IEL --clearlog --url=%1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Clear_EventLog.bat ^ ^ ^ 33 | echo local: Clear_EventLog.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Clear_IML.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to clear the server :: 5 | :: IML log from following devices: :: 6 | :: Integrated Lights-Out 4 (iLO 4) :: 7 | :: Integrated Lights-Out 5 (iLO 5) :: 8 | 9 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 10 | :: values with values that are appropriate for your :: 11 | :: environment. :: 12 | 13 | :: Firmware support information for this script: :: 14 | :: iLO 5 - All versions :: 15 | :: iLO 4 - All versions :: 16 | 17 | 18 | 19 | @echo off 20 | set argC=0 21 | for %%x in (%*) do Set /A argC+=1 22 | if %argC% EQU 3 goto :remote 23 | if %argC% EQU 0 goto :local 24 | goto :error 25 | 26 | :local 27 | ilorest serverlogs --selectlog=IML --clearlog 28 | ilorest logout 29 | goto :exit 30 | :remote 31 | ilorest serverlogs --selectlog=IML --clearlog --url=%1 --user %2 --password %3 32 | ilorest logout 33 | goto :exit 34 | 35 | :error 36 | echo Usage: 37 | echo remote: Clear_IML.bat ^ ^ ^ 38 | echo local: Clear_IML.bat 39 | 40 | :exit -------------------------------------------------------------------------------- /examples/Windows/Delete_Federation_Group.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to delete a :: 5 | :: Federation group membership on the following :: 6 | :: devices: :: 7 | :: Integrated Lights-Out 4 (iLO 4) :: 8 | :: Integrated Lights-Out 5 (iLO 5) :: 9 | 10 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 11 | :: and other values inside the quotation marks with :: 12 | :: values that are appropriate for your environment. :: 13 | 14 | :: Firmware support information for this script: :: 15 | :: iLO 5 - All versions :: 16 | :: iLO 4 - 1.40 or later. :: 17 | 18 | @echo off 19 | set argC=0 20 | for %%x in (%*) do Set /A argC+=1 21 | if %argC% EQU 3 goto :remote 22 | if %argC% EQU 0 goto :local 23 | goto :error 24 | 25 | :local 26 | ilorest ilofederation delete newfedname 27 | ilorest logout 28 | goto :exit 29 | :remote 30 | ilorest ilofederation delete newfedname --url=%1 --user %2 --password %3 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Delete_Federation_Group.bat ^ ^ ^ 37 | echo local: Delete_Federation_Group.bat 38 | 39 | :exit -------------------------------------------------------------------------------- /examples/Windows/Delete_User.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014-2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to delete a user :: 5 | :: from the database of local users on following :: 6 | :: devices: :: 7 | :: Integrated Lights-Out 4 (iLO 4) :: 8 | :: Integrated Lights-Out 5 (iLO 5) :: 9 | 10 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 11 | :: values with values that are appropriate for your :: 12 | :: environment. :: 13 | 14 | :: Firmware support information for this script: :: 15 | :: iLO 5 - All versions :: 16 | :: iLO 4 - All versions. :: 17 | 18 | @echo off 19 | set argC=0 20 | for %%x in (%*) do Set /A argC+=1 21 | if %argC% EQU 3 goto :remote 22 | if %argC% EQU 0 goto :local 23 | goto :error 24 | 25 | :local 26 | ilorest iloaccounts delete testUser 27 | ilorest logout 28 | goto :exit 29 | :remote 30 | ilorest iloaccounts delete testUser --url=%1 --user %2 --password %3 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Delete_User.bat ^ ^ ^ 37 | echo local: Delete_User.bat 38 | 39 | :exit 40 | -------------------------------------------------------------------------------- /examples/Windows/ERS_Get_Settings.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve current :: 5 | :: ERS settings :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN, and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest get --selector=RemoteSupport. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest get --selector=RemoteSupport. --url=%1 -u %2 -p %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: ERS_Get_Settings.bat ^ ^ ^ 33 | echo local: ERS_Get_Settings.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Factory_Defaults.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to set the :: 5 | :: Lights-Out device to factory default settings. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest login -u USER_LOGIN -p PASSWORD 25 | ilorest factorydefaults 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest factorydefaults --url=%1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Factory_Defaults.bat ^ ^ ^ 36 | echo local: Factory_Defaults.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_AHS_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to find out if :: 5 | :: AHS is enabled or disabled. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest get AHSEnabled --selector=iLOActiveHealthSystem. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest get AHSEnabled --selector=iLOActiveHealthSystem. --url=%1 -u %2 -p %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_AHS_Status.bat ^ ^ ^ 33 | echo local: Get_AHS_Status.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_All_Licenses.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014-2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the license :: 5 | :: information. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - version 1.20 and above :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get License --selector=iLOLicense. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get License --selector=iLOLicense. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_All_Licenses.bat ^ ^ ^ 34 | echo local: Get_All_Licenses.bat 35 | 36 | :exit 37 | -------------------------------------------------------------------------------- /examples/Windows/Get_All_User_Info.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return all user's:: 5 | :: account information in the local user database. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest iloaccounts -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest iloaccounts --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_All_User_Info.bat ^ ^ ^ 34 | echo local: Get_All_User_info.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Asset_Tag.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the asset :: 5 | :: tag. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - 1.05 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get ServerAssetTag --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get ServerAssetTag --selector=Bios. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Asset_Tag.bat ^ ^ ^ 34 | echo local: Get_Asset_Tag.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Boot_Mode.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the pending :: 5 | :: boot mode. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - version 1.40 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get BootMode --selector=Bios. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Boot_Mode.bat ^ ^ ^ 34 | echo local: Get_Boot_Mode.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Current_Boot_Mode.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the current :: 5 | :: boot mode. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - version 1.40 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get BootMode --selector=Bios. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Current_Boot_Mode.bat ^ ^ ^ 34 | echo local: Get_Current_Boot_Mode.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Directory_Test_Results.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get directory :: 5 | :: test results. :: 6 | 7 | :: The directory test results are reset when directory settings :: 8 | :: are saved, or when the directory tests are started. :: 9 | 10 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 11 | :: values with values that are appropriate for your :: 12 | :: environment. :: 13 | 14 | :: Firmware support information for this script: :: 15 | :: iLO 5 - All versions :: 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest directory test viewresults -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | 29 | :remote 30 | ilorest directory test viewresults --url=%1 --user %2 --password %3 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Get_Directory_Test_Results.bat ^ ^ ^ 37 | echo local: Get_Directory_Test_Results.bat 38 | 39 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_EmHealth.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve health :: 5 | :: information of the server. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. --url=%1 -u %2 -p %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_EmHealth.bat ^ ^ ^ 33 | echo local: Get_EmHealth.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Embedded_Health.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve health :: 5 | :: information of the server. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest list Oem/Hpe/AggregateHealthStatus --selector=ComputerSystem. --url=%1 -u %2 -p %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_Embedded_Health.bat ^ ^ ^ 33 | echo local: Get_Embedded_Health.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Encrypt.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return current :: 5 | :: smart array controller encryption settings. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - 1.40 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest list --selector=SmartStorageArrayController. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest list --selector=SmartStorageArrayController. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Encrypt.bat ^ ^ ^ 34 | echo local: Get_Encrypt.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_FIPS_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: current FIPs Mode :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get TpmFips --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get TpmFips --selector=Bios. --url=%1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_FIPS_Status.bat ^ ^ ^ 34 | echo local: Get_FIPS_Status.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Federation_All_Groups_Info.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve a list :: 5 | :: of all Federation group memberships and granted :: 6 | :: privileges. :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: values with values that are appropriate for your :: 10 | :: environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | :: iLO 4 - 1.40 or later. :: 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest ilofederation -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest ilofederation --url=%1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_Federation_All_Groups_Info.bat ^ ^ ^ 35 | echo local: Get_Federation_All_Groups_Info.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Federation_Group.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the :: 5 | :: privileges granted to a specified Federation :: 6 | :: group. :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: and other values inside the quotation marks with :: 10 | :: values that are appropriate for your environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | :: iLO 4 - 1.40 or later. :: 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest select iLOFederationGroup. -u USER_LOGIN -p PASSWORD 25 | ilorest get Privileges --filter Id=DEFAULT 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest select iLOFederationGroup. --url=%1 --user %2 --password %3 30 | ilorest get Privileges --filter Id=DEFAULT 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Get_Federation_Group.bat ^ ^ ^ 37 | echo local: Get_Federation_Group.bat 38 | 39 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Host_APO.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the automatic:: 5 | :: power on and power on delay settings of the :: 6 | :: server. :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: values with values that are appropriate for your :: 10 | :: environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | :: iLO 4 - All versions. :: 15 | 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest get AutoPowerOn --selector=Bios. -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest get AutoPowerOn --selector=Bios. --url=%1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Get_Host_APO.bat ^ ^ ^ 36 | echo local: Get_Host_APO.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Host_Power.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: current power state for the host server. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest get PowerState --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest get PowerState --selector=ComputerSystem. --url=%1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_Host_Power.bat ^ ^ ^ 35 | echo local: Get_Host_Power.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Host_Power_Saver.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: configuration of the ProLiant Power Regulator :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest get PowerRegulator --selector=Bios. -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest get PowerRegulator --selector=Bios. --url=%1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_Host_Power_Saver.bat ^ ^ ^ 35 | echo local: Get_Host_Power_Saver.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Host_Pwr_Micro_Ver.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: Power Micro Firmware revision information of the :: 6 | :: ProLiant server :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: values with values that are appropriate for your :: 10 | :: environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | 15 | 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest list Name Version --filter "Name=Power Management Controller Firmware" --selector=SoftwareInventory -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest list Name Version --filter "Name=Power Management Controller Firmware" --selector=SoftwareInventory --url=%1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Get_Host_Pwr_Micro_Ver.bat ^ ^ ^ 36 | echo local: Get_Host_Pwr_Micro_Ver.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Hotkey_Config.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the Remote :: 5 | :: Console hot-keys. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest list Oem/Hpe/IntegratedRemoteConsole/Hotkeys --selector=Manager. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest list Oem/Hpe/IntegratedRemoteConsole/Hotkeys --selector=Manager. --url=%1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Hotkey_Config.bat ^ ^ ^ 34 | echo local: Get_Hotkey_Config.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_IML.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the :: 5 | :: Integrated Management Log. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest serverlogs --selectlog=IML -f IMLlog.txt -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest serverlogs --selectlog=IML -f IMLlog.txt --url=%1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_IML.bat ^ ^ ^ 35 | echo local: Get_IML.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_One_Time_Boot_Order.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the :: 5 | :: current State of the One Time Boot. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get Boot/BootSourceOverrideTarget Boot/BootSourceOverrideEnabled --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get Boot/BootSourceOverrideTarget Boot/BootSourceOverrideEnabled --selector=ComputerSystem. --url=%1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_One_Time_Boot_Order.bat ^ ^ ^ 34 | echo local: Get_One_Time_Boot_Order.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_PS_Data.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve power :: 5 | :: supply information of the server. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions. :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get PowerSupplies --selector=Power -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get PowerSupplies --selector=Power --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_PS_Data.bat ^ ^ ^ 34 | echo local: Get_PS_Data.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Persistent_Boot_Order.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the :: 5 | :: current State of the Boot Order. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get PersistentBootConfigOrder --selector=ServerBootSettings. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get PersistentBootConfigOrder --selector=ServerBootSettings. --url=%1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Persistent_Boot_Order.bat ^ ^ ^ 34 | echo local: Get_Persistent_Boot_Order.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Persmouse_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the :: 5 | :: persistent mouse and keyboard status. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest list Oem/Hpe/PersistentMouseKeyboardEnabled --selector=Manager. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest list Oem/Hpe/PersistentMouseKeyboardEnabled --selector=Manager. --url %1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_Persmouse_Status.bat ^ ^ ^ 33 | echo local: Get_Persmouse_Status.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_PowerCap.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: Power Cap setting on the host server. :: 6 | 7 | :: The power cap values are returned and received in Watts. :: 8 | 9 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 10 | :: and other values inside the quotation marks with values :: 11 | :: that are appropriate for your environment. :: 12 | 13 | :: Firmware support information for this script: :: 14 | :: iLO 5 - All versions :: 15 | :: iLO 4 - All versions. :: 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest get PowerControl/PowerLimit --selector=Power. -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest get PowerControl/PowerLimit --selector=Power. --url %1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Get_PowerCap.bat ^ ^ ^ 36 | echo local: Get_PowerCap.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Power_On_Time.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the server :: 5 | :: power on time. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest list Oem/Hpe/PowerOnMinutes --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest list Oem/Hpe/PowerOnMinutes --selector=ComputerSystem. --url %1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_Power_On_Time.bat ^ ^ ^ 33 | echo local: Get_Power_On_Time.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Power_Readings.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the power :: 5 | :: readings from the server. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest serverinfo --power -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest serverinfo --power --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Power_Readings.bat ^ ^ ^ 34 | echo local: Get_Power_Readings.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Product_Name.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the product :: 5 | :: name. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - Version 1.30 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get Model --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get Model --selector=ComputerSystem. --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Product_Name.bat ^ ^ ^ 34 | echo local: Get_Product_Name.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Pwreg_Alert_Threshold.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the power :: 5 | :: alert threshold. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest list Oem/Hpe/SNMPPowerThresholdAlert --selector=Power -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest list Oem/Hpe/SNMPPowerThresholdAlert --selector=Power --url %1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Get_Pwreg_Alert_Threshold.bat ^ ^ ^ 36 | echo local: Get_Pwreg_Alert_Threshold.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_SDCard_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to know whether :: 5 | :: there is an SD card connected to the server. :: 6 | :: Possible return values are "PRESENT", "Absent" :: 7 | :: and "UNKNOWN" :: 8 | 9 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 10 | :: values with values that are appropriate for your :: 11 | :: environment. :: 12 | 13 | :: Firmware support information for this script: :: 14 | :: iLO 5 - All versions :: 15 | :: iLO 4 - version 2.10 or later. :: 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest get SDCard/Status --selector=EmbeddedMedia. -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest get SDCard/Status --selector=EmbeddedMedia. --url %1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Get_SDCard_Status.bat ^ ^ ^ 36 | echo local: Get_SDCard_Status.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_SNMP_IM.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return current :: 5 | :: SNMP and Insight Manager security settings. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest get --selector=iLOSnmpService. -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest get --selector=iLOSnmpService. --url=%1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_SNMP_IM.bat ^ ^ ^ 33 | echo local: Get_SNMP_IM.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_SSO_Settings.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This a sample batch script to retrieve the HPE SIM :: 5 | :: Single Sign-On (SSO) settings. :: 6 | 7 | :: NOTE: You will need to replace the values inside the quotation :: 8 | :: marks with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: HPE SIM Single Sign-On requires iLO Advanced or iLO :: 12 | :: Select license. :: 13 | 14 | :: Firmware support information for this script: :: 15 | :: iLO 5 - All versions :: 16 | :: iLO 4 - All versions. :: 17 | 18 | 19 | @echo off 20 | set argC=0 21 | for %%x in (%*) do Set /A argC+=1 22 | if %argC% EQU 3 goto :remote 23 | if %argC% EQU 0 goto :local 24 | goto :error 25 | 26 | :local 27 | ilorest get SSOsettings --selector=SSO. -u USER_LOGIN -p PASSWORD 28 | ilorest logout 29 | goto :exit 30 | :remote 31 | ilorest get SSOsettings --selector=SSO. --url %1 --user %2 --password %3 32 | ilorest logout 33 | goto :exit 34 | 35 | :error 36 | echo Usage: 37 | echo remote: Get_SSO_Settings.bat ^ ^ ^ 38 | echo local: Get_SSO_Settings.bat 39 | 40 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Security_Msg.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the :: 5 | :: current security text message set in the iLO Login Banner. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get LoginSecurityBanner/SecurityMessage --selector=SecurityService. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get LoginSecurityBanner/SecurityMessage --selector=SecurityService. --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Security_Msg.bat ^ ^ ^ 34 | echo local: Get_Security_Msg.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Server_FQDN.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the host :: 5 | :: server FQDN. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest list Oem/Hpe/ServerFQDN --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest list Oem/Hpe/ServerFQDN --selector=ComputerSystem. --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Server_FQDN.bat ^ ^ ^ 34 | echo local: Get_Server_FQDN.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Server_Name.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the host :: 5 | :: server name. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest get ServerName --selector=Bios. -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest get ServerName --selector=Bios. --url %1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_Server_Name.bat ^ ^ ^ 35 | echo local: Get_Server_Name.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_Supported_Boot_Mode.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to get the supported :: 5 | :: boot mode(s). :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: and other values inside the quotation marks with values :: 9 | :: that are appropriate for your environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - version 1.40 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest info BootMode --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest info BootMode --selector=Bios. --url=%1 -u %2 -p %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_Supported_Boot_Mode.bat ^ ^ ^ 34 | echo local: Get_Supported_Boot_Mode.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_TPM_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the status :: 5 | :: of TPM (Trusted Platform Module). :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - Version 1.40 or later. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest get TPMState --selector=Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest get TPMState --selector=Bios. --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_TPM_Status.bat ^ ^ ^ 34 | echo local: Get_TPM_Status.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_UID_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to return the :: 5 | :: current state of the Unit ID LED of the host :: 6 | :: server. :: 7 | 8 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 9 | :: values with values that are appropriate for your :: 10 | :: environment. :: 11 | 12 | :: Firmware support information for this script: :: 13 | :: iLO 5 - All versions :: 14 | :: iLO 4 - All versions. :: 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest get IndicatorLED --selector=ComputerSystem. -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest get IndicatorLED --selector=ComputerSystem. --url %1 --user %2 --password %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Get_TPMS_Status.bat ^ ^ ^ 35 | echo local: Get_TPM_Status.bat 36 | 37 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_VM_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to obtain the :: 5 | :: status of the virtual media devices. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest virtualmedia -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest virtualmedia --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Get_VM_Status.bat ^ ^ ^ 34 | echo local: Get_VM_Status.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Get_iLO_Log.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to retrieve the Event:: 5 | :: Log. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values that are appropriate for your environment. :: 9 | 10 | :: Firmware support information for this script: :: 11 | :: iLO 5 - All versions :: 12 | :: iLO 4 - All versions. :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest serverlogs --selectlog=IEL -f IELlog.txt -u USER_LOGIN -p PASSWORD 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest serverlogs --selectlog=IEL -f IELlog.txt --url=%1 --user %2 --password %3 27 | ilorest logout 28 | goto :exit 29 | 30 | :error 31 | echo Usage: 32 | echo remote: Get_iLO_Log.bat ^ ^ ^ 33 | echo local: Get_iLO_Log.bat 34 | 35 | :exit -------------------------------------------------------------------------------- /examples/Windows/Import_Cert.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to import a signed :: 5 | :: certificate into iLO. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest certificate tls certfile.txt -u USER_LOGIN -p PASSWORD 24 | ilorest logout 25 | goto :exit 26 | :remote 27 | ilorest certificate tls certfile.txt --url %1 --user %2 --password %3 28 | ilorest logout 29 | goto :exit 30 | 31 | :error 32 | echo Usage: 33 | echo remote: Import_Cert.bat ^ ^ ^ 34 | echo local: Import_Cert.bat 35 | 36 | :exit -------------------------------------------------------------------------------- /examples/Windows/Import_LDAP_CA_Cert.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to import LDAP CA :: 5 | :: certificate on following device: :: 6 | :: Integrated Lights-Out 4 (iLO 4) :: 7 | :: Integrated Lights-Out 5 (iLO 5) :: 8 | 9 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 10 | :: values with values that are appropriate for your :: 11 | :: environment. :: 12 | 13 | :: Firmware support information for this script: :: 14 | :: iLO 5 - All versions :: 15 | :: iLO 4 - v2.53 onwards :: 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest certificate ca certfile.txt -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest certificate ca certfile.txt --url %1 --user %2 --password %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Import_LDAP_CA_Cert.bat ^ ^ ^ 36 | echo local: Import_LDAP_CA_Cert.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Insert_Virtual_Media.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to insert a virtual :: 5 | :: media image. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. You will also need to replace the :: 10 | :: http://xx.xx.xx.xx/images/media.iso with the location of :: 11 | :: the virtual media you want to mount. :: 12 | 13 | :: Firmware support information for this script: :: 14 | :: iLO 5 - All versions :: 15 | :: iLO 4 - All versions. :: 16 | 17 | @echo off 18 | set argC=0 19 | for %%x in (%*) do Set /A argC+=1 20 | if %argC% EQU 3 goto :remote 21 | if %argC% EQU 0 goto :local 22 | goto :error 23 | 24 | :local 25 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso -u USER_LOGIN -p PASSWORD 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest virtualmedia 2 http://xx.xx.xx.xx/images/media.iso --url=%1 -u %2 -p %3 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Insert_Virtual_Media.bat ^ ^ ^ 36 | echo local: Insert_Virtual_Media.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Reset_RIB.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to reset (reboot) :: 5 | :: the Integrated Lights-Out(iLO). :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: All active connections (including Remote Console and :: 12 | :: Virtual Media sessions) to the Lights-Out device will be :: 13 | :: dropped immediately when this script executes. :: 14 | 15 | :: Firmware support information for this script: :: 16 | :: iLO 5 - All versions :: 17 | :: iLO 4 - All versions. :: 18 | 19 | 20 | @echo off 21 | set argC=0 22 | for %%x in (%*) do Set /A argC+=1 23 | if %argC% EQU 3 goto :remote 24 | if %argC% EQU 0 goto :local 25 | goto :error 26 | 27 | :local 28 | ilorest iloreset -u USER_LOGIN -p PASSWORD 29 | ilorest logout 30 | goto :exit 31 | :remote 32 | ilorest iloreset --url=%1 -u %2 -p %3 33 | ilorest logout 34 | goto :exit 35 | 36 | :error 37 | echo Usage: 38 | echo remote: Reset_RIB.bat ^ ^ ^ 39 | echo local: Reset_RIB.bat 40 | 41 | :exit -------------------------------------------------------------------------------- /examples/Windows/Send_Snmp_Test_Trap.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to send a test :: 5 | :: SNMP trap to the alert destinations configured for the iLO :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - version 2.10 or later. :: 14 | 15 | 16 | @echo off 17 | set argC=0 18 | for %%x in (%*) do Set /A argC+=1 19 | if %argC% EQU 3 goto :remote 20 | if %argC% EQU 0 goto :local 21 | goto :error 22 | 23 | :local 24 | ilorest sendtest snmpalert -u USER_LOGIN -p PASSWORD 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest sendtest snmpalert --url=%1 -u %2 -p %3 29 | ilorest logout 30 | goto :exit 31 | 32 | :error 33 | echo Usage: 34 | echo remote: Send_Snmp_Test_Trap.bat ^ ^ ^ 35 | echo local: Send_Snmp_Test_Trap.bat 36 | -------------------------------------------------------------------------------- /examples/Windows/Set_AHS_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to enable or disable:: 5 | :: AHS logging. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest select ActiveHealthSystem 24 | :: Possible Values: Set to "Enable" or "False". :: 25 | ilorest set AHSEnabled=True --commit 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest select ActiveHealthSystem --url=%1 -u %2 -p %3 30 | :: Possible Values: Set to "True" or "False". :: 31 | ilorest set AHSEnabled=True --commit 32 | ilorest logout 33 | goto :exit 34 | 35 | :error 36 | echo Usage: 37 | echo remote: Set_Boot_Mode.bat ^ ^ ^ 38 | echo local: Set_Boot_Mode.bat 39 | 40 | :exit -------------------------------------------------------------------------------- /examples/Windows/Set_Boot_Mode.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to set the pending :: 5 | :: boot mode. :: 6 | 7 | :: Firmware support information for this script: :: 8 | :: iLO 5 - All versions :: 9 | :: iLO 4 - version 1.40 or later. :: 10 | 11 | @echo off 12 | set argC=0 13 | for %%x in (%*) do Set /A argC+=1 14 | if %argC% EQU 3 goto :remote 15 | if %argC% EQU 0 goto :local 16 | goto :error 17 | 18 | :local 19 | ilorest select Bios. 20 | :: Possible Values: LegacyBios or Uefi :: 21 | ilorest set BootMode=Uefi 22 | ilorest commit 23 | ilorest logout 24 | goto :exit 25 | :remote 26 | ilorest select Bios. --url=%1 -u %2 -p %3 27 | :: Possible Values: LegacyBios or Uefi :: 28 | ilorest set BootMode=Uefi 29 | ilorest commit 30 | ilorest logout 31 | goto :exit 32 | 33 | :error 34 | echo Usage: 35 | echo remote: Set_Boot_Mode.bat ^ ^ ^ 36 | echo local: Set_Boot_Mode.bat 37 | 38 | :exit -------------------------------------------------------------------------------- /examples/Windows/Set_FIPS_Enable.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to enable FIPs mode.:: 5 | 6 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 7 | :: values with values that are appropriate for your :: 8 | :: environment. :: 9 | 10 | :: All active connections (including Remote Console and :: 11 | :: Virtual Media sessions) to the Lights-Out device will be :: 12 | :: dropped immediately when this script executes. :: 13 | 14 | :: Firmware support information for this script: :: 15 | :: iLO 5 - All versions :: 16 | :: iLO 4 - 1.20 or later :: 17 | 18 | @echo off 19 | set argC=0 20 | for %%x in (%*) do Set /A argC+=1 21 | if %argC% EQU 3 goto :remote 22 | if %argC% EQU 0 goto :local 23 | goto :error 24 | 25 | :local 26 | ilorest set SecurityState=Production --selector=SecurityService. --commit -u USER_LOGIN -p PASSWORD 27 | ilorest logout 28 | goto :exit 29 | :remote 30 | ilorest set SecurityState=Production --selector=SecurityService. --commit --url=%1 -u %2 -p %3 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Set_FIPS_Enable.bat ^ ^ ^ 37 | echo local: Set_FIPS_Enable.bat 38 | 39 | :exit -------------------------------------------------------------------------------- /examples/Windows/Set_Language.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to set the default :: 5 | :: language on iLO :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest select Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest set UtilityLang=English 25 | ilorest commit 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest select Bios. --url=%1 -u %2 -p %3 30 | ilorest set UtilityLang=English 31 | ilorest commit 32 | ilorest logout 33 | goto :exit 34 | 35 | :error 36 | echo Usage: 37 | echo remote: Set_Language.bat ^ ^ ^ 38 | echo local: Set_Language.bat 39 | 40 | :exit -------------------------------------------------------------------------------- /examples/Windows/Set_Persmouse_Status.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to set the :: 5 | :: persistent mouse and keyboard. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | 14 | @echo off 15 | set argC=0 16 | for %%x in (%*) do Set /A argC+=1 17 | if %argC% EQU 3 goto :remote 18 | if %argC% EQU 0 goto :local 19 | goto :error 20 | 21 | :local 22 | ilorest select Manager. -u USER_LOGIN -p PASSWORD 23 | ilorest set Oem/Hpe/PersistentMouseKeyboardEnabled=False 24 | ilorest commit 25 | ilorest logout 26 | goto :exit 27 | :remote 28 | ilorest select Manager. --url=%1 -u %2 -p %3 29 | ilorest set Oem/Hpe/PersistentMouseKeyboardEnabled=False 30 | ilorest commit 31 | ilorest logout 32 | goto :exit 33 | 34 | :error 35 | echo Usage: 36 | echo remote: Set_Persmouse_Status.bat ^ ^ ^ 37 | echo local: Set_PersMouse_Status.bat 38 | 39 | :exit -------------------------------------------------------------------------------- /examples/Windows/Set_Server_Name.bat: -------------------------------------------------------------------------------- 1 | :: RESTful Interface Tool Sample Script for HPE iLO Products :: 2 | :: Copyright 2014, 2020 Hewlett Packard Enterprise Development LP :: 3 | 4 | :: Description: This is a sample batch script to set the host :: 5 | :: server name. :: 6 | 7 | :: NOTE: You will need to replace the USER_LOGIN and PASSWORD :: 8 | :: values with values that are appropriate for your :: 9 | :: environment. :: 10 | 11 | :: Firmware support information for this script: :: 12 | :: iLO 5 - All versions :: 13 | :: iLO 4 - All versions. :: 14 | 15 | @echo off 16 | set argC=0 17 | for %%x in (%*) do Set /A argC+=1 18 | if %argC% EQU 3 goto :remote 19 | if %argC% EQU 0 goto :local 20 | goto :error 21 | 22 | :local 23 | ilorest select Bios. -u USER_LOGIN -p PASSWORD 24 | ilorest set ServerName=MyServerName 25 | ilorest commit 26 | ilorest logout 27 | goto :exit 28 | :remote 29 | ilorest select Bios. --url=%1 -u %2 -p %3 30 | ilorest set ServerName=MyServerName 31 | ilorest commit 32 | ilorest logout 33 | goto :exit 34 | 35 | :error 36 | echo Usage: 37 | echo remote: Set_Server_Name.bat ^ ^ ^ 38 | echo local: Set_Server_Name.bat 39 | 40 | :exit -------------------------------------------------------------------------------- /hpe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/hpe.ico -------------------------------------------------------------------------------- /ilorest/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/__init__.py -------------------------------------------------------------------------------- /ilorest/chiflibrary/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/chiflibrary/__init__.py -------------------------------------------------------------------------------- /ilorest/config/__init__.py: -------------------------------------------------------------------------------- 1 | """Config parsing for RDMC""" 2 | -------------------------------------------------------------------------------- /ilorest/extensions/BIOS_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/BIOS_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/COMMANDS/REQUIREDCOMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/COMMANDS/REQUIREDCOMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/PERSISTENT_MEMORY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/PERSISTENT_MEMORY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/PERSISTENT_MEMORY_COMMANDS/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/PERSISTENT_MEMORY_COMMANDS/lib/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/RAW_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/RAW_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/SMART_ARRAY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/SMART_ARRAY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/SMART_NIC_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/SMART_NIC_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | """find and add dynamic extensions""" 2 | import os 3 | 4 | tl = [] 5 | classNames = [] 6 | Commands = {} 7 | 8 | extensionDir = os.path.dirname(__file__) 9 | 10 | if os.name != "nt": 11 | replacement = "/" 12 | else: 13 | replacement = "\\" 14 | 15 | for cwd, dirs, filenames in os.walk(extensionDir): 16 | dirs[:] = [d for d in dirs if not d[0] == "."] 17 | tl.append((cwd, [files for files in filenames if not files[0] == "."])) 18 | 19 | for cwd, names in tl: 20 | cn = cwd.split("extensions")[-1] 21 | cn = cn.replace(replacement, ".") 22 | comms = [] 23 | for name in names: 24 | if name.endswith(".pyc") and "__" not in name: 25 | name = name.replace(".pyc", "") 26 | classNames.append(cn + "." + name + "." + name) 27 | elif name.endswith(".py") and "__" not in name: 28 | name = name.replace(".py", "") 29 | if name + ".pyc" in names: 30 | continue 31 | classNames.append(cn + "." + name + "." + name) 32 | -------------------------------------------------------------------------------- /ilorest/extensions/_hidden_commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/_hidden_commands/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/iLO_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/iLO_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/extensions/iLO_REPOSITORY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/extensions/iLO_REPOSITORY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /ilorest/hpe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/ilorest/hpe.ico -------------------------------------------------------------------------------- /ilorest/ilorest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | FILES="AppToken.dat" 4 | INSTALL_ROOT="/opt/ilorest" 5 | VITAL_DIR=$INSTALL_ROOT/vital 6 | DATA_DIR=$INSTALL_ROOT/data 7 | for f in $FILES; do 8 | if [ ! -e $VITAL_DIR/$f ]; then 9 | sh -cx " 10 | cp $DATA_DIR/$f $VITAL_DIR/$f 11 | chmod +w $VITAL_DIR/$f 12 | " >/dev/null 2>&1 13 | fi 14 | done 15 | 16 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" 17 | python3 $SCRIPT_PATH/rdmc.py $@ 18 | -------------------------------------------------------------------------------- /ilorest/versioning.py: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright 2017 Hewlett Packard Enterprise, Inc. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ### 16 | 17 | # -*- coding: utf-8 -*- 18 | """ Version strings for the utility """ 19 | 20 | __version__ = "6.1.0.0" 21 | __shortname__ = "iLORest" 22 | __longname__ = "RESTful Interface Tool" 23 | __extracontent__ = "Copyright (c) 2014-2025 Hewlett Packard Enterprise Development LP\n" 24 | -------------------------------------------------------------------------------- /libcrypt.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/libcrypt.so.1 -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.isort] 2 | profile = "black" 3 | [tool.black] 4 | line-length = 120 5 | include = 'src\/.*\.pyi?$|src\/COMMANDS\/.*\.pyi?$' 6 | exclude = ''' 7 | /( 8 | \\.git 9 | | \\.hg 10 | | \\.mypy_cache 11 | | \\.tox 12 | | \\.venv 13 | | _build 14 | | buck-out 15 | | build 16 | | dist 17 | | packaging 18 | | tests 19 | )/ 20 | ''' 21 | [tool.pylint.format] 22 | max-line-length = "120" 23 | 24 | -------------------------------------------------------------------------------- /rdmc-pyinstaller-lin.spec: -------------------------------------------------------------------------------- 1 | # -*- mode: python -*- 2 | import os 3 | 4 | block_cipher = None 5 | 6 | def hiddenImportGet(): 7 | tl = [] 8 | classNames = [] 9 | _Commands = {} 10 | 11 | extensionDir = os.path.dirname(os.getcwd()+ '/src') 12 | 13 | replacement = '/' 14 | 15 | for (cwd, dirs, filenames) in os.walk(extensionDir): 16 | dirs[:] = [d for d in dirs if not d[0] == '.'] 17 | tl.append((cwd,[files for files in filenames if not files[0] == '.'])) 18 | 19 | for cwd, names in tl: 20 | cn = cwd.split('extensions')[-1] 21 | cn = cn.replace(replacement, '.') 22 | for name in names: 23 | if '.pyc' not in name and '__init__' not in name: 24 | name = name.replace('.py', '') 25 | classNames.append('extensions'+cn+'.'+name) 26 | return classNames 27 | 28 | a = Analysis(['.//src//rdmc.py'], 29 | pathex=[], 30 | binaries=None, 31 | datas=[('.//src//extensions', 'extensions')], 32 | hiddenimports=hiddenImportGet(), 33 | hookspath=[], 34 | runtime_hooks=[], 35 | excludes=[], 36 | cipher=block_cipher) 37 | 38 | pyz = PYZ(a.pure, a.zipped_data, 39 | cipher=block_cipher) 40 | exe = EXE(pyz, 41 | a.scripts, 42 | a.binaries, 43 | a.zipfiles, 44 | a.datas, 45 | name='ilorest', 46 | debug=False, 47 | strip=False, 48 | upx=True, 49 | icon = './/win32//HPcircle.ico', 50 | console=True ) 51 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | urllib3 >= 1.26.2 2 | pyaes >= 1.6.1 3 | colorama >= 0.4.4 4 | jsonpointer >= 2.0 5 | six >= 1.15.0 6 | ply >= 3.11 7 | decorator >= 4.4.2 8 | jsonpatch >= 1.28 9 | jsonpath-rw >= 1.4.0 10 | setproctitle >= 1.1.8; platform_system == "Linux" 11 | jsondiff >= 1.2.0 12 | tabulate >= 0.8.7 13 | requests >= 2.32.3 14 | prompt_toolkit 15 | certifi >= 2020.12.5 16 | pywin32; platform_system == "Windows" 17 | pypiwin32; python_version <= '2.7.19' 18 | wcwidth >= 0.2.5 19 | enum; python_version <= '2.7.19' 20 | pre-commit 21 | future 22 | futures; python_version <= '2.7.19' 23 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [isort] 2 | profile = black 3 | [pycodestyle] 4 | ignore = E203 5 | max_line_length = 120 6 | [pylint] 7 | max-line-length = 120 8 | [flake8] 9 | max-line-length = 120 10 | extend-ignore = E203,E722,C901,E731,W605, F841 11 | exclude = 12 | .git, 13 | packaging, 14 | __pycache__, 15 | build, 16 | dist, 17 | docs, 18 | ilorest/redfish 19 | tests, 20 | ilorest/extensions/_hidden_commands/AutomaticTestingCommand.py, 21 | max-complexity = 20 22 | 23 | [bdist_wheel] 24 | universal=1 25 | 26 | [metadata] 27 | license_files = LICENSE 28 | -------------------------------------------------------------------------------- /src/config/__init__.py: -------------------------------------------------------------------------------- 1 | """Config parsing for RDMC""" 2 | -------------------------------------------------------------------------------- /src/extensions/BIOS_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/BIOS_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/COMMANDS/REQUIREDCOMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/COMMANDS/REQUIREDCOMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/PERSISTENT_MEMORY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/PERSISTENT_MEMORY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/PERSISTENT_MEMORY_COMMANDS/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/PERSISTENT_MEMORY_COMMANDS/lib/__init__.py -------------------------------------------------------------------------------- /src/extensions/RAW_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/RAW_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/SMART_ARRAY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/SMART_ARRAY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/SMART_NIC_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/SMART_NIC_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | """find and add dynamic extensions""" 2 | import os 3 | 4 | tl = [] 5 | classNames = [] 6 | Commands = {} 7 | 8 | extensionDir = os.path.dirname(__file__) 9 | 10 | if os.name != "nt": 11 | replacement = "/" 12 | else: 13 | replacement = "\\" 14 | 15 | for cwd, dirs, filenames in os.walk(extensionDir): 16 | dirs[:] = [d for d in dirs if not d[0] == "."] 17 | tl.append((cwd, [files for files in filenames if not files[0] == "."])) 18 | 19 | for cwd, names in tl: 20 | cn = cwd.split("extensions")[-1] 21 | cn = cn.replace(replacement, ".") 22 | comms = [] 23 | for name in names: 24 | if name.endswith(".pyc") and "__" not in name: 25 | name = name.replace(".pyc", "") 26 | classNames.append(cn + "." + name + "." + name) 27 | elif name.endswith(".py") and "__" not in name: 28 | name = name.replace(".py", "") 29 | if name + ".pyc" in names: 30 | continue 31 | classNames.append(cn + "." + name + "." + name) 32 | -------------------------------------------------------------------------------- /src/extensions/iLO_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/iLO_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/extensions/iLO_REPOSITORY_COMMANDS/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/extensions/iLO_REPOSITORY_COMMANDS/__init__.py -------------------------------------------------------------------------------- /src/hpe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/src/hpe.ico -------------------------------------------------------------------------------- /src/ilorest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | SCRIPT_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" 3 | python3 $SCRIPT_PATH/rdmc.py $@ 4 | -------------------------------------------------------------------------------- /src/versioning.py: -------------------------------------------------------------------------------- 1 | ### 2 | # Copyright 2017 Hewlett Packard Enterprise, Inc. All rights reserved. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | ### 16 | 17 | # -*- coding: utf-8 -*- 18 | """ Version strings for the utility """ 19 | 20 | __version__ = "5.2.0.0" 21 | __shortname__ = "iLORest" 22 | __longname__ = "RESTful Interface Tool" 23 | __extracontent__ = "Copyright (c) 2014-2024 Hewlett Packard Enterprise Development LP\n" 24 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # tox (https://tox.readthedocs.io/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | envlist = py27, pylint, py3 8 | skipsdist=True 9 | 10 | [testenv:py27] 11 | changedir = tests 12 | deps = 13 | pytest 14 | mock 15 | commands = pytest --junit-xml={toxinidir}/python2.xml 16 | 17 | [testenv:py3] 18 | changedir = tests 19 | deps = pytest 20 | commands = pytest --junit-xml={toxinidir}/python3.xml 21 | 22 | [testenv:pylint] 23 | deps = pylint==1.6.1 24 | commands = - bash {toxinidir}/pylint.sh 25 | 26 | [flake8] 27 | max-line-length = 120 28 | extend-ignore = E203 29 | -------------------------------------------------------------------------------- /win32/hpe.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/python-redfish-utility/06e9ae09fe4b2cb29d81423027e897ea3c64b948/win32/hpe.ico -------------------------------------------------------------------------------- /win32/rdmc-envs.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET ILORESTDIR=%~dp0 4 | 5 | :: remove trailing slash 6 | IF %ILORESTDIR:~-1%==\ SET ILORESTDIR=%ILORESTDIR:~0,-1% 7 | 8 | 9 | SET PATH=%ILORESTDIR%;%PATH% 10 | 11 | echo. 12 | echo "ilorest command added to your path" 13 | echo. 14 | 15 | echo "Type ilorest --help for usage" 16 | 17 | echo. 18 | 19 | 20 | GOTO END 21 | 22 | 23 | :ERROR_HPRMCDIR_NOT_FOUND 24 | echo "ERROR: Unable to locate ilorest directory, please re-install to set the path manually" 25 | GOTO END 26 | 27 | :END 28 | 29 | -------------------------------------------------------------------------------- /win32/symlink.bat: -------------------------------------------------------------------------------- 1 | Rem cmd /C mklink .\hprest.exe .\ilorest.exe 2 | --------------------------------------------------------------------------------