blob: cdee98ce27a3e72e7ff5b573f2acffa129abef09 [file] [log] [blame]
Teone620bafd2016-04-18 14:39:41 -07001FORMAT: 1A
2
3# XOS
4
5
Matteo Scandolob71510b2016-04-29 09:56:48 -07006# Group Deployments
7
8List of the XOS deployments
9
10## Deployments [/api/core/deployments/{id}/]
11
12### List all deployments [GET]
13
14+ Response 200 (application/json)
15
Matteo Scandolod5f3d052016-05-02 15:29:37 -070016 [
17 {
18 "humanReadableName": "MyDeployment",
19 "id": 1,
20 "created": "2016-04-29T16:19:03.549901Z",
21 "updated": "2016-04-29T16:19:05.624151Z",
22 "enacted": null,
23 "policed": null,
24 "backend_register": "{}",
25 "backend_status": "0 - Provisioning in progress",
26 "deleted": false,
27 "write_protect": false,
28 "lazy_blocked": false,
29 "no_sync": true,
30 "name": "MyDeployment",
31 "accessControl": "allow all",
32 "images": [
33 "1"
34 ],
35 "sites": [
36 "1"
37 ],
38 "flavors": [
39 "1",
40 "2",
41 "3"
42 ],
43 "dashboardviews": [
44 "1"
45 ]
46 }
47 ]
48
49### View a Deployment Detail [GET]
50
51+ Parameters
52 + id: 1 (number) - ID of the Deployment in the form of an integer
53
54+ Response 200 (application/json)
55
Matteo Scandolob71510b2016-04-29 09:56:48 -070056 {
57 "humanReadableName": "MyDeployment",
58 "id": 1,
Matteo Scandolod5f3d052016-05-02 15:29:37 -070059 "created": "2016-04-27T21:46:57.354544Z",
60 "updated": "2016-04-27T21:47:05.221720Z",
Matteo Scandolob71510b2016-04-29 09:56:48 -070061 "enacted": null,
62 "policed": null,
63 "backend_register": "{}",
64 "backend_status": "0 - Provisioning in progress",
65 "deleted": false,
66 "write_protect": false,
67 "lazy_blocked": false,
68 "no_sync": true,
69 "name": "MyDeployment",
70 "accessControl": "allow all",
Matteo Scandolod5f3d052016-05-02 15:29:37 -070071 "images": [],
Matteo Scandolob71510b2016-04-29 09:56:48 -070072 "sites": [
73 "1"
74 ],
75 "flavors": [
Matteo Scandolod5f3d052016-05-02 15:29:37 -070076 "3",
Matteo Scandolob71510b2016-04-29 09:56:48 -070077 "2",
Matteo Scandolod5f3d052016-05-02 15:29:37 -070078 "1"
Matteo Scandolob71510b2016-04-29 09:56:48 -070079 ],
80 "dashboardviews": [
Matteo Scandolod5f3d052016-05-02 15:29:37 -070081 "3"
Matteo Scandolob71510b2016-04-29 09:56:48 -070082 ]
83 }
Matteo Scandolod5f3d052016-05-02 15:29:37 -070084
Matteo Scandolob71510b2016-04-29 09:56:48 -070085
86
87# Group Flavors
88
89List of the XOS flavors
90
91## Flavors [/api/core/flavors/{id}/]
92
93### List all flavors [GET]
94
95+ Response 200 (application/json)
96
97 [
98 {
99 "humanReadableName": "m1.large",
100 "id": 1,
101 "created": "2016-04-29T16:19:01.979548Z",
102 "updated": "2016-04-29T16:19:03.568238Z",
103 "enacted": null,
104 "policed": null,
105 "backend_register": "{}",
106 "backend_status": "0 - Provisioning in progress",
107 "deleted": false,
108 "write_protect": false,
109 "lazy_blocked": false,
110 "no_sync": true,
111 "name": "m1.large",
112 "description": null,
113 "flavor": "m1.large",
114 "order": 0,
115 "default": false,
116 "deployments": [
117 "1"
118 ]
119 }
120 ]
121
122### View a Flavors Detail [GET]
123
124+ Parameters
125 + id: 1 (number) - ID of the Flavors in the form of an integer
126
127+ Response 200 (application/json)
128
129 {
130 "humanReadableName": "m1.large",
131 "id": 1,
132 "created": "2016-04-29T16:19:01.979548Z",
133 "updated": "2016-04-29T16:19:03.568238Z",
134 "enacted": null,
135 "policed": null,
136 "backend_register": "{}",
137 "backend_status": "0 - Provisioning in progress",
138 "deleted": false,
139 "write_protect": false,
140 "lazy_blocked": false,
141 "no_sync": true,
142 "name": "m1.large",
143 "description": null,
144 "flavor": "m1.large",
145 "order": 0,
146 "default": false,
147 "deployments": [
148 "1"
149 ]
150 }
151
152
153# Group Instances
154
155List of the XOS instances
156
157## Instances [/api/core/instances/{id}/]
158
159### List all Instances [GET]
160
161+ Response 200 (application/json)
162
163 [
164 {
165 "id": 1,
166 "humanReadableName": "uninstantiated-1",
167 "created": "2016-04-26T00:36:22.465259Z",
168 "updated": "2016-04-26T00:36:22.465288Z",
169 "enacted": null,
170 "policed": null,
171 "backend_register": "{}",
172 "backend_status": "0 - Provisioning in progress",
173 "deleted": false,
174 "write_protect": false,
175 "lazy_blocked": false,
176 "no_sync": false,
177 "instance_id": null,
178 "instance_uuid": null,
179 "name": "mysite_vcpe",
180 "instance_name": null,
181 "ip": null,
182 "image": "1",
183 "creator": "1",
184 "slice": "1",
185 "deployment": "1",
186 "node": "1",
187 "numberCores": 0,
188 "flavor": "1",
189 "userData": null,
190 "isolation": "vm",
191 "volumes": "/etc/dnsmasq.d,/etc/ufw",
192 "parent": null,
193 "networks": [
194 "1"
195 ]
196 }
197 ]
198
199
200
201# Group Nodes
202
203List of the XOS nodes
204
205## Nodes [/api/core/nodes/{id}/]
206
207### List all nodes [GET]
208
209+ Response 200 (application/json)
210
211 [
212 {
213 "humanReadableName": "node2.opencloud.us",
214 "id": 1,
215 "created": "2016-04-29T16:19:05.661567Z",
216 "updated": "2016-04-29T16:19:05.661454Z",
217 "enacted": null,
218 "policed": null,
219 "backend_register": "{}",
220 "backend_status": "0 - Provisioning in progress",
221 "deleted": false,
222 "write_protect": false,
223 "lazy_blocked": false,
224 "no_sync": true,
225 "name": "node2.opencloud.us",
226 "site_deployment": "1",
227 "site": "1",
228 "nodelabels": []
229 }
230 ]
231
232
233
234# Group Sites
235
236List of the XOS sites
237
238## Sites [/api/core/sites/{id}/]
239
240### List all sites [GET]
241
242+ Response 200 (application/json)
243
244 {
245 "humanReadableName": "MySite",
246 "id": 1,
247 "created": "2016-04-29T16:19:03.587770Z",
248 "updated": "2016-04-29T16:19:05.651933Z",
249 "enacted": null,
250 "policed": null,
251 "backend_register": "{}",
252 "backend_status": "0 - Provisioning in progress",
253 "deleted": false,
254 "write_protect": false,
255 "lazy_blocked": false,
256 "no_sync": false,
257 "name": "MySite",
258 "site_url": "http://opencord.us/",
259 "enabled": true,
260 "hosts_nodes": true,
261 "hosts_users": true,
262 "location": null,
263 "longitude": null,
264 "latitude": null,
265 "login_base": "mysite",
266 "is_public": true,
267 "abbreviated_name": "",
268 "deployments": [
269 "1"
270 ]
271 }
272
273
274# Group Slices
275
276List of the XOS slices
277
278## Slices [/api/core/slices/{id}/]
279
280### List all slices [GET]
281
282+ Response 200 (application/json)
283
284 [
285 {
286 "humanReadableName": "mysite_slice",
287 "id": 1,
288 "created": "2016-04-29T16:23:22.505072Z",
289 "updated": "2016-04-29T16:23:22.504691Z",
290 "enacted": null,
291 "policed": "2016-04-29T16:23:22.781298Z",
292 "backend_register": "{}",
293 "backend_status": "0 - Provisioning in progress",
294 "deleted": false,
295 "write_protect": false,
296 "lazy_blocked": false,
297 "no_sync": false,
298 "name": "mysite_slice",
299 "enabled": true,
300 "omf_friendly": false,
301 "description": "",
302 "slice_url": "",
303 "site": "http://apt118.apt.emulab.net/api/core/sites/1/",
304 "max_instances": 10,
305 "service": null,
306 "network": null,
307 "exposed_ports": null,
308 "serviceClass": "http://apt118.apt.emulab.net/api/core/serviceclasses/1/",
309 "creator": "http://apt118.apt.emulab.net/api/core/users/1/",
310 "default_flavor": null,
311 "default_image": null,
312 "mount_data_sets": "GenBank",
313 "default_isolation": "vm",
314 "networks": [
315 "http://apt118.apt.emulab.net/api/core/networks/1/"
316 ]
317 }
318 ]
319
320
321
322# Group Users
323
324List of the XOS users
325
326## Users [/api/core/users/{id}/]
327
328### List all Users [GET]
329
330+ Response 200 (application/json)
331
332 [
333 {
334 "id": 2,
335 "password": "pbkdf2_sha256$12000$9gn8DmZuIoz2$YPQkx3AOOV7jZNYr2ddrgUCkiuaPpvb8+aJR7RwLZNA=",
336 "last_login": "2016-04-12T18:50:45.880823Z",
337 "email": "johndoe@myhouse.com",
338 "username": "johndoe@myhouse.com",
339 "firstname": "john",
340 "lastname": "doe",
341 "phone": null,
342 "user_url": null,
343 "site": "http://xos.dev:9999/api/core/sites/1/",
344 "public_key": null,
345 "is_active": true,
346 "is_admin": false,
347 "is_staff": true,
348 "is_readonly": false,
349 "is_registering": false,
350 "is_appuser": false,
351 "login_page": null,
352 "created": "2016-04-12T18:50:45.912602Z",
353 "updated": "2016-04-12T18:50:45.912671Z",
354 "enacted": null,
355 "policed": null,
356 "backend_status": "Provisioning in progress",
357 "deleted": false,
358 "write_protect": false,
359 "timezone": "America/New_York"
360 }
361 ]
362
363
364
Matteo Scandoloa2be8d42016-04-29 15:34:17 -0700365# Group Example
366
367## Example Services Collection [/api/service/exampleservice/]
368
369### List all Example Services [GET]
370
371+ Response 200 (application/json)
372
373 [
374 {
375 "humanReadableName": "MyExample",
376 "id": 1,
377 "service_message": "This is the test message"
378 }
379 ]
380
381
382# Group ONOS Services
383
384List of the active onos services
385
386## ONOS Services Collection [/api/service/onos/]
387
388### List all ONOS Services [GET]
389
390+ Response 200 (application/json)
391
392 [
393 {
394 "humanReadableName": "service_ONOS_vBNG",
395 "id": 5,
396 "rest_hostname": "",
397 "rest_port": "8181",
398 "no_container": false,
399 "node_key": ""
400 }
401 ]
402
403
404# Group vSG
405
406## vSG Collection [/api/service/vsg/]
407
408### List all vSGs [GET]
409
410+ Response 200 (application/json)
411
412 [
413 {
414 "humanReadableName": "service_vsg",
415 "id": 2,
416 "dns_servers": "8.8.8.8",
417 "url_filter_kind": null,
418 "node_label": null
419 }
420 ]
421
422
Matteo Scandolod5f3d052016-05-02 15:29:37 -0700423# Group Utility
424
425List of the XOS Utility API
426
427## Login [/api/utility/login/]
428
429### Log a user in the system [POST]
430
431+ Request (application/json)
432
433 {
434 "username": "padmin@vicci.org",
435 "password": "letmein"
436 }
437
438+ Response 200 (application/json)
439
440 {
441 "xoscsrftoken":"xuvsRC1jkXAsnrdRlgJvcXpmtthTAqqf",
442 "xossessionid":"7ds5a3wzjlgbjqo4odkd25qsm0j2s6zg",
443 "user": "{\"policed\": null, \"site\": 3, \"is_appuser\": false, \"is_staff\": true, \"backend_status\": \"Provisioning in progress\", \"id\": 3, \"is_registering\": false, \"last_login\": \"2016-04-30T22:51:04.788675+00:00\", \"email\": \"padmin@vicci.org\", \"no_sync\": false, \"username\": \"padmin@vicci.org\", \"dashboards\": [11], \"login_page\": null, \"firstname\": \"XOS\", \"user_url\": null, \"deleted\": false, \"lastname\": \"admin\", \"is_active\": true, \"lazy_blocked\": false, \"phone\": null, \"is_admin\": true, \"enacted\": null, \"public_key\": null, \"is_readonly\": false, \"no_policy\": false, \"write_protect\": false}"
444 }
445
446## Logout [/api/utility/logout/]
447
448### Log a user out of the system [POST]
449
450+ Request (application/json)
451 {xossessionid: "sessionId"}
452
453+ Response 200 (application/json)
454
455
456
Teone620bafd2016-04-18 14:39:41 -0700457# Group Subscribers
458
459Resource related to the CORD Subscribers.
460
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700461## Subscribers [/api/tenant/cord/subscriber/{subscriber_id}/]
Teone620bafd2016-04-18 14:39:41 -0700462
463### List All Subscribers [GET]
464
465+ Response 200 (application/json)
466
467 [
468 {
469 "humanReadableName": "cordSubscriber-1",
470 "id": 1,
471 "features": {
472 "cdn": false,
473 "uplink_speed": 1000000000,
474 "downlink_speed": 1000000000,
475 "uverse": false,
476 "status": "enabled"
477 },
478 "identity": {
479 "account_num": "123",
480 "name": "My House"
481 },
482 "related": {
483 "instance_name": "mysite_vcpe",
484 "vsg_id": 4,
485 "compute_node_name": "node2.opencloud.us",
486 "c_tag": "432",
487 "instance_id": 1,
488 "wan_container_ip": null,
489 "volt_id": 3,
490 "s_tag": "222"
491 }
492 }
493 ]
494
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700495
496### View a Subscriber Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700497
498+ Parameters
499 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
500
Teone620bafd2016-04-18 14:39:41 -0700501+ Response 200 (application/json)
502
503 {
504 "humanReadableName": "cordSubscriber-1",
505 "id": 1,
506 "features": {
507 "cdn": false,
508 "uplink_speed": 1000000000,
509 "downlink_speed": 1000000000,
510 "uverse": false,
511 "status": "enabled"
512 },
513 "identity": {
514 "account_num": "123",
515 "name": "My House"
516 },
517 "related": {
518 "instance_name": "mysite_vcpe",
519 "vsg_id": 4,
520 "compute_node_name": "node2.opencloud.us",
521 "c_tag": "432",
522 "instance_id": 1,
523 "wan_container_ip": null,
524 "volt_id": 3,
525 "s_tag": "222"
526 }
527 }
528
529### Delete a Subscriber [DELETE]
530
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700531+ Parameters
532 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
533
Teone620bafd2016-04-18 14:39:41 -0700534+ Response 204
535
536### Subscriber features [/api/tenant/cord/subscriber/{subscriber_id}/features/]
537
538+ Parameters
539 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
540
541### View a Subscriber Features Detail [GET]
542
543+ Response 200 (application/json)
544
545 {
546 "cdn": false,
547 "uplink_speed": 1000000000,
548 "downlink_speed": 1000000000,
549 "uverse": true,
550 "status": "enabled"
551 }
552
553#### Subscriber features uplink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/uplink_speed/]
554
555+ Parameters
556 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
557
558#### Read Subscriber uplink_speed [GET]
559
560+ Response 200 (application/json)
561
562 {
563 "uplink_speed": 1000000000
564 }
565
566#### Update Subscriber uplink_speed [PUT]
567
568+ Request 200 (application/json)
569
570 {
571 "uplink_speed": 1000000000
572 }
573
574+ Response 200 (application/json)
575
576 {
577 "uplink_speed": 1000000000
578 }
579
580#### Subscriber features downlink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/downlink_speed/]
581
582+ Parameters
583 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
584
585#### Read Subscriber downlink_speed [GET]
586
587+ Response 200 (application/json)
588
589 {
590 "downlink_speed": 1000000000
591 }
592
593#### Update Subscriber downlink_speed [PUT]
594
595+ Request 200 (application/json)
596
597 {
598 "downlink_speed": 1000000000
599 }
600
601+ Response 200 (application/json)
602
603 {
604 "downlink_speed": 1000000000
605 }
606
607#### Subscriber features cdn [/api/tenant/cord/subscriber/{subscriber_id}/features/cdn/]
608
609+ Parameters
610 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
611
612#### Read Subscriber cdn [GET]
613
614+ Response 200 (application/json)
615
616 {
617 "cdn": false
618 }
619
620#### Update Subscriber cdn [PUT]
621
622+ Request 200 (application/json)
623
624 {
625 "cdn": false
626 }
627
628+ Response 200 (application/json)
629
630 {
631 "cdn": false
632 }
633
634#### Subscriber features uverse [/api/tenant/cord/subscriber/{subscriber_id}/features/uverse/]
635
636+ Parameters
637 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
638
639#### Read Subscriber uverse [GET]
640
641+ Response 200 (application/json)
642
643 {
644 "uverse": false
645 }
646
647#### Update Subscriber uverse [PUT]
648
649+ Request 200 (application/json)
650
651 {
652 "uverse": false
653 }
654
655+ Response 200 (application/json)
656
657 {
658 "uverse": false
659 }
660
661#### Subscriber features status [/api/tenant/cord/subscriber/{subscriber_id}/features/status/]
662
663+ Parameters
664 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
665
666#### Read Subscriber status [GET]
667
668+ Response 200 (application/json)
669
670 {
671 "status": "enabled"
672 }
673
674#### Update Subscriber status [PUT]
675
676+ Request 200 (application/json)
677
678 {
679 "status": "enabled"
680 }
681
682+ Response 200 (application/json)
683
684 {
685 "status": "enabled"
686 }
687
688
689# Group Truckroll
690
691Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
692
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700693## Truckroll Collection [/api/tenant/truckroll/{truckroll_id}/]
Teone620bafd2016-04-18 14:39:41 -0700694
695### List all Truckroll [GET]
696
697+ Response 200 (application/json)
698
699 [
700 {
701 "humanReadableName": "vTR-tenant-9",
702 "id": 9,
703 "provider_service": 6,
704 "target_id": 2,
705 "scope": "container",
706 "test": "ping",
707 "argument": "8.8.8.8",
708 "result": "",
709 "result_code": "",
710 "is_synced": false,
711 "backend_status": "2 - Exception('Unreachable results in ansible recipe',)"
712 }
713 ]
714
715### Create a Truckroll [POST]
716
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700717A virtual truckroll is complete once is_synced equal true
718
Teone620bafd2016-04-18 14:39:41 -0700719+ Request (application/json)
720
721 {
722 "target_id": 2,
723 "scope": "container",
724 "test": "ping",
725 "argument": "8.8.8.8"
726 }
727
728+ Response 201 (application/json)
729
730 {
731 "humanReadableName": "vTR-tenant-1",
732 "id": 1,
733 "provider_service": 6,
734 "target_id": 2,
735 "scope": "container",
736 "test": "ping",
737 "argument": "8.8.8.8",
738 "result": null,
739 "result_code": null,
740 "is_synced": false,
741 "backend_status": "0 - Provisioning in progress"
742 }
743
Teone620bafd2016-04-18 14:39:41 -0700744
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700745### View a Truckroll Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700746
747+ Parameters
748 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
749
Teone620bafd2016-04-18 14:39:41 -0700750+ Response 200 (application/json)
751
752 {
753 "humanReadableName": "vTR-tenant-10",
754 "id": 10,
755 "provider_service": 6,
756 "target_id": 2,
757 "scope": "container",
758 "test": "ping",
759 "argument": "8.8.8.8",
760 "result": null,
761 "result_code": null,
762 "is_synced": false,
763 "backend_status": "0 - Provisioning in progress"
764 }
765
766### Delete a Truckroll Detail [DELETE]
767
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700768+ Parameters
769 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
770
Teone620bafd2016-04-18 14:39:41 -0700771+ Response 204
772
773
774
775# Group vOLT
776
777OLT devices aggregate a set of subscriber connections
778
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700779## vOLT Collection [/api/tenant/cord/volt/{volt_id}/]
Teone620bafd2016-04-18 14:39:41 -0700780
781### List all vOLT [GET]
782
783+ Response 200 (application/json)
784
785 [
786 {
787 "humanReadableName": "vOLT-tenant-1",
788 "id": 1,
789 "service_specific_id": "123",
790 "s_tag": "222",
791 "c_tag": "432",
792 "subscriber": 1,
793 "related": {
794 "instance_id": 1,
795 "instance_name": "mysite_vcpe",
796 "vsg_id": 4,
797 "wan_container_ip": null,
798 "compute_node_name": "node2.opencloud.us"
799 }
800 }
801 ]
802
803### Create a vOLT [POST]
804
805+ Request (application/json)
806
807 {
808 "s_tag": "222",
809 "c_tag": "432",
810 "subscriber": 1
811 }
812
813+ Response 201 (application/json)
814
815 {
816 "humanReadableName": "vOLT-tenant-1",
817 "id": 1,
818 "service_specific_id": "123",
819 "s_tag": "222",
820 "c_tag": "432",
821 "subscriber": 1,
822 "related": {
823 "instance_id": 1,
824 "instance_name": "mysite_vcpe",
825 "vsg_id": 4,
826 "wan_container_ip": null,
827 "compute_node_name": "node2.opencloud.us"
828 }
829 }
830
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700831### View a vOLT Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700832
833+ Parameters
834 + volt_id: 1 (number) - ID of the vOLT in the form of an integer
835
Teone620bafd2016-04-18 14:39:41 -0700836+ Response 200 (application/json)
837
838 {
839 "humanReadableName": "vOLT-tenant-1",
840 "id": 1,
841 "service_specific_id": "123",
842 "s_tag": "222",
843 "c_tag": "432",
844 "subscriber": 1,
845 "related": {
846 "instance_id": 1,
847 "instance_name": "mysite_vcpe",
848 "vsg_id": 4,
849 "wan_container_ip": null,
850 "compute_node_name": "node2.opencloud.us"
851 }
852 }
853
854
855
856# Group ONOS Apps
857
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700858## ONOS App Collection [/api/tenant/onos/app/]
Teone620bafd2016-04-18 14:39:41 -0700859
860### List all apps [GET]
861
862+ Response 200 (application/json)
863
864 [
865 {
866 "humanReadableName": "onos-tenant-7",
867 "id": 7,
868 "name": "vBNG_ONOS_app",
869 "dependencies": "org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd"
870 }
871 ]