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