Cray-HPE / gru

A utility for reading and modifying BMCs (e.g. iLO, RMMC) using RedFish (gofish).
MIT License
6 stars 2 forks source link

`gru bios get --attributes` doesn't seem to acknowledge commas #63

Closed rustydb closed 4 months ago

rustydb commented 5 months ago
SUMMARY
ISSUE TYPE
STEPS TO REPRODUCE
  1. Give gru bios get --attributes a comma delimited string
EXPECTED RESULTS

gru should print out values for each.

ACTUAL RESULTS

gru doesn't split the string, searching for an attribute with the name of the entire string.

redbull-management:~ # conman -q | gru bios get --
--attributes      (Comma delimited list of attributes and values: [key[,keyN]])
--config          (Configuration file containing BMC credentials, necessary if USERNAME and PASSWORD are not defined in the environment gru)
--from-file       (Path to an INI or YAML file with bios attributes (value(s) for key(s) will be ignored))
--help            (help for get)
--insecure        (Ignore untrusted or insecure certificates)
--json            (Output in JSON)
--pending         (Get pending BIOS attribute changes)
--virtualization  (Shortcut to get all pre-determined, per-vendor settings for virtualization)
--yaml            (Output in YAML)
redbull-management:~ # conman -q | gru bios get --attributes OnboardNICEnable_0,OnboardNICEnable_1
Asynchronously querying [    9] hosts ...
ncn-h002-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-h003-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-h004-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-h005-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-h006-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-s001-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-s002-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-s003-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
ncn-s004-mgmt:
    Attributes:
        OnboardNICEnable_0,OnboardNICEnable_1                       : <nil>
redbull-management:~ # conman -q | gru bios get --attributes OnboardNICEnable_0
Asynchronously querying [    9] hosts ...
ncn-h002-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0
ncn-h003-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 1
ncn-h004-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0
ncn-h005-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 1
ncn-h006-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0
ncn-s001-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 1
ncn-s002-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0
ncn-s003-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0
ncn-s004-mgmt:
    Attributes:
        OnboardNICEnable_0                                          : 0