Forge Home

rest

Huawei rest tool puppet module

7,037 downloads

4,157 latest version

3.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.2.0 (latest)
  • 1.1.1 (deleted)
  • 1.1.0 (deleted)
  • 1.0.0
released Sep 11th 2019

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'serverplugin-rest', '1.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add serverplugin-rest
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install serverplugin-rest --version 1.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

serverplugin/rest — version 1.2.0 Sep 11th 2019

rest

Table of Contents

  1. Description
  2. Setup - The basics of getting started with rest
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

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.

Setup

What rest affects

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.0 module

Setup Requirements

  • 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

Beginning with rest

puppet module install serverplugin-rest

Check Puppet Labs: Installing Modules for more information.

Usage

These Puppet resources are defined as part of Rest module:

Common Attributes

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.

rest::bios::boot::get

Get boot settings.

Attributes

No additional attributes

Examples Manifest

boot_get.pp

rest::bios::boot::order

Set boot order.

Additional Attributes

Attribute Type Description
sequence Array[String] boot order sequence

Examples Manifest

boot_order.pp

rest::bios::boot::override

Set boot source override.

Additional Attributes

Attribute Type Description
target Enum boot source
enabled Boolean boot source override times

Examples Manifest

boot_override.pp

rest::bios::get

Get BIOS attribute.

Additional Attributes

Attribute Type Description
attribute String indicates the BIOS attribute

Examples Manifest

bios_get.pp

rest::bios::restore

Restore BIOS attribute.

Additional Attributes

No additional attributes

Examples Manifest

bios_restore.pp

rest::bios::set

Set BIOS attribute.

Additional Attributes

Attribute Type Description
attribute String attribute name
value String attribute value

Examples Manifest

bios_set.pp

rest::bmc::ethernet::dns

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

ethernet_dns_set.pp

rest::bmc::ethernet::get

Get iBMC ethernet interface information.

Additional Attributes

No additional attributes

Examples Manifest

ethernet_get.pp

rest::bmc::ethernet::ipv4

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

ethernet_ipv4_set.pp

rest::bmc::ethernet::ipv6

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

ethernet_ipv6_set.pp

rest::bmc::ethernet::ipversion

Set iBMC ethernet IP version.

Additional Attributes

Attribute Type Description
value String IP version. It can be IPv4AndIPv6, IPv4, IPv6.

Examples Manifest

ethernet_ipversion_set.pp

rest::bmc::ethernet::vlan

Set iBMC ethernet VLAN.

Additional Attributes

Attribute Type Description
enabled Boolean whether VLAN is enabled.
vlan_id Integer VLAN id (1-4094).

Examples Manifest

ethernet_vlan_set.pp

rest::bmc::license::delete

Delete iBMC license.

Additional Attributes

No additional attributes

Examples Manifest

license_delete.pp

rest::bmc::license::export

Export iBMC license.

Additional Attributes

Attribute Type Description
export_to String the file path of export license file.

Examples Manifest

license_export.pp

rest::bmc::license::get

Get iBMC license infomation.

Additional Attributes

No additional attributes

Examples Manifest

license_get.pp

rest::bmc::license::install

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

license_install.pp

rest::bmc::ntp::get

Get NTP settings.

Additional Attributes

No additional attributes

Examples Manifest

ntp_get.pp

rest::bmc::ntp::set

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

ntp_set.pp

rest::bmc::power::ctrl

Power Ctrl

Additional Attributes

Attribute Type Description
reset_type Enum Power Reset Type

Examples Manifest

sys_power_ctrl.pp

rest::bmc::power::restart

iBMC Power Restart.

Additional Attributes

No additional attributes

Examples Manifest

bmc_power_restart.pp

rest::bmc::service::get

Get service information

Additional Attributes

no additional attributes

Examples Manifest

service_get.pp

rest::bmc::service::set

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

service_set.pp

rest::bmc::smtp::get

Get SMTP settings

Additional Attributes

no additional attributes

Examples Manifest

smtp_get.pp

rest::bmc::smtp::set

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

smtp_set.pp

rest::bmc::snmp::get

Get SNMP settings

Additional Attributes

no additional attributes

Examples Manifest

snmp_get.pp

rest::bmc::snmp::set

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

snmp_set.pp

rest::bmc::vmm::connect

Connect to virtual media.

Additional Attributes

Attribute Type Description
image_uri String VRI of the virtualmedia image

Examples Manifest

vmm_connect.pp

rest::bmc::vmm::disconnect

Disconnect virtual media.

Additional Attributes

no additional attributes

Examples Manifest

vmm_disconnect.pp

rest::chassis::led::set

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

indicator_led_set.pp

rest::firmware::inband::upgrade

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

firmware_inband_upgrade.pp

rest::firmware::inband::version

Get inband firmware version.

Additional Attributes

no additional attributes

Examples Manifest

firmware_inband_version_get.pp

rest::firmware::outband::upgrade

Upgrade outband firmware.

Additional Attributes

Attribute Type Description
firmware_file_uri String indicates the firmware file url.

Examples Manifest

firmware_outband_upgrade.pp

rest::firmware::outband::version

Get outband firmware version.

Additional Attributes

no additional attributes

Examples Manifest

firmware_outband_version_get.pp

rest::firmware::sp::result

Get Smart Provisioning result.

Additional Attributes

no additional attributes

Examples Manifest

firmware_sp_result_get.pp

rest::firmware::sp::set

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

sp_set.pp

rest::firmware::sp::upgrade

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

firmware_sp_upgrade.pp

rest::firmware::sp::version

Get Smart Provisioning service version.

Additional Attributes

no additional attributes

Examples Manifest

firmware_sp_version_get.pp

rest::system::assettag::set

Update iBMC asset tag.

Additional Attributes

Attribute Type Description
value String indicates the asset tag.

Examples Manifest

assettag_set.pp

rest::system::cpu

Get CPU List

Additional Attributes

no additional attributes

Examples Manifest

cpu_get.pp

rest::system::cpu::health

Get CPU health infomation

Additional Attributes

no additional attributes

Examples Manifest

cpu_health_get.pp

rest::system::deploy::config

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

os_deploy_config.pp

rest::system::drive

Get physical drive list

Additional Attributes

no additional attributes

Examples Manifest

drive_get.pp

rest::system::drive::health

Get physical drive health infomation.

Additional Attributes

no additional attributes

Examples Manifest

drive_health_get.pp

rest::system::eth::get

Get system ethernet list.

Additional Attributes

no additional attributes

Examples Manifest

system_eth_get.pp

rest::system::fan::health

Get fan health infomation.

Additional Attributes

no additional attributes

Examples Manifest

fan_health_get.pp

rest::system::get

Get system infomation.

Additional Attributes

no additional attributes

Examples Manifest

system_get.pp

rest::system::memory

Get memory list

Additional Attributes

no additional attributes

Examples Manifest

memory_get.pp

rest::system::memory::health

Get memory health infomation.

Additional Attributes

no additional attributes

Examples Manifest

memory_health_get.pp

rest::system::network_adapter::health

Get system network adaptor health infomation.

Additional Attributes

no additional attributes

Examples Manifest

network_adapter_health_get.pp

rest::system::network_adapter

Get system network adaptor infomation.

Additional Attributes

no additional attributes

Examples Manifest

network_adapter_get.pp

rest::system::power_supply::health

Get power supply health infomation.

Additional Attributes

no additional attributes

Examples Manifest

power_supply_health_get.pp

rest::system::raid

Get RAID controller list

Additional Attributes

no additional attributes

Examples Manifest

raid_get.pp

rest::system::raid::health

Get RAID health infomation.

Additional Attributes

no additional attributes

Examples Manifest

raid_health_get.pp

rest::user::add

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

user_add.pp

rest::user::delete

Add new user

Additional Attributes

Attribute Type Description
username String indicates the user to be deleted

Examples Manifest

user_delete.pp

rest::user::get

Get user list

Additional Attributes

no additional attributes

Examples Manifest

user_get.pp

rest::user::set

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

user_set.pp

Limitations

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.

Development

Feel free to fork repo and send PR.