Setupdata
REST wrapper for
setupdata. Provides methods for listing, creating, modifying and deleting
setupdata.
Retrieving the setupdata
Resource URI
Verb
|
URI
|
GET
|
/v1/setupdata
|
Example
JSON Request
GET /v1/setupdata
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{"setupdatas": [{
"status": "Active",
"name":"GG34",
"uuid": "123"
"meta":{
"user":"root"
},
"jsondata":{
.......
}
}]}
Creating the setupdata
Resource URI
Verb
|
URI
|
POST
|
/v1/setupdata
|
Example
JSON Request
POST /v1/setupdata
Accept: application/json
{
"name":"GG34",
"uuid": "123"
"meta":{
"user":"root"
},
"jsondata":{
.......
}
}
JSON Response
201 OK
Content-Type: application/json
{
"status": "Active",
"name":"GG34",
"uuid": "123"
"meta":{
"user":"root"
},
"jsondata":{
.......
}
}
400 Bad Request
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Error"
}
409 CONFLICT
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Error"
}
Retrieving a single
setupdata
Resource URI
Verb
|
URI
|
GET
|
/v1/setupdata/(id)
|
Property:
id - the id of the
setupdata to be queried.
Example
JSON Request
GET /v1/setupdata/123
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"status": "Active",
"name":"GG34",
"uuid": "123"
"meta":{
"user":"root"
},
"jsondata":{
.......
}
}
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Setupdata could not be found."
}
Updating a setupdata
Resource URI
Verb
|
URI
|
PUT
|
/v1/setupdata/(id)
|
Property:
id - the id of the
setupdata to be updated.
Example
JSON Request
PUT /v1/setupdata/123
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"status": "Active",
"name":"GG34",
"uuid": "123"
"meta":{
"user":"root"
},
"jsondata":{
.......
}
}
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Setupdata could not be found."
}
Deleting a setupdata
Resource URI
Verb
|
URI
|
DELETE
|
/v1/setupdata/(id)
|
Property:
id - the id of the
setupdata to be deleted.
Example
JSON Request
DELETE /v1/setupdata/123
Accept: application/json
JSON Response
204 NO CONTENT
Returned on success
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Setupdata could not be found."
}
400 BAD REQUEST
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Setupdata cannot be deleted when it is being used by an installation"
}
Install resource
REST wrapper for
install. Provides methods for starting, stopping, and viewing the status of the
installation process.
Return a list of
installation
Resource URI
Example
JSON Request
GET /v1/install
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{"installs": [{
"ceph": "Skipped",
"uuid": "123",
"setupdata": "345",
"vmtpresult": "{
"status": "PASS",
"EXT_NET": []
}",
"baremetal": "Success",
"orchestration": "Success",
"validationstatus": "{
"status": "PASS",
"Software_Validation": [],
"Hardware_Validation": []
}",
"currentstatus": "Completed",
"validation": "Success",
"hostsetup": "Success",
"vmtp": "Skipped"
}]
}
Create an installation
Resource URI
Verb
|
URI
|
POST
|
/v1/install
|
Example
JSON Request
GET /v1/install
Accept: application/js
{
"setupdata": "123",
"stages": [
"validation",
"bootstrap",
"runtimevalidation",
"baremetal",
"orchestration",
"hostsetup",
"ceph",
"vmtp"
]
}
JSON Response
201 CREATED
Content-Type: application/json
{
"ceph": "Skipped",
"uuid": "123",
"setupdata": "345",
"vmtpresult": "{
"status": "PASS",
"EXT_NET": []
}",
"baremetal": "Success",
"orchestration": "Success",
"validationstatus": "{
"status": "PASS",
"Software_Validation": [],
"Hardware_Validation": []
}",
"currentstatus": "Completed",
"validation": "Success",
"hostsetup": "Success",
"vmtp": "Skipped"
}
409 CONFLICT
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Install already exists"
}
Retrieve the
installation
Resource URI
Verb
|
URI
|
GET
|
/v1/install/{id}
|
Property:
id - the id of the
install to be queried.
Example
JSON Request
GET /v1/install/345
Accept: application/js
JSON Response
200 OK
Content-Type: application/json
{
"ceph": "Skipped",
"uuid": "123",
"setupdata": "345",
"vmtpresult": "{
"status": "PASS",
"EXT_NET": []
}",
"baremetal": "Success",
"orchestration": "Success",
"validationstatus": "{
"status": "PASS",
"Software_Validation": [],
"Hardware_Validation": []
}",
"currentstatus": "Completed",
"validation": "Success",
"hostsetup": "Success",
"vmtp": "Skipped"
}
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Install doesn’t exists"
}
Stop the installation
Resource URI
Verb
|
URI
|
DELETE
|
/v1/install/{id}
|
Property:
id - the id of the
install to be stopped.
Example
JSON Request
DELETE /v1/install/345
Accept: application/js
JSON Response
204 NO CONTENT
Content-Type: application/json
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Install doesn’t exists"
}
Nodes
Getting a list of nodes
Resource URI
Example
JSON Request
Get /v1/nodes
Accept: application/js
JSON Response
200 OK
Content-Type: application/json
{
"nodes": [
[
"status": "Active",
"uuid": "456",
"setupdata": "123",
"node_data": "{
"rack_info": {
"rack_id": "RackA"
},
"cimc_info": {
"cimc_ip": "10.10.10.10"
},
"management_ip": "7.7.7.10"
}",
"updated_at": null,
"mtype": "compute",
"install": "345",
"install_logs": "logurl",
"created_at":"2016-0710T06:17:03.761152",
"name": " compute-1"
}
]
}
Add new nodes
The nodes are in
compute or block_storage type. Before adding the nodes to the system, the name
of the nodes and other necessary information like cimc_ip and rackid must be
updated in the setupdata object. If the setupdata object is not updated, the
post call will not allow you to add the node.
Resource URI
Example
JSON Request
POST /v1/nodes
Accept: application/js
{
"name" : "compute-5"
}
JSON Response
201 CREATED
Content-Type: application/json
{
"status": "ToAdd",
"uuid": "456",
"setupdata": "123",
"node_data": "{
"rack_info": {
"rack_id": "RackA"
},
"cimc_info": {
"cimc_ip": "10.10.10.10"
},
"management_ip": "7.7.7.10"
}",
"updated_at": null,
"mtype": "compute",
"install": "345",
"install_logs": "logurl",
"created_at":"2016-0710T06:17:03.761152",
"name": " compute-1"
}
Retrieve information about
a particular node
Resource URI
Verb
|
URI
|
GET
|
/v1/nodes{id}
|
Property:
id - the id of the
node to be queried.
Example
JSON Request
POST /v1/nodes
Accept: application/js
JSON Response
200 OK
Content-Type: application/json
{
"status": "Active",
"uuid": "456",
"setupdata": "123",
"node_data": "{
"rack_info": {
"rack_id": "RackA"
},
"cimc_info": {
"cimc_ip": "10.10.10.10"
},
"management_ip": "7.7.7.10"
}",
"updated_at": null,
"mtype": "compute",
"install": "345",
"install_logs": "logurl",
"created_at":"2016-0710T06:17:03.761152",
"name": " compute-1"
}
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Node doesn’t exists"
}
Remove a node
The node that must
be deleted must be removed from the setupdata object. Once the setupdata object
is updated, you can safely delete of the node. The node object will not be
deleted until it calls the remove node backend and succeeds.
Resource URI
Verb
|
URI
|
DELETE
|
/v1/nodes{id}
|
Property:
id - the id of the
node to be removed.
Example
JSON Request
DELETE /v1/nodes/456
Accept: application/js
JSON Response
204 ACCEPTED
Content-Type: application/json
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Node doesn’t exists"
}
For clearing the
database and deleting the entries in the nodes, the delete api is called with
special parameters that are passed along with the delete request. The JSON
parameters are in the following format.
JSON Request
DELETE /v1/nodes/456
Accept: application/js
{
"clear_db_entry":"True"\
}
JSON Response
204 ACCEPTED
Content-Type: application/json
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Node doesn’t exists"
}
Note |
This is done
only if the node is deleted from the REST API database. The failure reason of
the node must be rectified manually apart from the API. True is a string and
not a boolean in the above line.
|
Replace a controller
Resource URI
Verb
|
URI
|
PUT
|
/v1/nodes{id}
|
Property:
id - the id of the
controller to be replaced.
Example
JSON Request
PUT /v1/nodes/456
Accept: application/js
JSON Response
200 OK
Content-Type: application/json
404 NOT FOUND
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Node doesn’t exists"
}
Offline validation
REST wrapper does
the offline validation of setupdata. This will only do S/W Validation of the
input setupdata.
Create an offline
validation operation
Resource URI
Verb
|
URI
|
POST
|
/v1/offlinevalidation
|
Example
JSON Request
POST /v1/offlinevalidation
Accept: application/json
{
"jsondata": ".. .. .."
}
JSON Response
201 CREATED
Content-Type: application/json
{
"status": "NotValidated",
"uuid": "bb42e4ba-c8b7-4a5c-98b3-1f384aae2b69",
"created_at": "2016-02-03T02:05:28.384274",
"updated_at": "2016-02-03T02:05:51.880785",
"jsondata": "{}",
"validationstatus": {
"status": "PASS",
"Software_Validation": [],
"Hardware_Validation": []
}
}
Retrieve the results of
offline validation
Resource URI
Verb
|
URI
|
GET
|
/v1/offlinevalidation
|
Property:
id - the id of the
node to be queried.
Example
JSON Request
GET /v1/offlinevalidation/789
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"status": " ValidationSuccess",
"uuid": "bb42e4ba-c8b7-4a5c-98b3-1f384aae2b69",
"created_at": "2016-02-03T02:05:28.384274",
"updated_at": "2016-02-03T02:05:51.880785",
"jsondata": "{}",
"validationstatus": {
"status": "PASS",
"Software_Validation": [],
"Hardware_Validation": []
}
}
Update
Start an update process
Resource URI
Parameters:
Example
JSON Request
curl -sS -X POST --form
"fileupload=@Test/installer.good.tgz" --form
"filename=installer.good.tgz"
https://10.10.10.8445/v1/update
Note |
This curl
request is done as a form request.
|
JSON Response
200 OK
Content-Type: application/json
{
"update_logs": "logurl",
"update_status": "UpdateSuccess",
"update_filename": "installer-4579.tgz",
"created_at": "2016-07-10T18:33:52.698656",
"updated_at": "2016-07-10T18:54:56.885083"
}
409 CONFLICT
Content-Type: application/json
{
"debuginfo": null
"faultcode": "Client"
"faultstring": "Uploaded file is not in tar format"
}
Rollback an update
Resource URI
Example
JSON Request
PUT /v1/update
Accept: application/json
{
"action":"rollback"
}
JSON Response
200 OK
Content-Type: application/json
{
"update_logs": "logurl",
"update_status": "ToRollback",
"update_filename": "installer-4579.tgz",
"created_at": "2016-07-10T18:33:52.698656",
"updated_at": "2016-07-10T18:54:56.885083"
}
Commit an update
Resource URI
Example
JSON Request
PUT /v1/update
Accept: application/json
{
"action":"commit"
}
JSON Response
200 OK
Content-Type: application/json
{
"update_logs": "logurl",
"update_status": "ToCommit",
"update_filename": "installer-4579.tgz",
"created_at": "2016-07-10T18:33:52.698656",
"updated_at": "2016-07-10T18:54:56.885083"
}
Retrieve the details of an
update
Resource URI
Example
JSON Request
GET /v1/update
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"update_logs": "logurl",
"update_status": "UpdateSuccess",
"update_filename": "installer-4579.tgz",
"created_at": "2016-07-10T18:33:52.698656",
"updated_at": "2016-07-10T18:54:56.885083"
}
Secrets
Retrieve the list of
secrets associated with the OpenStack Setup
You can retrieve
the set of secret password associated with the OpenStack setup using the above
api. This gives the list of secrets for each service in OpenStack.
Resource URI
Example
JSON Request
GET /v1/secrets
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"HEAT_KEYSTONE_PASSWORD": "xxxx",
"CINDER_KEYSTONE_PASSWORD": "xxxxx",
….
….
"RABBITMQ_PASSWORD": "xxxxx"
}
OpenStack
Configs
Retrieve the list of
OpenStack configs associated with the OpenStack Setup
You can retrieve
the set of OpenStack configs associated with the OpenStack setup using the
above api. This gives the current settings of different configs like verbose
logging, debug logging for different OpenStack services.
Resource URI
Verb
|
URI
|
GET
|
/v1/openstack_config
|
Example
JSON Request
GET /v1/openstack_config
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"CINDER_DEBUG_LOGGING": false,
"KEYSTONE_DEBUG_LOGGING": false,
….
….
"NOVA_VERBOSE_LOGGING": true
}
Version
Retrieve the
version of the Cisco Virtualized Infrastructure Manager.
Resource URI
Example
JSON Request
GET /v1/version
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{"version": "1.9.1"}
Health of the Management
Node
Retrieve the health of the
Management node
This api can be
used to retrieve the health of the management node. It checks various
parameters like partitions, space and so on.
Resource URI
Example
JSON Request
GET /v1/health
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"status": "PASS",
"BuildNode Validation": {
"Check Docker Pool Settings": {"status": "Pass", "reason": "None"}
….
….
}
}
Hardware Information
REST wrapper to do
hardware information of setupdata. This will return the hardware information of
all hardware available in the setupdata.
Create a HWinfo
operation
Resource URI
Example
JSON Request
POST /v1/hwinfo
Accept: application/json
{
"setupdata":"c94d7973-2fcc-4cd1-832d-453d66e6b3bf"
}
JSON Response
201 CREATED
Content-Type: application/json
{
"status": "hwinfoscheduled",
"uuid": "928216dd-9828-407b-9739-8a7162bd0676",
"setupdata": "c94d7973-2fcc-4cd1-832d-453d66e6b3bf",
"created_at": "2017-03-19T13:41:25.488524",
"updated_at": null,
"hwinforesult": ""
}
Retrieve the results of
Hwinfo Operation
Resource URI
Verb
|
URI
|
GET
|
/v1/hwinfo/{id}
|
Property:
id - the id of
the node to be queried.
Example
JSON Request
GET /v1/hwinfo/789
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
{
"status": "hwinfosuccess",
"uuid": "928216dd-9828-407b-9739-8a7162bd0676",
"setupdata": "c94d7973-2fcc-4cd1-832d-453d66e6b3bf",
"created_at": "2017-03-19T13:41:25.488524",
"updated_at": "2017-03-19T13:42:05.087491",
"hwinforesult": "{\"172.29.172.73\": {\"firmware\": …………..
…………
……………..
}
Release mapping
Information
This api is used
to see the list of Features included and list of options which can be
reconfigured in the Openstack Setup.
Retrieve the release
mapping information
Resource URI
Verb
|
URI
|
GET
|
/v1/releasemapping
|
JSON Request
GET /v1/releasemapping
Accept: application/json
JSON Response
200 OK
Content-Type: application/json
[
{
"SWIFTSTACK": {
"feature_status": true,
],
"desc": "swift stack feature"
}
},……..
…………..
}
POST Install
operations
The following are
the post install operations that can be carried on once the OpenStack
installation is carried out successfully. It uses a common api. So only one
operation is given as an example below:
-
reconfigure,
-
reconfigure
-regenerate passwords
-
reconfigure
-setpasswords,setopenstack_configs,
-
check-fernet-keys
-
period-rotate-fernet-keys
-
resync-fernet-keys
-
rotate-fernet-keys
Create a post install
operation
Resource URI
Example
JSON Request
POST /v1/misc
Accept: application/json
{"action": {"reconfigure": true}}
JSON Response
201 CREATED
Content-Type: application/json
{
"uuid": "7e30a671-bacf-4e3b-9a8f-5a1fd8a46733",
"created_at": "2017-03-19T14:03:39.723914",
"updated_at": null,
"operation_status": "OperationScheduled",
"operation_logs": "",
"operation_name": "{"reconfigure": true}"
}
Retrieve a
status of the post install operation
Resource URI
Example
JSON Request
GET /v1/misc
Accept: application/json
JSON Response
201 CREATED
Content-Type: application/json
{
"uuid": "7e30a671-bacf-4e3b-9a8f-5a1fd8a46733",
"created_at": "2017-03-19T14:03:39.723914",
"updated_at": "2017-03-19T14:03:42.181180",
"operation_status": "OperationRunning",
"operation_logs": "xxxxxxxxxxxxxxxxx",
"operation_name": "{\"reconfigure\": true}"
}
NFVBench Network
Performance Testing
Create NFVBench
Run
Starts network
performance test with provided configuration.
Resource URI
Verb
|
URI
|
POST
|
/v1/nfvbench
|
Example
JSON Request
NDR/PDR Run
POST /v1/nfvbench
Accept: application/json
{“nfvbench_request”:
{
"duration_sec": 20,
"traffic_profile": [
{
"name": "custom",
"l2frame_size": [
"64",
"IMIX",
"1518"
]
}
],
"traffic": {
"bidirectional": true,
"profile": "custom"
},
"flow_count": 1000
}
}
Fixed Rate Run
POST /v1/nfvbench
Accept: application/json
{“nfvbench_request”:
{
"rate": "1000000pps",
"duration_sec": 60,
"traffic_profile": [
{
"name": "custom",
"l2frame_size": [
"1518"
]
}
],
"traffic": {
"bidirectional": true,
"profile": "custom"
},
"flow_count": 1000
}
}
JSON Response
JSON Response
201 CREATED
Content-Type: application/json
{
"created_at": "2017-05-30T21:40:40.394274",
"nfvbench_request": "{\"duration_sec\": 20, \"traffic_profile\": …}",
"nfvbench_result": "",
"status": "not_run",
"updated_at": null,
"uuid": "e08d5642-3361-41e0-b91a-13036705011a"
}
Status
Polling
Polling of
NFVbench run status which is one of "nfvbench_running", "nfvbench_failed",
"nfvbench_completed".
Resource URI
Verb
|
URI
|
GET
|
/v1/nfvbench/<uuid>
|
Example
JSON Request
UUID is returned by POST call.
GET /v1/nfvbench/e08d5642-3361-41e0-b91a-13036705011a
Accept: application/json
JSON Response
Run in Progress
200 OK
Content-Type: application/json
{
"created_at": "2017-05-30T21:40:40.394274",
"nfvbench_request": "{\"duration_sec\": 20, \"traffic_profile\": …}",
"nfvbench_result": "",
"status": "nfvbench_running",
"updated_at": "2017-05-30T21:40:41.367279",
"uuid": "e08d5642-3361-41e0-b91a-13036705011a"
}
Run Completed
200 OK
Content-Type: application/json
{
"created_at": "2017-05-30T21:40:40.394274",
"nfvbench_request": "{\"duration_sec\": 20, \"traffic_profile\": …}",
"nfvbench_result": "{\"status\": \"PROCESSED\", \"message\": {\"date\": \"2017-05-30 14:40:46\", ...}}"
"status": "nfvbench_completed",
"updated_at": "2017-05-30T22:29:56.970779",
"uuid": "e08d5642-3361-41e0-b91a-13036705011a"
}