<?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: Is this possible? in HPE OneView</title>
    <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7059384#M4495</link>
    <description>&lt;P&gt;Async task success is noted by an &lt;FONT face="courier new,courier"&gt;HTTP 202&lt;/FONT&gt; response code, and with a &lt;FONT face="courier new,courier"&gt;Location&lt;/FONT&gt; HTTP header.&amp;nbsp; Take a look at &lt;A href="https://superuser.com/questions/272265/getting-curl-to-output-http-status-code" target="_blank" rel="noopener"&gt;this StackExchange thread&lt;/A&gt; on getting the HTTP resonse code back from cURL.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Aug 2019 15:10:39 GMT</pubDate>
    <dc:creator>ChrisLynch</dc:creator>
    <dc:date>2019-08-21T15:10:39Z</dc:date>
    <item>
      <title>Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051115#M4315</link>
      <description>&lt;P&gt;I have a few hundred DL 380 and 560 servers.&amp;nbsp; I'm trying to see if I can use OpenView to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Change the admin password in each iLO?&lt;/LI&gt;&lt;LI&gt;Change the ldap setup in iLO?&lt;/LI&gt;&lt;LI&gt;Install new firmware (iLO, system, etc)?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I've been searching through the user guide and searching on the Internet, but have not found any answer yet.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 15:30:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051115#M4315</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-18T15:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051281#M4317</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you talk about One view&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. when you add server to One view it user SSO to open the ilo , in Ov 4.20 there is some option i dont know for 100%&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; you can config One view to use Ldap / ad&lt;/P&gt;&lt;P&gt;3 . yes you can update firmware of manged server if you&amp;nbsp; add the servers to One view for Manage&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 12:54:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051281#M4317</guid>
      <dc:creator>MeFromil</dc:creator>
      <dc:date>2019-06-19T12:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051299#M4319</link>
      <description>For any of the features you are asking a out require an HPE OneView Advanced license. We added LDAP and local Administrator account management in OneView 4.20. To update firmware on a server, including iLO, you would assign a server profile with a firmware bundle!/baseline associated.&lt;BR /&gt;&lt;BR /&gt;All of these are documented in the appliance online help.</description>
      <pubDate>Wed, 19 Jun 2019 14:51:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051299#M4319</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-06-19T14:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051330#M4321</link>
      <description>&lt;P&gt;I do have a oneview advanced license.&amp;nbsp; I have not set up server profiles.&amp;nbsp; So, I'll have to work on that.&amp;nbsp; I guess I should have been a little more clear.&amp;nbsp; All of those updates I mentioned were relative to each iLO and not to OpenView.&amp;nbsp; That is, I want to see if I can use OpenView to change the iLO administrator password in each iLO?&amp;nbsp; I want to see if I can set up each to connect to an LDAP directory server and set up the allowed groups and permissions without having to visit each iLO.&amp;nbsp; I know I can do the LDAP setup through hponcfg.&amp;nbsp; So, if I can't do it from OpenView, I can run the hponcfg commands from our salt master and hit all of the iLOs that way.&amp;nbsp; Thanks for the feedback!&amp;nbsp; I'll have to work on the server profiles next.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 16:18:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051330#M4321</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-19T16:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051332#M4322</link>
      <description>As I stated above what you are asking for is available in OneView 4.20, and only with a server profile, or associated server profile template.</description>
      <pubDate>Wed, 19 Jun 2019 16:27:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051332#M4322</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-06-19T16:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051919#M4323</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Yes, we are using vs 4.20.&amp;nbsp; I see in the API reference an example for setting the iLO admin password, iLO LDAP integration and directory group setup.&amp;nbsp; I'm working on that.&amp;nbsp; We have three hardware URIs.&amp;nbsp; None involve any enclosures.&amp;nbsp; In my post for creating the server profile templates, should I include:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"enclosureGroupUri": null&lt;/LI-CODE&gt;&lt;P&gt;or just leave enclosureGroupUri out entirely?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 12:33:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051919#M4323</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-24T12:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051949#M4324</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;enclosureGroupUri&lt;/FONT&gt; is only needed for BladeSystem or HPE Synergy.&amp;nbsp; You can include that property in your JSON POST and leave it &lt;FONT face="courier new,courier"&gt;null&lt;/FONT&gt; if you are designing for any other supported platform.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 16:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051949#M4324</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-06-24T16:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051953#M4325</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; Is there some place to get the whole api for server-profile-templates?&amp;nbsp; When making the connection to AD, I need to use my admin credentials to do that.&amp;nbsp; I don't see that in the example provided.&amp;nbsp; Is that what 'iloObjectDistinguisedName is?&amp;nbsp; I guess in the example they are using a service account?&amp;nbsp; Plus, I need a little bit better definition of the directoryUserContext.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 16:44:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051953#M4325</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-24T16:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051954#M4326</link>
      <description>&lt;P&gt;Both on appliance, and on the &lt;A href="https://hpe.com/info/oneview/docs" target="_blank" rel="noopener"&gt;HPE OneView Enterprise Information Library&lt;/A&gt;.&amp;nbsp; You want to search (Ctrl+F) for &lt;FONT face="courier new,courier"&gt;API Reference&lt;/FONT&gt;.&amp;nbsp; The current version is &lt;A href="http://h17007.www1.hpe.com/docs/enterprise/servers/oneview4.2/cic-api/en/index.html" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 16:47:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051954#M4326</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-06-24T16:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051960#M4327</link>
      <description>&lt;P&gt;That seems to be the exact same thing as one gets from the help page which doesn't seem to list all possible values, just gives you several very good examples. I'm going to try and see if I can find how the ansible interface does this.&amp;nbsp; Might be a little more clear.&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:12:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051960#M4327</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-24T17:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051968#M4328</link>
      <description>&lt;P&gt;The Ansible library has not been updated to support the newer 4.20 API calls.&amp;nbsp; It does support a 4.20 appliance, but using the older API version a 4.20 appliance supports.&lt;/P&gt;&lt;P&gt;As for&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;iloObjectDistinguishedName&lt;/FONT&gt;, it is the DN value of a service account that is needed for Common Access Cards (CAC) or smartcard authentication by the iLO.&amp;nbsp; If you are simply needing to configure LDAP/AD authentication, you would leave that propertyempty, along with the &lt;FONT face="courier new,courier"&gt;password&lt;/FONT&gt; property.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:35:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051968#M4328</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-06-24T17:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051973#M4329</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I'll keep working on it.&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2019 17:49:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7051973#M4329</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-06-24T17:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7053306#M4337</link>
      <description>&lt;P&gt;I'm working towards defining the server profile template definitions.&amp;nbsp; How specific do I need to get?&amp;nbsp; I have four different server hardware type URIs with systems in multiple locations.&amp;nbsp; The different locations have different domain controllers (local to the site).&amp;nbsp; So, I know I will need a hardware type/site.&amp;nbsp; Some of the systems have GPUs (not all).&amp;nbsp; Most have dual SSDs for the OS and either dual fusion i/o or nvme cards for data.&amp;nbsp; The RAID controllers are the same within a group of like hardware, but not all are exactly the same.&amp;nbsp; Most systems are running RHEL/CentOS 7, but several are running ESXi.&amp;nbsp; How detailed do I need to make the server profile templates?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 11:28:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7053306#M4337</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-02T11:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054195#M4355</link>
      <description>&lt;P&gt;I might be trying to get too specific?&amp;nbsp; The API reports 4 different server hardware type URIs.&amp;nbsp; I guess I really don't need to worry about which one has a 556 NIC vs a 557 NIC vs a 408i-a RAID card?&amp;nbsp; I think I just need to worry about a given hardware type within a given data center (each data center has different domain controllers).&amp;nbsp; I created a server hardware template through the gui just so that I could extract it via the API and get a better look at what it should look like.&amp;nbsp; I'm using that as my point of reference.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 15:25:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054195#M4355</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-08T15:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054205#M4356</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;serverHardwareTypeUri&lt;/FONT&gt; is required.&amp;nbsp; You need to be specific, as the hardware in that location will map to a specific Server Hardware Type.&amp;nbsp; If you have different servers in different locations that are the same base model, but have different adapters, that will create more than 1 Server Hardware Type.&amp;nbsp; You can take the Server Hardware Type's URI, and build a filter for server hardware:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GET /rest/server-hardware?filter=serverHardwareTypeUri={URI1}&amp;amp;filter=serverProfileUri=null&lt;/LI-CODE&gt;&lt;P&gt;This is how the Get-HPOVServer PowerShell Cmdlet works when a Server Hardware Type is provided, and caller wants all that are available without an assigned Server Profile resource.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 16:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054205#M4356</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-07-08T16:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054214#M4357</link>
      <description>&lt;P&gt;Thanks Chris.&amp;nbsp; I'll work on that.&amp;nbsp; Making some progress with python oneview, but still no where close.&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 16:56:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054214#M4357</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-08T16:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054595#M4359</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;When I try that search, I get back errors.&amp;nbsp; If I just try&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --request GET ${OneView}/rest/server-hardware?filter=serverHardwareTypeUri={/rest/server-hardware-types/1058352E-0FFB-4F8B-80A3-4A7C037D0195F} | \jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;I get back:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"message": "Listing resouces failed.\nFilters [serverHardwareTypeUri=/rest/server-hardware-types/1058352E-0FFB-4F8B-80A3-4A7C037D0195F, hidden=false] failed to parse.  Invalid character: /."&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Not sure what it is complaining about?&amp;nbsp; I tried without the '/rest/server-hardware-types/' and just leaving the id, but that gives back:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"message": "Listing resouces failed.\nFilters [serverHardwareTypeUri=1058352E-0FFB-4F8B-80A3-4A7C037D0195F, hidden=false] failed to parse.  No viable input after: 1058352E-0FFB-4F8B-80A3-4A7C037D0195F."&lt;/LI-CODE&gt;&lt;P&gt;So, I'm obviously not understanding the filter logic.&amp;nbsp; &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 15:25:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054595#M4359</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-10T15:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054598#M4360</link>
      <description>&lt;P&gt;The URI you are trying to use is slightly incorrect.&amp;nbsp; It should be:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --request GET ${OneView}/rest/server-hardware?filter=serverHardwareTypeUri=/rest/server-hardware-types/1058352E-0FFB-4F8B-80A3-4A7C037D0195F | \jq -r '.'&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;The only reason why I put {} around &lt;FONT face="courier new,courier"&gt;URI1&lt;/FONT&gt; in my example was it would be a token replacement, not the proper syntax.&amp;nbsp; Whenever you attempt to provide an associated resource URI value, like for the &lt;FONT face="courier new,courier"&gt;serverHardwareTypeUri&lt;/FONT&gt; property, you need to provide the relative URI, not the GUID.&amp;nbsp; GUIDs are globally unique and are not indexed themselves, so you cannot just search or provide the GUID of an object to find or reference it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2019 15:58:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054598#M4360</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-07-10T15:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054709#M4364</link>
      <description>&lt;P&gt;Got a little closer to creating a server profile template using the API, but getting: "parse error: Invalid numeric literal at line 1, column 9."&amp;nbsp; &amp;nbsp;This is how I got to that:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Follow instructions in: OneView-API_Get_Session_Credentials.txt
#
# You need a list of the current hardware.  In order to get that, run:
# Create a variable pointing to a file to hold the hardware output:
HARDW=hardw
# Get the list of current server hardware:
curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --output ${HARDW} \
     --request GET ${OneView}/rest/server-hardware?start=0&amp;amp;count=-1
#
# That only pulls down 32 devices.  Need to look for nextPageUri:
i=1
NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDW})
while [[ ${NEXT} != *"null"* ]]; do
   curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --output ${HARDW}${i} \
     --request GET ${OneView}${NEXT}
   NEXT=$(/bin/sed -e 's|^.*nextPageUri":"\(/rest/server-hardware.*\)","prevPageUri.*|\1|' ${HARDW}${i})
   if [[ ${#NEXT} -gt 50 ]]; then
      NEXT=$(/bin/sed -e 's|^.*nextPageUri":\(.*\)","prevPageUri.*|\1|' ${HARDW}${i})
   fi
   ((i++))
done
cat ${HARDW} ${HARDW}1 ${HARDW}2 ${HARDW}3 ${HARDW}4 ${HARDW}5 &amp;gt; hardw-all-raw
cat hardw-all-raw | jq -r '.' &amp;gt; hardw-all
#
# For the task of creating a server profile template, we need serverHardwareTypeUri's.
# To get a list of server hardware type uri's:
RAW_DATA=$(grep -E 'serverHardwareTypeUri|model' hardw-all | sed -e 's|^\s\(.*\)$|\1' | sed -e '{$!{ N;s|","model|}}' | sed -e 's|": "|":"|g' | tr ' ' '_' | sort -u)
i=0
declare -A HWR
for f in $(echo ${RAW_DATA}); do
   echo "f = ${f}"
   HWR[${i},0]=$(echo ${f} | cut -d ':' -f2 | cut -d ',' -f1 | sed -e 's|^"||' -e 's|"$||')
   HWR[${i},1]=$(echo ${f} | cut -d ':' -f3 | tr '_' ' ' | sed -e 's|",$||' -e 's|^"||')
   ((i++))
done
j=${i}
i=0
while [[ ${i} -lt ${j} ]]; do
   echo "HWR[${i},0] = ${HWR[${i},0]}"
   echo "HWR[${i},1] = ${HWR[${i},1]}"
   ((i++))
done
#
# Need the uri pointing to the SPP image uploaded to OneView.  So, download
# a listing of the firmware in OneView with:
curl --insecure \
     --header "auth: ${sessionID}" \
     --header "X-API-Version: ${currentVersion}" \
     --output firmware \
     --request GET ${OneView}/rest/firmware-drivers
#
# That puts the results in local file, firmware.  Then to find the SPP URI, use:
SPPURI=$(cat firmware | jq -r '.[] | .[] | (.uri)' 2&amp;gt;/dev/null)
#
# Need a list of domain controllers.  Pick the one associated with the data center location.
/usr/bin/dig SRV _ldap._tcp.my.org +noall +answer | awk '{ print $8 }' \
  | sed -e '/^$/d' | grep -v 'noall' | sort -t \- -k 2,2  -k 1,1
#
DIRSRV=&amp;lt;controller from above&amp;gt;
#
# Now, need the server certficate from the domain controller:
retrieve-cert() {
   REMHOST=${1:-my.domain}
   REMPORT=${2:-443}
   echo | \
   openssl s_client -connect ${REMHOST}:${REMPORT} 2&amp;gt;&amp;amp;1 | \
   /bin/sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
}
#
# Need the certficate on one line:
CHQ=$(retrieve-cert ${DIRSRV} 636 2&amp;gt;/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | awk 'NF {sub(/\r/, ""); printf "%s\\n",$0;}' | sed -e 's|\(.*

\)\\n$|\1|')
#
ADUSER='mysid'
ADPASS='mypass'
PASSW='ilo-pass'
DESCRIPT="DL380 in Location with 2SSDs, 2NVMEs, and a P408i-a controller."
#
i=1
# The following will put all of the data into a variable on one line:
DATA=$(echo '{
  "connectionSettings": {
    "complianceControl": "Unchecked",
    "manageConnections": false,
    "connections": []
  },
  "firmware": {
    "complianceControl": "Checked",
    "manageFirmware": true,
    "firmwareInstallType": "FirmwareAndOSDrivers",
    "forceInstallFirmware": false,
    "firmwareBaselineUri": "'${SPPURI}'",
    "firmwareActivationType": "Scheduled"
  },
  "osDeploymentSettings": null,
  "iscsiInitiatorNameType": "AutoGenerated",
  "serialNumberType": "Physical",
  "wwnType": "Physical",
  "macType": "Physical",
  "hideUnusedFlexNics": null,
  "type": "ServerProfileTemplateV6",
  "uri": "'${HWR[${i},0]}'",
  "name": "'${HWR[${i},1]}'",
  "description": "'${DESCRIPT}'",
  "sanStorage": {
    "complianceControl": "Unchecked",
    "manageSanStorage": false,
    "sanSystemCredentials": [],
    "volumeAttachments": []
  },
  "category": "server-profile-templates",
  "localStorage": {
    "complianceControl": "Unchecked",
    "sasLogicalJBODs": [],
    "controllers": []
  },
  "managementProcessor": {
    "complianceControl": "Checked",
    "manageMP": true,
    "mpSettings": [
      {
        "settingType": "AdministratorAccount",
        "args": {
          "deleteAdministatorAccount": false,
          "password": "'${PASSW}'"
        }
      },
      {
        "settingType": "DirectoryGroups",
        "args": {
          "directoryGroupAccounts": [
            {
              "groupDN": "admin_OneView",
              "groupSID": "S-1-5-21-1346723-2839128191-28188919111-431291",
              "UserConfigPriv": true,
              "remoteConsolePriv": true,
              "virtualMediaPriv": true,
              "virtualPowerAndResetPriv": true,
              "iLOConfigPriv": true
            },
            {
              "groupDN": "user_OneView",
              "groupSID": "S-1-5-22-1446723-2843128191-2818919111-431291",
              "UserConfigPriv": false,
              "remoteConsolePriv": true,
              "virtualMediaPriv": true,
              "virtualPowerAndResetPriv": true,
              "iLOConfigPriv": false
            }
          ]
        }
      }
    ]
  },
  "bios": {
    "complianceControl": "Checked",
    "manageBios": true,
    "overriddenSettings": [
      {
        "id": "UncoreFreqScaling",
        "value": "Maximum"
      },
      {
        "id": "MinProcIdlePower",
        "value": "NoCStates"
      },
      {
        "id": "PowerRegulator",
        "value": "StaticHighPerf"
      },
      {
        "id": "IntelUpiPowerManagement",
        "value": "Disabled"
      },
      {
        "id": "CustomPostMessage",
        "value": "Welcome to our Project!"
      },
      {
        "id": "EnergyEfficientTurbo",
        "value": "Disabled"
      },
      {
        "id": "EnergyPerfBias",
        "value": "MaxPerf"
      },
      {
        "id": "AdminName",
        "value": "Server Team"
      },
      {
        "id": "CollabPowerControl",
        "value": "Disabled"
      },
      {
        "id": "NumaGroupSizeOpt",
        "value": "Clustered"
      },
      {
        "id": "AsrTimeoutMinutes",
        "value": "Timeout30"
      },
      {
        "id": "ServerPrimaryOS",
        "value": "RHEL 7"
      },
      {
        "id": "EmbeddedSata",
        "value": "Raid"
      },
      {
        "id": "WakeOnLan",
        "value": "Disabled"
      },
      {
        "id": "AdminEmail",
        "value": "server_team@our.com"
      },
      {
        "id": "SubNumaClustering",
        "value": "Enabled"
      },
      {
        "id": "HttpSupport",
        "value": "Disabled"
      },
      {
        "id": "DynamicPowerCapping",
        "value": "Auto"
      },
      {
        "id": "MinProcIdlePkgState",
        "value": "NoState"
      },
      {
        "id": "WorkloadProfile",
        "value": "Virtualization-MaxPerformance"
      }
    ]
  },
  "boot": {
    "complianceControl": "Unchecked",
    "manageBoot": false,
    "order": []
  },
  "bootMode": {
    "complianceControl": "Checked",
    "manageMode": true,
    "mode": "UEFI",
    "pxeBootPolicy": "IPv4",
    "secureBoot": "Disabled"
  },
  "affinity": null,
  "enclosureGroupUri": null,
  "serverHardwareTypeUri": "'${HWR[${i},0]}'"
}' | jq -c '.')
#
# Create a server profile template:
TaskURI=$(curl --insecure \
     --header "content-type: application/json" \
     --header "X-API-Version: ${currentVersion}" \
     --header "auth: ${sessionID}" \
     --data "${DATA}" \
     --request POST ${OneView}/rest/server-profile-templates | jq -r '.')&lt;/LI-CODE&gt;&lt;P&gt;I saw the error when I add '--include" to the curl command.&amp;nbsp; I assume the error is referencing the data section?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 13:11:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054709#M4364</guid>
      <dc:creator>BradV</dc:creator>
      <dc:date>2019-07-11T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is this possible?</title>
      <link>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054775#M4366</link>
      <description>&lt;P&gt;I would generate the desired JSON test string before submitting to the API, then use a JSON parser utility, like this &lt;A href="https://codebeautify.org/jsonviewer" target="_blank" rel="noopener"&gt;online JSON viewer&lt;/A&gt;, to see if the format is compliant.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 17:39:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-oneview/is-this-possible/m-p/7054775#M4366</guid>
      <dc:creator>ChrisLynch</dc:creator>
      <dc:date>2019-07-11T17:39:00Z</dc:date>
    </item>
  </channel>
</rss>

