CPU Allocation Summary API
This API provides the total number of CPUs available for use, and the total number of CPUs that are already used by VMs.
Action |
Method |
Payload Required |
API |
To get information on the number of CPUs allocated to VMs, and the CPUs that are already used by VMs. |
GET |
No |
api/operational/resources/cpu-info/allocation |
Example: GET CPU Allocation Summary API
curl -k -v -u "admin:admin" -X GET "https://209.165.201.1/api/operational/resources/cpu-info/allocation?deep"
* About to connect() to 209.165.201.1 port 443 (#0)
* Trying 209.165.201.1...
* Connected to 209.165.201.1 (209.165.201.1) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
* Server certificate:
* subject: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* start date: Aug 26 07:41:22 2016 GMT
* expire date: Aug 24 07:41:22 2026 GMT
* common name: Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* issuer: CN=Cisco-Enterprise-NFVIS-Self-Signed-Certificate
* Server auth using Basic with user 'admin'
> GET /api/operational/resources/cpu-info/allocation?deep HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.29.0
> Host: 209.165.201.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: nginx/1.6.3
< Date: Sat, 27 Aug 2016 06:35:48 GMT
< Content-Type: application/vnd.yang.data+xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: private, no-cache, must-revalidate, proxy-revalidate
< Pragma: no-cache
<
<allocation xmlns="http://www.cisco.com/nfvis/resources" xmlns:y="http://tail-f.com/ns/rest" xmlns:resource-info="http://www.cisco.com/nfvis/resources">
<total-sockets>1</total-sockets>
<cores-per-socket>8</cores-per-socket>
<total-logical-cpus>16</total-logical-cpus>
<logical-cpus-used-by-system>2</logical-cpus-used-by-system>
<logical-cpus-used-by-vnfs>14</logical-cpus-used-by-vnfs>
<logical-cpus-used-dedicated>12</logical-cpus-used-dedicated>
<logical-cpus-used-sharable>2</logical-cpus-used-sharable>
</allocation>
* Connection #0 to host 209.165.201.1 left intact