diff --git a/README.adoc b/README.adoc index 4b4e66e..1049bbb 100644 --- a/README.adoc +++ b/README.adoc @@ -1,6 +1,6 @@ :author: Jürgen Orth :email: Juergen.Orth@Fujitsu.com -:version: v1.0.9 +:version: v1.0.10 :imagesdir: img/ :toc: preamble @@ -33,6 +33,7 @@ IMPORTANT: *#Please note: This toolset is provided W/O ANY WARRANTY and is to be [cols="5%,10%,65%,20%"] |================= |Version|Date|Description|Author +|1.0.10|2023-03-27|+ `ism_show_profiles`: Added command to list all available deployment profiles in ISM. (thanks to mailto:Gerald.Rausch@Fujitsu.com[Gerald Rausch])|mailto:{email}[{Author}] |1.0.9|2023-03-08|+ `ism_get_snap`: Snapfile will be deleted on ISM-VA after it has been downloaded.|mailto:{email}[{Author}] |1.0.8|2023-03-03|+ Added missing command in commandlist of README|mailto:{email}[{Author}] |1.0.7|2023-02-28| @@ -186,6 +187,9 @@ Sets power thresholds for all/given nodes. * <> + Display an overview of racks with _RackId_ and _RackName_. +* <> + +List all available deployment profiles in ISM. + * <> + Display imported ISO files. @@ -844,6 +848,36 @@ RackId RackName 14 R1 ---- +[[ism_show_profiles]] +==== `ism_show_profiles` +List all available deployment profiles in ISM. + +TIP: To avoid line wrapping you can pipe output to `less -S`. + +[source,shell,indent=8] +---- +$ism_show_profiles + + ID Profile Node NodeIP-iRMC Status Category +=== ================================================== ================== =============== ========== ==================== + 19 TX2550m5-9-25_PXE_ESXi_7U3 TX2550M5-9-25 192.xxx.x.xx assigned Server-TX + 16 RX2520m4-7-33_PXE_ESXi_7U3 RX2520M4-7-33 192.xxx.x.xx error Server-RX + 2 RX2540M2-9-6-wind2019 RX2540M2-9-6 192.xxx.x.xx error Server-RX + 17 TX2550m5-9-25_PXE_SLES_15-4 --- --- unassigned Server-TX + 9 TX2550m5-9-25_PXE__use_existing --- --- unassigned Server-TX + 14 RX2520m4-7-33_PXE_SLES_15-4 --- --- unassigned Server-RX + 13 snmptrapdest --- --- unassigned Server-RX + 12 RX2520m4-7-33_elcm__RAID0_win2019 --- --- unassigned Server-RX + 11 RX2520m4-7-33_PXE__use_existing_SATA --- --- unassigned Server-RX + 10 RX2520m4-7-33_PXE__use_existing_raid_copy --- --- unassigned Server-RX + 8 RX2520m4-7-33_PXE__use_existing_raid --- --- unassigned Server-RX + 7 RX2520m4-7-33_PXE_Sata_R1 --- --- unassigned Server-RX + 6 RX2520m4-7-33_elcm_copy --- --- unassigned Server-RX + 5 RX2520m4-7-33_elcm --- --- unassigned Server-RX + 4 RX2520m4-7-33 --- --- unassigned Server-RX + 3 RX2520M4-7-33-wind2019_copy --- --- unassigned Server-RX +---- + [[ism_show_isos]] ==== `ism_show_isos` Shows the ISO files that have been uploaded to ISM VA. diff --git a/doc/ISMtools v1.0.9.pdf b/doc/ISMtools v1.0.9.pdf deleted file mode 100755 index 9c2c3cf..0000000 Binary files a/doc/ISMtools v1.0.9.pdf and /dev/null differ diff --git a/doc/README.pdf b/doc/README.pdf new file mode 100644 index 0000000..0c81f95 Binary files /dev/null and b/doc/README.pdf differ diff --git a/scripts/ism_show_profiles b/scripts/ism_show_profiles new file mode 100755 index 0000000..4682151 --- /dev/null +++ b/scripts/ism_show_profiles @@ -0,0 +1,30 @@ +#!/bin/bash +# (c) Gerald Rausch ;-) +# $Id: ism_show_profiles 178 2023-03-29 10:19:43Z HMBJOrth $ +# for documentation see https://github.com/fujitsu/ISMtools + +. ${0%/*}/.ism_env + +CheckJQ + +FMTHEAD="%3s+%-50s+%-18s+%-15s+%10s+%-20s\n" +FMTLINE="%3d %-50s %-18s %-15s %10s %-20s\n" + +# Prefetch nodename and nodeip in array +while read id nodename ipaddr +do + profile_nodes[$id]="$nodename" + profile_ips[$id]="$ipaddr" +done < <( ism_cmd get /nodes | jq -j '.IsmBody.Nodes[]|.NodeId," ",.Name," ",.IpAddress,"\n"') + +# table header +printf "$FMTHEAD" ID Profile Node NodeIP\-iRMC Status Category | tr '+' ' ' +printf "$FMTHEAD" " " | tr ' +' '= ' + +# print results +while read id profile nodeid category status +do + printf "$FMTLINE" "$id" "$profile" "${profile_nodes[$nodeid]:----}" "${profile_ips[$nodeid]:----}" "$status" "${category:0:20}" +done < <(ism_cmd get "/profiles/profiles" | \ + jq -j '.IsmBody.ProfileList[]|.ProfileId," ",.ProfileName," ",.AssignedNodeId," ",.CategoryName," ",.Status,"\n"') |\ + sort +4 -6 -r