<?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: checking firmware compliance with REST API in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178018#M7672</link>
    <description>&lt;P&gt;Thank you for this solution.&lt;/P&gt;&lt;P&gt;Where do we get the applicable and&amp;nbsp;&lt;SPAN&gt;current SPP bundle listing?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;BR /&gt;Theo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: Is there an alternative solution, solely based on a REST API call and filtering its output?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Nov 2022 17:05:18 GMT</pubDate>
    <dc:creator>tkonto</dc:creator>
    <dc:date>2022-11-21T17:05:18Z</dc:date>
    <item>
      <title>checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7105609#M5728</link>
      <description>&lt;P&gt;The REST API for checking firmware compliance says to supply:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   "firmwareBaselineId": "SPP2017101_2017_1027_10",
   "serverUUID": "36343537-3338-4E43-3735-31373034308"
}&lt;/LI-CODE&gt;&lt;P&gt;I'm just not sure what it means by firmwareBaseLineId?&amp;nbsp; I know I can retrieve the current SPP bundles loaded to OneView with:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --output firmware \
     --request GET ${OneView}/rest/firmware-drivers&lt;/LI-CODE&gt;&lt;P&gt;and if I look at the output of that, I do not see firmwareBaselineId anywhere.&amp;nbsp; Is this possibly just the leaf part of the URI?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 15:16:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7105609#M5728</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2020-10-20T15:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7105616#M5730</link>
      <description>&lt;P&gt;OK, ran some tests and confirmed it is the basename of the bundle uri.&amp;nbsp; This is my process:&lt;/P&gt;&lt;P&gt;Get session credentials.&amp;nbsp; Store those in some variables.&lt;/P&gt;&lt;P&gt;Download the current SPP bundle listing.&lt;/P&gt;&lt;P&gt;Download a list of hardware from OneView.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Get the  SPP basename:
SPP=\"$(/usr/bin/basename $(jq '.members[] | .uri' firmware-bundles))
SERVER=my-server-ilo
UUID=$(jq -r .members[] | select(.name == "'${SERVER}'") | "\(.uuid)"' ${HARDW})
DATA='{"firmwareBaselineId":'${SPP}',"serverUUID":"'${UUID}'"}'
# Make sure there aren't any errors in the data:
echo ${DATA} | jq -r '.'
curl --insecure \
      --header "content-type: aplication/json" \
      --header "auth: ${sessionID}" \
      --header "X-API-Version: ${currentVersion}" \
      --data "${DATA}" \
      --request POST ${OneView}/rest/server-hardware/firmware-compliance | jq -r '.'&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Oct 2020 16:32:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7105616#M5730</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2020-10-20T16:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178018#M7672</link>
      <description>&lt;P&gt;Thank you for this solution.&lt;/P&gt;&lt;P&gt;Where do we get the applicable and&amp;nbsp;&lt;SPAN&gt;current SPP bundle listing?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;BR /&gt;Theo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PS: Is there an alternative solution, solely based on a REST API call and filtering its output?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 17:05:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178018#M7672</guid>
      <dc:creator>tkonto</dc:creator>
      <dc:date>2022-11-21T17:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178021#M7675</link>
      <description>&lt;P&gt;Looks like there might be a typo or two in the above.&amp;nbsp; Here is current code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Display a listing of all SPP bundles in OneView:
curl --insecure --silent \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --request GET ${OneView}/rest/firmware-drivers | jq -r '.members[] | { "uuid":.uuid,"baselineShortName":.baselineShortName,"releaseDate":.releaseDate,"uri":.uri }'
#
# Pick the baselineShortName that corresponds to the SPP bundle you wish to use and set it to a variable:
SRTNM="SPP 2022.03.0"
#
# Get the URI of that SPP bundle:
SPPURI=$(basename $(curl --insecure --silent --header "auth: ${sessionID}" --header "X-API-Version: ${currentVersion}" --request GET ${OneView}/rest/firmware-drivers | jq -r '.members[] | select(.baselineShortName=="'"${SRTNM}"'") |.uri'))
#
# Get Server UUID
SERVER=my-server.com
ACTV=$(python -c "import urllib, sys; print urllib.quote(sys.argv[1])" "\"'serverName' = '${SERVER}'\"")
UUID=$(curl --insecure --silent --header "auth: ${sessionID}" --header "X-API-Version: ${currentVersion}" --request GET ${OneView}/rest/server-hardware?filter=${ACTV} | jq -r '.members[] |.uuid')
#
DATA='{"firmwareBaseLineId":"'${SPPURI}'","serverUUID":"'${UUID}'"}'
# Make sure there are no errors in the DATA variable:
echo ${DATA} | jq -r '.'
#
# Get the firmware compliance for this server:
curl --insecure --silent \
   --header "auth: ${sessionID}" \
   --header "X-API-Version: ${currentVersion}" \
   --header "content-type: application/json" \
   --data ${DATA} \
   --request GET ${OneView}/rest/server-hardware/firmware-compliance | jq -r --arg SRV ${SERVER} '. | { "Server":$SRV,"serverFirmwareUpdateRequired":.serverFirmwareUpdateRequired,"componentMappingList":.componentMappingList[] | {"componentLocation":.componentLocation,"componentName":.componentName,"componentType":.componentType,"installedVersion":.installedVersion,"baselineVersion":.baselineVersion,"componentFirmwareUpdateRequired":.componentFirmwareUpdateRequired }}'&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 17:31:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178021#M7675</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-11-21T17:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178260#M7686</link>
      <description>&lt;P&gt;Your code gave me a great starting point to work with, toward an ansible playbook which will be published here later.&lt;/P&gt;&lt;P&gt;However, I do have questions, and forgive my lack of experience with OneView.&lt;BR /&gt;&lt;BR /&gt;Trying to test the playbook, I had the server profile changed in Oneview and I was expecting to see this changing either "&lt;SPAN&gt;componentFirmwareUpdateRequired" or "serverFirmwareUpdateRequired" to true. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This was not the case. All returned variables remained false.&lt;BR /&gt;&lt;BR /&gt;What actions in OneView would make either variable return true, following a REST API call?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Theo&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 17:40:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178260#M7686</guid>
      <dc:creator>tkonto</dc:creator>
      <dc:date>2022-11-24T17:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178311#M7687</link>
      <description>&lt;P&gt;Following up with more details.&lt;/P&gt;&lt;P&gt;First, we created an incompatibility from Oneview WebUI between firmware and profile.&lt;BR /&gt;Profile was left to 2021.05.01 and server was set to 2021.05.02.&lt;/P&gt;&lt;P&gt;Oneview WebUI reported the incompatibility.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But unless there are no differences between the two SPPs, for the specific hardware, the following is what OneView reported back:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
"componentMappingList":[
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Agentless Management Service for Gen9",
"componentType":"Software",
"installedVersion":"670.11.7.0.10-1.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Native ixgben network driver for VMware ESXi",
"componentType":"Software",
"installedVersion":"1.8.7-1OEM.670.0.0.8169922",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Channel Interface Kernel Module for vSphere ESXi 6.7",
"componentType":"Software",
"installedVersion":"670.10.7.0.4-1OEM.670.0.0.75355",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Lights-Out Configuration Utility for ESXi",
"componentType":"Software",
"installedVersion":"6.7.0.5.5-0.18.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"000000000000000000000000000000f4",
"componentLocation":"System Board",
"componentName":"System Programmable Logic Device",
"componentType":"Firmware",
"installedVersion":"Version 0x17",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"HPSA LSU Management Plugin",
"componentType":"Software",
"installedVersion":"2.0.0-16vmw.670.1.28.10302608",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Command line tool for interacting with the iLO RESTful Interfac",
"componentType":"Software",
"installedVersion":"650.3.1.0.35-4240417",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":null,
"componentLocation":"System Board",
"componentName":"Power Management Controller FW Bootloader",
"componentType":"Firmware",
"installedVersion":"1.0",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Event Utility for ESXi",
"componentType":"Software",
"installedVersion":"6.7.0.02-01.00.12.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Integrated Smart Update Tools ESXCLI Plug-In",
"componentType":"Software",
"installedVersion":"6.7.0.2.8.0.0-9",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":null,
"componentLocation":"System Board",
"componentName":"Intelligent Platform Abstraction Data",
"componentType":"Firmware",
"installedVersion":"25.00",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"47a4b1a62a384f5a808610f8103c17d2",
"componentLocation":"Slot 2",
"componentName":"HP Ethernet 10Gb 2-port 560M Adapter",
"componentType":"Firmware",
"installedVersion":"1.2836.0",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"CRU Kernel Module for vSphere ESXi 6.7",
"componentType":"Software",
"installedVersion":"670.6.7.10.14-1OEM.670.0.0.7535",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Fiber Channel Enablement Package for ESXi 6.7.0",
"componentType":"Software",
"installedVersion":"670.3.70.5-7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"47a4b1a62a384f5a808610f8103c17d2",
"componentLocation":"Slot 1",
"componentName":"HP Ethernet 10Gb 2-port 560M Adapter",
"componentType":"Firmware",
"installedVersion":"1.2836.0",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Boot Configuration Utility for ESXi",
"componentType":"Software",
"installedVersion":"6.7.0.02-06.00.14.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"00000000000000000000000001493336",
"componentLocation":"System Board",
"componentName":"System ROM",
"componentType":"Firmware",
"installedVersion":"I36 v2.80 (10/16/2020)",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"47a4b1a62a384f5a10df0720103c1935",
"componentLocation":"Embedded FlexibleLOM 1",
"componentName":"HP FlexFabric 20Gb 2-port 650FLB Adapter",
"componentType":"Firmware",
"installedVersion":"12.0.1336.0",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"00000000000000000000000001493336",
"componentLocation":"System Board",
"componentName":"Redundant System ROM",
"componentType":"Firmware",
"installedVersion":"I36 v2.80 (10/16/2020)",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Emulex OneConnect Network Driver",
"componentType":"Software",
"installedVersion":"12.0.1216.4-1OEM.670.0.0.816992",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Custom Image Build Information for ESXi 6.7.0",
"componentType":"Software",
"installedVersion":"670.U3.10.7.0.4-7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Integrated Smart Update Tools for ESXi",
"componentType":"Software",
"installedVersion":"6.7.0.2.8.0.0-19",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"WBEM Providers for ESXi 6.7",
"componentType":"Software",
"installedVersion":"670.03.16.00.3-7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Emulex FCoE Driver",
"componentType":"Software",
"installedVersion":"12.0.1278.0-1OEM.670.0.0.816992",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Emulex OneConnect IMA-Plugin",
"componentType":"Software",
"installedVersion":"12.0.1188.0-03",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"2932ecaecc69d843bd0e61dc3406f71b",
"componentLocation":"System Board",
"componentName":"iLO",
"componentType":"Firmware",
"installedVersion":"2.77 Dec 07 2020",
"baselineVersion":"2.74",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":true
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Configuration Utility CONREP for ESXi",
"componentType":"Software",
"installedVersion":"670.10.7.0.1-6.7.0.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":null,
"componentLocation":"System Board",
"componentName":"Server Platform Services (SPS) Firmware",
"componentType":"Firmware",
"installedVersion":"3.1.3.21.4",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Agentless Management Service for Gen10",
"componentType":"Software",
"installedVersion":"670.11.7.1.2-1.7535516",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":" ",
"componentLocation":" ",
"componentName":"Smart Storage Administrator CLI for ESXi",
"componentType":"Software",
"installedVersion":"5.10.45.1-6.7.0.7535516.oem",
"baselineVersion":"unknown",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":false
},
{
"componentKey":"00000000000000000000000000504d14",
"componentLocation":"System Board",
"componentName":"Power Management Controller Firmware",
"componentType":"Firmware",
"installedVersion":"1.0.9",
"baselineVersion":"1.0.9",
"componentFirmwareUpdateRequired":false,
"hpsumManaged":true
}
],
"serverFirmwareUpdateRequired":false
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 26 Nov 2022 09:51:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178311#M7687</guid>
      <dc:creator>tkonto</dc:creator>
      <dc:date>2022-11-26T09:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178357#M7692</link>
      <description>&lt;P&gt;I'm pretty sure the message that a firmware update is required is only triggered when the SPP bundle associated with a server profile template is changed?&amp;nbsp; I'm not sure.&amp;nbsp; I downgraded the iLO firmware on one unit and OneView never reported a firmware update was required.&amp;nbsp; In its database, it had already been updated.&amp;nbsp; I guess the programmers did not think we admins would be so stupid as to downgrade a firmware?&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&amp;nbsp; In any case, have only seen a firmware update is required after changing the SPP bundle in the server profile template.&amp;nbsp; We would need the OneView experts at HPE to verify for us.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 10:36:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178357#M7692</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-11-28T10:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178529#M7701</link>
      <description>&lt;P&gt;Was there an alert on the profile for the downgraded component (saying doesn't match baseline)?&amp;nbsp; That eventually would be expected.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 15:30:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178529#M7701</guid>
      <dc:creator>TKop</dc:creator>
      <dc:date>2022-11-30T15:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178530#M7702</link>
      <description>&lt;P&gt;No.&amp;nbsp; I opened a support case and was told it would not update that discrepancy.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 15:34:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178530#M7702</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-11-30T15:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178776#M7714</link>
      <description>&lt;P&gt;Any screenshots still available that could be shared?&amp;nbsp; Just to be clear, you are referring to the compliance reporting and if you downgrade a component outside of OV, the compliance reporting view was not showing an update is needed for the baseline after the downgrade to the version below it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;On a related note, OV is expected to alert on the server profile if you have a baseline applied there, and a component is downgrade outside of OV -&amp;gt; OV should alert to say the installed version does not match the applied baseline.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Dec 2022 16:42:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178776#M7714</guid>
      <dc:creator>TKop</dc:creator>
      <dc:date>2022-12-05T16:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178847#M7719</link>
      <description>&lt;P&gt;I do not have any screenshots.&amp;nbsp; I spefically reduced the iLO firmware version.&amp;nbsp; OneView never picked up on that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Dec 2022 15:23:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7178847#M7719</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2022-12-06T15:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: checking firmware compliance with REST API</title>
      <link>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7179164#M7738</link>
      <description>&lt;P&gt;The following part of a more extensive playbook has been tested to check the compliance of the server, using sollely OneView info.&lt;BR /&gt;&lt;BR /&gt;It is complete in relation to SPP actions but will require some adaptation as it includes variables whose values get evaluated from other parts (like wf_spp)&lt;BR /&gt;&lt;BR /&gt;It was inspired by the original posting of BradV and his next posting with extensive corrections, made all the difference.&lt;BR /&gt;&lt;BR /&gt;Hope it will be of help to someone, as the original curl code was of great help to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;---
- hosts: all
  gather_facts: no
  collections:
   - ansible.builtin
  vars:
    oneview_base_url: "{{oneview_base_url}}"
    oneview_user: "{{oneview_user_name}}"
    oneview_pass: "{{oneview_password}}"
  connection: local

  tasks:

    - name: Get Session Key
      delegate_to: localhost
      uri:
        url: "{{ oneview_base_url }}/login-sessions"
        method: POST
        validate_certs: False
        force_basic_auth: yes
        body_format: json
        body:
          userName: "{{ oneview_user }}"
          password: "{{ oneview_pass }}"
        headers:
          Content-type: "application/json"
      register: output
      tags: always

    - name: OneView Key
      set_fact:
        oneview_key: "{{ output.json.sessionID }}"
      tags: always

    - name: Get all server hardware details
      delegate_to: localhost
      uri:
        url: "{{ oneview_base_url }}/server-hardware"
        method: GET
        validate_certs: False
        body_format: json
        headers:
          X-Api-Version: 1200
          Auth: "{{ oneview_key }}"
      register: output
      tags: provision

    - name: Set fact for UUID of server
      set_fact:
        fact_server_uuid: "{{ (output.json.members | flatten | selectattr('name', 'equalto', wf_blade_id) | first).uuid }}"
      tags: provision

    - name: Get all server firmware details
      delegate_to: localhost
      uri:
        url: "{{ oneview_base_url }}/firmware-drivers"
        method: GET
        validate_certs: False
        body_format: json
        headers:
          X-Api-Version: 1200
          Auth: "{{ oneview_key }}"
      register: output
      tags: [provision, survey_update]

    - name: Set fact for SPP UUID
      set_fact:
        fact_spp_uuid: "{{ (output.json.members | flatten |  selectattr('baselineShortName', 'equalto', wf_spp)) | map(attribute='uuid') | first }}"
      tags: provision

    - name: Stat the list of all SPP versions loaded into OneView
      delegate_to: localhost
      set_stats:
        data:
          wf_spp_versions: "{{ output.json.members | map(attribute='baselineShortName') | list }}" #| join('\n') }}"
      tags: survey_update


    - name: Get server compliance
      delegate_to: localhost
      uri:
        url: "{{ oneview_base_url }}/server-hardware/firmware-compliance"
        method: POST
        validate_certs: False
        body_format: json
        body:
          firmwareBaselineId: "{{ fact_spp_uuid }}"
          serverUUID: "{{ fact_server_uuid }}"
        headers:
          X-Api-Version: 1200
          Auth: "{{ oneview_key }}"
      register: output
      tags: provision

    - name: Print update state
      delegate_to: localhost
      debug:
        msg: "{{ output.json.serverFirmwareUpdateRequired }}"
      tags: provision

    - name: Check if server requires update
      set_fact:
        update_required: "{{ output.json.serverFirmwareUpdateRequired }}"
      tags: provision

    - name: Fail if server requires update
      delegate_to: localhost
      fail:
        msg: "Server requires update"
      when: update_required == "true"
#      when: output.json.serverFirmwareUpdateRequired  == "true"
      tags: provision&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Dec 2022 18:05:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/checking-firmware-compliance-with-rest-api/m-p/7179164#M7738</guid>
      <dc:creator>tkonto</dc:creator>
      <dc:date>2022-12-11T18:05:11Z</dc:date>
    </item>
  </channel>
</rss>

