You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

TO DO:

1.Figure out all functionalities we need and define functions for them.

2. Full list of parameters for each function. (check with Mike and Mario).

3.Specify which parameters are required to be passed in from user in REST API for each function.

 

ResourcesActivitiesParametersHTTP verb mappingReturn value
NDS Lab Environment


Create a NDS Lab Environment.
  1. user name
  2. password
  3. name of the cluster
  4. number of instances
  5. number of master nodes
  6. IP address(es) for all master node(s)
  7. image that instances spin on 
  8. size of volumes.
POST users/lab_environment/:lab_id

{

"success":true,

{

"master1_ip":,

"master2_ip":

},

"ssh_key_url":

}

List all NDS Lab Environment under a specific account.
  1. user name
  2. password
GET users/lab_environment

 {

"success":true,

{

"lab_name":,

"lab_status":

{

"master1_ip":

"master2_ip":

}

"service1":

"service2:"

 

}

 

}

Destroy a NDS Lab Environment.
  1. user name
  2. password
  3. NDS Lab Environment ID
DELETE users/lab_environment/:lab_id

 {

"success":true

}

Destroy a volume associated with a specific NDS Lab Environment.

(Can multiple volumes be associated one NDS Lab Environment ?) (question)

  1. user name
  2. password
  3. NDS Lab Environment ID
  4. volume ID (question)
DELETE users/lab_environment/:lab_id/volume/:volume_id

 {

"success":true,

"deleted_volume":,

"associated_lab":

}

Services

List services in a specific NDS Lab Environment.
  1. user name
  2. password
  3. NDS Lab Environment ID
GET users/lab_environment/:lab_id/services

{

"success":true,

{

"service1_name":,

"status":

},

{

"service2_name":,

"status":

}

}

Start services in a specific NDS Lab Environment.
  1. user name
  2. password
  3. NDS Lab Environment ID
  4. service name

POST users/lab_environment/:lab_id/services/:service_id

{status: activate}

{

"success":true,

"associated_lab":,

{

"started_service1":,

"status":

}

{

"started_service2":,

"status":

}

}

Stop services in a specific NDS Lab Environment. (Stop containers)
  1. user name
  2. password
  3. NDS Lab Environment ID
  4. Service name

PUT users/lab_environment/:lab_id/services/:service_id

{status: dead}

{

"success":true,

"associated_lab":,

{

"stopped_service1":,

"status":

},

{

"stopped_service2":,

"status":

}

}

Delete services in a specific NDS Lab Environment.

 (Remove docker containers (and images))

Do we need this functionality? (question)

  1. user name
  2. password
  3. NDS Lab Environment ID
  4. service name
  5. flag (whether to remove the docker images)
DELETE users/lab_environment/:lab_id/services/:service_id

{

"success":true,

"associated_lab":,

{

"deleted_service1":,

"status":

},

{

"deleted_service2":,

"status":

}

}

  • No labels