<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: send refresh command with updated login credentials in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167850#M7232</link>
    <description>&lt;P&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1458"&gt;@ChrisLynch&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Chris.&amp;nbsp; I don't see any of our servers in an "Unmanaged" state.&amp;nbsp;&amp;nbsp; So, not sure why we had such problems.&amp;nbsp; I do see a number that are in "Profile&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;Error" state.&amp;nbsp; I extracted a list of all of the hardware (&lt;A href="https://community.hpe.com/t5/HPE-OneView/REST-API-getting-list-of-current-hardware/m-p/7053514#M4347" target="_blank" rel="noopener"&gt;REST-API-getting-list-of-current-hardware&lt;/A&gt;&amp;nbsp;).&amp;nbsp; If I then run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;jq -r '.members[] | { name: .name, state: .state, stateReason: .stateReason }' ${HARDW} | jq '. | select(.state!="ProfileApplied")'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see everything that is not in the normal "ProfileApplied" state.&amp;nbsp; I'll work on that to check for state Unmanaged and stateReason of Unconfigured to craft a reply.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 09:59:33 GMT</pubDate>
    <dc:creator>BradV</dc:creator>
    <dc:date>2022-06-07T09:59:33Z</dc:date>
    <item>
      <title>send refresh command with updated login credentials</title>
      <link>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167458#M7217</link>
      <description>&lt;P&gt;I know I can send a refresh command to all of my servers with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Get session credentials
# Get a list of all hardware in OneView into a file.
HARDW=hardw-all
DATA='{"refreshState" : "RefreshPending"}'
i=0
for SERVER in $(jq -r .members[] | "\(.uuid)"' ${HARDW}); do
   REFRESH[${i},0]=$(echo -n "${SERVER}")
   REFRESH[${i},1]=$(curl --insecure --include --silent \
      --header "content-type: application/json" \
      --header "auth: ${sessionID}" \
      --header "X-API-Version: ${currentVersion}" \
      --data "${DATA}" \
      --request PUT ${OneView}/rest/server-hardware/${SERVER}/refreshState | grep '^Location:' | awk '{ print $2 }')
   ((i++))
done
#
j=${i}
i=0
while [[ ${i} -lt ${j} ]]; do
   curl --insecure --silent \
      --header "auth: ${sessionID}" \
      --header "X-API-Version: ${currentVersion}" \
      --request PUT ${OneView}${REFRESH[${i},1]%$'\r'} | jq -r '.associatedResource.resourceName,.taskState'
   ((i++))
done   &lt;/LI-CODE&gt;&lt;P&gt;The problem is, it is not working for some.&amp;nbsp; I'm getting task status of Error.&amp;nbsp; When I go into the gui and ask for a refresh, it asks me to provide the user login credentials.&amp;nbsp; Which does not make sense.&amp;nbsp; If I click on the "iLO host name" or "iLO address" in OneView, it correctly opens the iLO interface.&lt;/P&gt;&lt;P&gt;Does anyone know how to send a refresh command and supply iLO credentials?&lt;/P&gt;&lt;P&gt;Note: all of our iLOs are running in high production mode.&amp;nbsp; We had to do that for TLS compliance reasons.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 04:00:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167458#M7217</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-06-01T04:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: send refresh command with updated login credentials</title>
      <link>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167503#M7222</link>
      <description>&lt;P&gt;Check for the server hardware &lt;FONT face="courier new,courier"&gt;state&lt;/FONT&gt; is &lt;FONT face="courier new,courier"&gt;Unmanaged&lt;/FONT&gt; and the &lt;FONT face="courier new,courier"&gt;stateReason&lt;/FONT&gt; is &lt;FONT face="courier new,courier"&gt;Unconfigured&lt;/FONT&gt;.&amp;nbsp; You will need to supply credentials to the iLO as the appliance is no longer able to communicate to the iLO with the defined credentials as part of the Body in your PUT request.&amp;nbsp; You will need a dictionary object with:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;refreshState = RefreshPending
hostname [string]
username [string]
password [string]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 16:40:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167503#M7222</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2022-05-31T16:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: send refresh command with updated login credentials</title>
      <link>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167850#M7232</link>
      <description>&lt;P&gt;&lt;a href="https://community.hpe.com/t5/user/viewprofilepage/user-id/1458"&gt;@ChrisLynch&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Chris.&amp;nbsp; I don't see any of our servers in an "Unmanaged" state.&amp;nbsp;&amp;nbsp; So, not sure why we had such problems.&amp;nbsp; I do see a number that are in "Profile&lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;Error" state.&amp;nbsp; I extracted a list of all of the hardware (&lt;A href="https://community.hpe.com/t5/HPE-OneView/REST-API-getting-list-of-current-hardware/m-p/7053514#M4347" target="_blank" rel="noopener"&gt;REST-API-getting-list-of-current-hardware&lt;/A&gt;&amp;nbsp;).&amp;nbsp; If I then run:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;jq -r '.members[] | { name: .name, state: .state, stateReason: .stateReason }' ${HARDW} | jq '. | select(.state!="ProfileApplied")'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can see everything that is not in the normal "ProfileApplied" state.&amp;nbsp; I'll work on that to check for state Unmanaged and stateReason of Unconfigured to craft a reply.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 09:59:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/send-refresh-command-with-updated-login-credentials/m-p/7167850#M7232</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-06-07T09:59:33Z</dc:date>
    </item>
  </channel>
</rss>

