python-redfish/redfish-client/templates/serial_info.template
Bruno Cornec b0ff208138 Add the monitor command
- monitor command role is to print on a regular base the values of
variable constants (Temperature, power, Fans, ...)
- new monitor_loop parameter (wait time between queries)
- new monitor_info.template
- get_power has been renamed to get_powerstate to avoid confusion with
Power measures and moved to the Device class as well as get_description
- More genericity for the Power and Thermal classes (moved into types.py)
- Build process amended (0.4.3 is the next version, repo are generic and
in line with pb 0.15

Change-Id: I05016b2557b2f7638e1ea22a89dcf91ebae1066f
2019-10-14 12:32:22 +02:00

82 lines
3.2 KiB
Plaintext

Redfish API version: {{ r.get_api_version() }}
{{ r.Root.get_name() }}
Part|Serial Numbers information:
================================
{% for chassis_index in r.Chassis.chassis_dict | sort %}
{%- set chassis = r.Chassis.chassis_dict[chassis_index] %}
Chassis #{{ chassis_index }}:
Name: {{ chassis.get_name() }}
Manufacturer: {{ chassis.get_manufacturer() }}
Model: {{ chassis.get_model() }}
Chassis Type: {{ chassis.get_type() }}
Part#: {{ chassis.get_part_number() }}
SKU: {{ chassis.get_sku() }}
Serial#: {{ chassis.get_serial_number() }}
AssetTag: {{ chassis.get_asset_tag() }}
FW version: {{ chassis.get_fw_version() }}
{%- endfor %}
--------------------------------------------------------------------------------
{% for system_index in r.Systems.systems_dict | sort %}
{%- set system = r.Systems.systems_dict[system_index] %}
System #{{ system_index }}:
Name: {{ system.get_name() }}
Type: {{ system.get_type() }}
Model: {{ system.get_model() }}
SKU: {{ system.get_sku() }}
Serial: {{ system.get_serial_number() }}
FW version: {{ system.get_fw_version() }}
CPU number: {{ system.get_cpucount() }}
CPU model: {{ system.get_cpumodel() }}
Available memory: {{ system.get_memory() }} GB
Status: State: {{ system.get_status().Health }} / Health: {{ system.get_status().Health }}
Power: {{ system.get_powerstate() }}
{%- if system.data.Oem.Hpe or system.data.Oem.Hp %}
{%- if system.network_adapters_collection %}
{%- for nic_index in system.network_adapters_collection.network_adapters_dict | sort %}
{%- if system.network_adapters_collection.network_adapters_dict[nic_index] %}
{%- set na = system.network_adapters_collection.network_adapters_dict[nic_index] %}
Network Adapter #{{ nic_index }}:
Name: {{ na.get_name() }}
Mac address:
{%- for mac_index in na.get_mac() | sort %}
Mac #{{ loop.index }}: {{ mac_index }}
{%- endfor %}
Serial#: {{ na.get_serial_number() }}
Part#: {{ na.get_part_number() }}
FW version: {{ na.get_fw_version() }}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- if system.data.Oem.Hpe or system.data.Oem.Hp %}
{%- if system.smart_storage %}
{%- for ac_index in system.smart_storage.array_controllers_collection.array_controllers_dict | sort %}
{%- set ac = system.smart_storage.array_controllers_collection.array_controllers_dict[ac_index] %}
Array controller #{{ ac_index }}:
Model: {{ ac.get_model() }}
Serial #: {{ ac.get_serial_number() }}
Part #: {{ ac.get_part_number() }}
{%- for logical_drives_index in ac.logical_drives_collection.logical_drives_dict | sort %}
{%- set ld = ac.logical_drives_collection.logical_drives_dict[logical_drives_index] %}
Logical drive #{{ logical_drives_index }}:
Capacity: {{ ld.get_capacity() }} MB
Raid Level: {{ ld.get_raid() }}
{%- endfor %}
{%- for physical_drives_index in ac.physical_drives_collection.physical_drives_dict | sort %}
{%- set pd = ac.physical_drives_collection.physical_drives_dict[physical_drives_index] %}
Physical drive #{{ physical_drives_index }}:
{{ pd.get_model() }}
Capacity: {{ pd.get_capacity() }} MB
Serial #: {{ pd.get_serial_number() }}
Part #: {{ pd.get_part_number() }}
FW: {{ pd.get_fw_version() }}
{%- endfor %}
{%- endfor %}
{%- endif %}
{%- endif %}
--------------------------------------------------------------------------------
{% endfor %}