- Community Home
- >
- Software
- >
- HPE OneView
- >
- Licenses
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 03:38 AM - last edited on 11-01-2023 08:58 PM by support_s
11-01-2023 03:38 AM - last edited on 11-01-2023 08:58 PM by support_s
First, I think the words around the REST API documentation for GET /rest/licenses should make it clear that only a maximum of 50 licenses can be pulled down with each call. That is not at all clear. I finally got it working with:
# Make a directory to place the temporary files:
cd /data # where ever you have space
mkdir ov-licenses
cd ov-licenses
LICFIL=licenses
curl --insecure --silent \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--output ${LICFIL} \
--request GET ${OneView}/rest/licenses?start=0&count=-1
#
# That only pulls down 50 licenses. Pull down the rest with:
i=1
NEXT=$(jq -r '.nextPageUri' ${LICFIL})
while [[ ${NEXT} != *"null"* ]]; do
curl --insecure --silent \
--header "X-API-Version: ${currentVersion}" \
--header "auth: ${sessionID}" \
--output ${LICFIL}${i} \
--request GET ${OneView}${NEXT}
NEXT=$(jq -r '.nextPageUri' ${LICFIL}${i})
((i++))
done
# Concantenate into a single file.
j=0
while [[ ${j} -t ${i} ]]; do
echo ${j}
if [[ ${j} -eq 0 ]]; then
CMD="cat ${LICFIL}"
else
CMD="${CMD} ${LICFIL}${j}"
fi
((j++))
done
$(echo ${CMD}) > ${LICFIL}-all-comp
#
# Process into a readable json format:
jq -r '.' ${LICFIL}-all-comp > ${LICFIL}-all
#
# Clean up
/bin/rm ${LICFIL} $[0-9]* ${LICFIL}-all
#
LICENSES=${LICFIL}-allOur problem is the OneView is out of licenses. With the exported license file, I was able to find there are four licenses consumed by non-existent hardware:
jq -r '.members[] | select(.nodes[].nodeManaged == false)' ${LICENSES}I tried to delete the identified nodeUri, but that did not work because that hardware no longer exists. I tried to delete the license, but it said the license was in use.
How do I remove the association of these licenses to non-existent hardware?
I believe these all came about by system board replacements.
Solved! Go to Solution.
- Tags:
- Systemboard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 08:32 AM
11-01-2023 08:32 AM
SolutionOnce a license is assigned and used by a server, it can not be unassigned. It remains assigned even when the server is removed from the appliance. OV ties licenses for servers to the UUID, which is composed from the serial number and product number. During system board replacement, there are steps to reprogram the board to give it the same serial number and product number used before, so that the server identifies like it did with the original board. Just noting and not sure what happened with your case. You would need to try a support case to get help to reclaim licenses.
RE: the count limits, there is documentation on the behavior in the common parameters section of the API reference. Each API to date doesn't mention, as you noted.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 08:39 AM
11-01-2023 08:39 AM
Re: Licenses
Thanks. I do have a current ticket opened. Hopefully we can work out how to retrieve those licenses.