- Description
- Setup - The basics of getting started with rest
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
The Rest module is used to manage Huawei Servers with iBMC. This module provides some Puppet resource types and samples manifests for various features of the Huawei iBMC.
The Rest module implements all puppet resource types with Exec module which execute python scripts(Rest-Linux)
and those python scripts will access iBMC using Redfish API.
The Rest module will do:
- Install
Rest-Linux(scripts folder) to/etc/puppet/modules/rest/files - Install
stdlib>=5.0.0module
- Puppet Master/Agent version >= 5.0.0
- Puppet Agent OS family should be
redhat - Python 2.7 should be in ENV path in Puppet Agent
puppet module install serverplugin-restCheck Puppet Labs: Installing Modules for more information.
These Puppet resources are defined as part of Rest module:
rest::bios::boot::getrest::bios::boot::orderrest::bios::boot::overriderest::bios::getrest::bios::restorerest::bios::setrest::bmc::ethernet::dnsrest::bmc::ethernet::getrest::bmc::ethernet::ipv4rest::bmc::ethernet::ipv6rest::bmc::ethernet::ipversionrest::bmc::ethernet::vlanrest::bmc::license::deleterest::bmc::license::exportrest::bmc::license::getrest::bmc::license::installrest::bmc::ntp::getrest::bmc::ntp::setrest::bmc::power::ctrlrest::bmc::power::restartrest::bmc::service::getrest::bmc::service::setrest::bmc::smtp::getrest::bmc::smtp::setrest::bmc::snmp::getrest::bmc::snmp::setrest::bmc::vmm::connectrest::bmc::vmm::disconnectrest::chassis::led::setrest::firmware::inband::upgraderest::firmware::inband::versionrest::firmware::outband::upgraderest::firmware::outband::versionrest::firmware::sp::resultrest::firmware::sp::setrest::firmware::sp::upgraderest::firmware::sp::versionrest::system::assettag::setrest::system::cpu::healthrest::system::cpurest::system::deploy::configrest::system::drive::healthrest::system::driverest::system::eth::getrest::system::fan::healthrest::system::getrest::system::memory::healthrest::system::memoryrest::system::network_adapter::healthrest::system::network_adapterrest::system::power_supply::healthrest::system::raid::healthrest::system::raidrest::user::addrest::user::deleterest::user::getrest::user::set
All Rest resource type share those attributes:
| Attribute | Description |
|---|---|
| ibmc_username | iBMC login username |
| $ibmc_password | iBMC login password |
| $ibmc_host | iBMC API access host, default 127.0.0.1 |
| $ibmc_port | iBMC API access port, default 443 |
Rest module resource types can visit iBMC API anywhere, resource type is free to run on anywhere.
Get boot settings.
Attributes
No additional attributes
Examples Manifest
Set boot order.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| sequence | Array[String] | boot order sequence |
Examples Manifest
Set boot source override.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| target | Enum | boot source |
| enabled | Boolean | boot source override times |
Examples Manifest
Get BIOS attribute.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| attribute | String | indicates the BIOS attribute |
Examples Manifest
Restore BIOS attribute.
Additional Attributes
No additional attributes
Examples Manifest
Set BIOS attribute.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| attribute | String | attribute name |
| value | String | attribute value |
Examples Manifest
Set iBMC ethernet DNS.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| hostname | String | iBMC hostname |
| domain | String | iBMC domain name |
| address_origin | Enum | How to allocate DNS address |
| preferred_server | String | preferred DNS server address |
| alternate_server | String | alternative DNS server address |
Examples Manifest
Get iBMC ethernet interface information.
Additional Attributes
No additional attributes
Examples Manifest
Set iBMC ethernet IPv4 address.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| ip | String | IPv4 address |
| gateway | String | gateway IP address |
| mask | String | subnet mask |
| address_origin | Enum | How to allocate IP. It can be Static or DHCP |
Examples Manifest
Set iBMC ethernet IPv6 address.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| ip | String | IPv6 address |
| gateway | String | gateway IP address |
| prefix_length | integer | IPv6 address prefix length |
| address_origin | Enum | How to allocate IP. It can be Static, DHCPv6, LinkLocal, SLAAC. |
Examples Manifest
Set iBMC ethernet IP version.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| value | String | IP version. It can be IPv4AndIPv6, IPv4, IPv6. |
Examples Manifest
Set iBMC ethernet VLAN.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| enabled | Boolean | whether VLAN is enabled. |
| vlan_id | Integer | VLAN id (1-4094). |
Examples Manifest
Delete iBMC license.
Additional Attributes
No additional attributes
Examples Manifest
Export iBMC license.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| export_to | String | the file path of export license file. |
Examples Manifest
Get iBMC license infomation.
Additional Attributes
No additional attributes
Examples Manifest
Install iBMC license.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| source | Enum | License source. |
| type | Enum | Methods of installing the license file. It can be Text, URI. |
| content | String | License content. |
Examples Manifest
Get NTP settings.
Additional Attributes
No additional attributes
Examples Manifest
Setup NTP.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| enabled | Boolean | whether NTP service enabled or not |
| addr_origin | Enum | Ntp Address Origin |
| preferred_server | String | preferred NTP server address |
| alternate_server | String | alternative NTP server address |
| auth_enabled | Boolean | whether auth enabled |
| min_interval | Integer | minimum NTP synchronization interval. the value ranges from 3 to 17 |
| max_interval | Integer | maximum NTP synchronization interval. the value ranges from 3 to 17 |
Examples Manifest
Power Ctrl
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| reset_type | Enum | Power Reset Type |
Examples Manifest
iBMC Power Restart.
Additional Attributes
No additional attributes
Examples Manifest
Get service information
Additional Attributes
no additional attributes
Examples Manifest
Update service settings
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| protocol | Enum | indicates the Service to update |
| enabled | Boolean | indicates if the protocol property State is enabled or disabled |
| port | Integer | indicates the protocol property port range is 1 to 65535 |
| notify_ttl | Integer | indicates the protocol SSDP property, NotifyTTL range is 1 to 255 |
| notify_scope | Enum | indicates the protocol SSDP property NotifyIPv6Scope |
| notify_interval | Integer | indicates the notify multicast interval seconds |
Examples Manifest
Get SMTP settings
Additional Attributes
no additional attributes
Examples Manifest
Update SMTP settings
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| enabled | Boolean | indicates the SMTP state is enabled or disabled |
| server_addr | String | indicates if SMTP server address |
| tls_enabled | Enum | indicates if SMTP server support TLS or not |
| anon_enabled | Enum | indicates if SMTP server support anon |
| sender_addr | String | indicates the SMTP sender address |
| sender_password | String | indicates the SMTP sender password |
| sender_username | String | indicates the SMTP sender username |
| email_subject | String | indicates the SMTP sent email subject |
| email_subject_contains | Array[Enum] | indicates the SMTP sent email subject additional contents |
| alarm_severity | Enum | indicates the alarm severity to send email |
| receipt1 | Struct[TrapServer] | indicates the SMTP receipt 1 |
| receipt2 | Struct[TrapServer] | indicates the SMTP receipt 2 |
| receipt3 | Struct[TrapServer] | indicates the SMTP receipt 3 |
| receipt4 | Struct[TrapServer] | indicates the SMTP receipt 4 |
Examples Manifest
Get SNMP settings
Additional Attributes
no additional attributes
Examples Manifest
Update SNMP settings
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| v1_enabled | Boolean | indicates Whether SNMPv1 is enabled |
| v2_enabled | Boolean | indicates Whether SNMPv2 is enabled |
| long_password_enabled | Boolean | indicates Whether long passwords are enabled |
| rw_community_enabled | Boolean | indicates Whether read-write community name are enabled |
| rw_community | String | indicates the Read-Write community name |
| ro_community | String | indicates the Read-only community name |
| v3_auth_protocol | Enum | indicates the SNMPv3 authentication algorithm |
| v3_priv_protocol | Enum | indicates the SNMPv3 encryption algorithm |
| trap_enabled | Boolean | indicates Whether trap is enabled |
| trap_v3_user | String | indicates the SNMPv3 user name |
| trap_version | Enum | indicates the trap version |
| trap_mode | Enum | indicates the trap mode |
| trap_server_identity | Enum | indicates the trap Host identifier |
| trap_community | String | indicates the Community name |
| trap_alarm_severity | Enum | indicates the Severity level of the alarm to be sent |
| trap_server1 | Struct[TrapServer] | indicates the trap server 1 |
| trap_server2 | Struct[TrapServer] | indicates the trap server 2 |
| trap_server3 | Struct[TrapServer] | indicates the trap server 3 |
| trap_server4 | Struct[TrapServer] | indicates the trap server 4 |
Examples Manifest
Connect to virtual media.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| image_uri | String | VRI of the virtualmedia image |
Examples Manifest
Disconnect virtual media.
Additional Attributes
no additional attributes
Examples Manifest
Set chassis indicator LED status.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| state | Enum | indicates the state of chassis LED, it can be Lit, Off, Blinking. |
Examples Manifest
Upgrade inband firmware.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| firmware_file_uri | String | indicates the firmware file url. |
| signal_file_uri | String | indicates the signal file url of the firmware file. |
| mode | Enum | indicates the upgrade mode, it can be Auto, Full, Recover, APP, Driver. |
| active_method | Enum | indicates the firmware active method, it can be Restart. |
Examples Manifest
Get inband firmware version.
Additional Attributes
no additional attributes
Examples Manifest
firmware_inband_version_get.pp
Upgrade outband firmware.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| firmware_file_uri | String | indicates the firmware file url. |
Examples Manifest
Get outband firmware version.
Additional Attributes
no additional attributes
Examples Manifest
firmware_outband_version_get.pp
Get Smart Provisioning result.
Additional Attributes
no additional attributes
Examples Manifest
Upgrade Smart Provisioning service.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| start_enabled | boolean | indicates whether SP start is enabled. |
| system_restart_delay_seconds | integer | indicates maximum seconds allowed for the restart of the OS. |
| timeout | integer | indicates maximum time (300~86400) allowed for SP deployment. |
| finished | boolean | indicates Status of the transaction deployed. |
Examples Manifest
Upgrade Smart Provisioning service.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| firmware_file_uri | String | indicates the firmware file url. |
| mode | Enum | indicates the upgrade mode, it can be Auto, Full, Recover, APP, Driver. |
| active_method | Enum | indicates the firmware active method, it can be Restart. |
Examples Manifest
Get Smart Provisioning service version.
Additional Attributes
no additional attributes
Examples Manifest
Update iBMC asset tag.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| value | String | indicates the asset tag. |
Examples Manifest
Get CPU List
Additional Attributes
no additional attributes
Examples Manifest
Get CPU health infomation
Additional Attributes
no additional attributes
Examples Manifest
Update system OS deploy configuration.
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| os_deploy_config_file_path | String | indicates the file path of OS deploy configuration JSON file path. |
Examples Manifest
Get physical drive list
Additional Attributes
no additional attributes
Examples Manifest
Get physical drive health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get system ethernet list.
Additional Attributes
no additional attributes
Examples Manifest
Get fan health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get system infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get memory list
Additional Attributes
no additional attributes
Examples Manifest
Get memory health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get system network adaptor health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get system network adaptor infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get power supply health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Get RAID controller list
Additional Attributes
no additional attributes
Examples Manifest
Get RAID health infomation.
Additional Attributes
no additional attributes
Examples Manifest
Add new user
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| username | String | indicates the new created user's username |
| password | String | indicates the new created user's password |
| role | Enum | indicates the new created user's role |
Examples Manifest
Add new user
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| username | String | indicates the user to be deleted |
Examples Manifest
Get user list
Additional Attributes
no additional attributes
Examples Manifest
Update user attributes
Additional Attributes
| Attribute | Type | Description |
|---|---|---|
| username | String | indicates the user to be updated |
| newusername | String | indicates new name for user |
| newpassword | String | indicates new password for the user |
| newrole | Enum | indicates new role for user |
| enabled | Boolean | indicates if the user is enabled |
| locked | Boolean | indicates if the user is locked |
Examples Manifest
This is where you list OS compatibility, version compatibility, etc. If there are Known Issues, you might want to include them under their own heading here.
Feel free to fork repo and send PR.