New agent is online, and it works great, thanks a lot for update.
Is there possibility to get “serverName” and not “name”
Because “serverName” is descriptive like Webserver1
and “name” is just frame 1 bay 7
Example:
serverName
The name of the server as reported by the iLO. The iLO gets this information from a running operating system that has monitoring software installed, like Agentless Management Service.
name
For blade servers, it is the location based name of the server, which is formed by concatenating the enclosure name and the bay number. For rack servers, it is the serial number prefixed by word “ILO” (e.g. ILOUSE31835LS).
So just this change would do:
from
"hpe_oneview_server_hardware": {"url":"/rest/server-hardware?start=0&count=128",
"output_members": ["name", "state", "status"]},
to
"hpe_oneview_server_hardware": {"url":"/rest/server-hardware?start=0&count=128",
"output_members": ["serverName", "state", "status"]},
As per docs
HPE OneView REST API Reference
And you would probably need to bump API version:
def api_calls(address, token):
headers = {
"X-Api-Version": "1200",
"Content-Type": "application/json",
"Auth": token
}
to
def api_calls(address, token):
headers = {
"X-Api-Version": "2400",
"Content-Type": "application/json",
"Auth": token
}