SHARPv2 must be running (enable_SHARP = true) and the NVIDIA Scalable Hierarchical Aggregation and Reduction Protocol (SHARP)™ allocation parameter must be enabled (enable_SHARP_alloction = true) for this API to trigger resource (GUID) allocations and deallocations within SHARP.
- Description – configures NVIDIA SHARP allocations (reservations)
- Request URL – GET /ufmRest/app/SHARP/allocate_resources
- Main Operations
- Set GUIDs for PKey in UFM actions API
- Set GUIDs for PKey in PKey GUID API
- Get all SHARP reservations
- Get a specific SHARP reservation
- Create a new SHARP Reservation
- Delete SHARP reservation
- Update SHARP reservation
Set GUIDs for PKey in UFM Actions API
- Description – sets GUIDs for PKEY using UFM Actions API
- Request URL – POST /ufmRest/actions/set_guids_for_pkey
- Request Content Type – Application/json
Response
"pkey": "0x1", "index0": false, "ip_over_ib": true, "guids": [ "f452140300383a02" ]
Note: An empty GUID list deallocates GUIDs for the specified PKey.
Status Codes
200 – OK
400 – BAD_REQUEST
403 – FORBIDDEN
404 – NOT_FOUND
Set GUIDs for PKey in PKey GUID API
- Description – sets GUIDs for PKEY using PKey GUID API
- Request URL – PUT /ufmRest/resources/pkeys/set_guids_for_pkey
- Request Content Type – Application/json
Response
{ "pkey": "0x11", "index0": false, "ip_over_ib": true, "membership": "full", "guids": [ "248a0703008a850a" ] }
Status Codes
200 – OK
400 – BAD_REQUEST
403 – FORBIDDEN
404 – NOT_FOUND
Get All Reservations
- Description – retrieves all SHARP reservations
- Request URL – GET /ufmRest/ app/SHARP/allocate_reseources
- Request Content Type – Application/json
Response
{ "anas1":{ "pkey":"0x12", "guids":["0x248a0703008a850a", "0x248a0703008a850b"] }, "anas2":{ "pkey":"0x12", "guids": ["0xf452140300383a01", "0xf452140300383a02"] } }
Status Codes
200 – OK
400 – BAD_REQUEST
Get Specific SHARP Reservation
- Description – Get specific SHARP reservation by app_id
- Request URL – GET /ufmRest/app/SHARP/allocate_resources/<app_id>
- Request Content Type – Application/json
- Status Codes
- 200 – OK
- 400 – BAD_REQUEST
- 404 – NOT_FOUND
{ "anas1":{ "pkey": "0x12", "guids": ["0x248a0703008a850a", "0x248a0703008a850b"] } }
Create a New SHARP Reservation
Deprecated API
- Description – Create a new SHARP reservation
- Request URL – POST/ufmRest/app/SHARP/allocate_resources
- Request Content-Type – Application/json
- Status Codes
- 202 – ACCEPTED (if all nodes were added successfully to created allocation)
- 206 – PARTIAL (if not all nodes were added to created allocation because they are not found in the fabric.)
- 400 – BAD_REQUEST
- Request Data
Name | Value | Default | Description | Mandatory/Optional |
---|---|---|---|---|
App_id | String | None | Application ID. It is also the identifier of this nodes allocation | Mandatory |
App_resources_limit | Integer | -1 | Application resources limitation | Optional |
nodes | String | None | A string of hosts names separated by a comma, to be added to the pkey & SHARP allocation. Example: "r-ufm77,r-ufm51" | Mandatory |
pkey | Hexadecimal string between "0x0001"-"0x7ffe" exclusive | "0x7fff" (This is the default management pkey) | Network PKey to be created and used by SHARP | Optional |
Example:
{ "app_id":"anas", "nodes":"r-ufm51,r-ufm77", "pkey":"0x12", "app_resources_limit":4 }
New API - TBD- section naming with Eylon
- Description – Create a new SHARP reservation
- Request URL – POST/app/sharp/resources
- Request Content-Type – Application/json
- Status Codes
- 202 – ACCEPTED (if all nodes were added successfully to created allocation)
- 206 – PARTIAL (if not all nodes were added to created allocation because they are not found in the fabric.)
- 400 – BAD_REQUEST
Request Data
Name
Value
Default
Description
Mandatory/Optional
App_id
String
None
"0x7fff" (This is the default management pkey) Application id.
It is also the identifier of this nodes allocation
Mandatory
App_resources_limit
Integer
-1
Application resources limitation
Optional
Hosts_names
String
None
A string of hosts names separated by a comma, to be added to the pkey & sharp allocation.
Example:
"r-ufm77,r-ufm51"
Optional
Port_guids
list
None
List of ports guids Example:
["f452140300383a01", "f452140300383a02"]
Optional
pkey
Hexadecimal string between "0x0001"-"0x7ffe" exclusive
"0x7fff" (This is the default management pkey)
Network PKey to be created and used by Sharp
Optional
Examples:
Create SHARP allocation by sending hosts_names:
{ "app_id":"99", "hosts_names":"r-ufm51,r-ufm55", "pkey":"0x12", "app_resources_limit": -1 }
Create SHARP allocation by sending port_guids:
{ "app_id":"99", "port_guids": ["f452140300383a01", "f452140300383a02"], "pkey":"0x12", "app_resources_limit": -1 }
Delete SHARP Reservation
Deperacted:
- Description – Delete SHARP reservation
- Request URL – DELETE /app/SHARP/allocate_resources/<app_id>
- Request Content-Type – Application/json
- Status Codes
- 200 – OK
- 400 – BAD_REQUEST
New API:
- Description - Delete SHArP Allocation
- Request URL - DELETE /app/sharp/resources/<app_id>
- Request Content-Type – Application/json
- Status Codes
- 200 – OK
- 400 – BAD_REQUEST
Update SHARP Reservation
Deprecated:
- Description – Update SHARP reservation
- Request URL – PUT /app/sharp/allocate_resources/<app_id>
- Request Content-Type – Application/json
- Status Codes
- 202 – ACCEPTED
- 206 - PARTIAL
- 400 – BAD_REQUEST
Request Data
{ "nodes":"r-ufm51,r-ufm77"}
New API:
- Description - Update SHArP Allocation
- Request URL: PUT /app/sharp/resources/<app_id>
- Request Content-Type – Application/json
- Status Codes
- 202 – ACCEPTED
- 206 - PARTIAL
- 400 – BAD_REQUEST
- Body Examples:
Update SHARP allocation by sending hosts_names:
{ "hosts_names":"r-ufm51,r-ufm77" }
Update SHARP allocation by sending port_guids:
{ "hosts_names":["f452140300383a01", "f452140300383a02"] }