blob: fe1b221b7e3cfecfad8b2266c07d988e2bcc147d [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
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 Scandoloa2be8d42016-04-29 15:34:17 -0700326# Group Example
327
328## Example Services Collection [/api/service/exampleservice/]
329
330### List all Example Services [GET]
331
332+ Response 200 (application/json)
333
334 [
335 {
336 "humanReadableName": "MyExample",
337 "id": 1,
338 "service_message": "This is the test message"
339 }
340 ]
341
342
343# Group ONOS Services
344
345List of the active onos services
346
347## ONOS Services Collection [/api/service/onos/]
348
349### List all ONOS Services [GET]
350
351+ Response 200 (application/json)
352
353 [
354 {
355 "humanReadableName": "service_ONOS_vBNG",
356 "id": 5,
357 "rest_hostname": "",
358 "rest_port": "8181",
359 "no_container": false,
360 "node_key": ""
361 }
362 ]
363
364
365# Group vSG
366
367## vSG Collection [/api/service/vsg/]
368
369### List all vSGs [GET]
370
371+ Response 200 (application/json)
372
373 [
374 {
375 "humanReadableName": "service_vsg",
376 "id": 2,
377 "dns_servers": "8.8.8.8",
378 "url_filter_kind": null,
379 "node_label": null
380 }
381 ]
382
383
384# Group Utility
385
386List of the XOS Utility API
387
388## Login [/api/utility/login/]
389
390### Log a user in the system [POST]
391
392+ Request (application/json)
393
394 {
395 "username": "padmin@vicci.org",
396 "password": "letmein"
397 }
398
399+ Response 200 (application/json)
400
401 {
402 "xoscsrftoken":"xuvsRC1jkXAsnrdRlgJvcXpmtthTAqqf",
403 "xossessionid":"7ds5a3wzjlgbjqo4odkd25qsm0j2s6zg",
404 "user": {
405 "policed": null,
406 "site": 1,
407 "is_appuser": false,
408 "is_staff": true,
409 "backend_status": "Provisioning in progress",
410 "id": 1,
411 "is_registering": false,
412 "last_login": "2016-04-29T20:35:58.979122+00:00",
413 "email": "padmin@vicci.org",
414 "no_sync": false,
415 "username": "padmin@vicci.org",
416 "dashboards": [
417 4,
418 3,
419 5
420 ],
421 "login_page": null,
422 "firstname": "XOS",
423 "user_url": null,
424 "deleted": false,
425 "lastname": "admin",
426 "is_active": true,
427 "lazy_blocked": false,
428 "phone": null,
429 "is_admin": true,
430 "enacted": null,
431 "public_key": null,
432 "is_readonly": false,
433 "no_policy": false,
434 "write_protect": false
435 }
436 }
437
438## Logout [/api/utility/logout/]
439
440### Log a user out of the system [POST]
441
442+ Request (application/json)
443 {xossessionid: "sessionId"}
444
445+ Response 200 (application/json)
446
447
448
Teone620bafd2016-04-18 14:39:41 -0700449# Group Subscribers
450
451Resource related to the CORD Subscribers.
452
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700453## Subscribers [/api/tenant/cord/subscriber/{subscriber_id}/]
Teone620bafd2016-04-18 14:39:41 -0700454
455### List All Subscribers [GET]
456
457+ Response 200 (application/json)
458
459 [
460 {
461 "humanReadableName": "cordSubscriber-1",
462 "id": 1,
463 "features": {
464 "cdn": false,
465 "uplink_speed": 1000000000,
466 "downlink_speed": 1000000000,
467 "uverse": false,
468 "status": "enabled"
469 },
470 "identity": {
471 "account_num": "123",
472 "name": "My House"
473 },
474 "related": {
475 "instance_name": "mysite_vcpe",
476 "vsg_id": 4,
477 "compute_node_name": "node2.opencloud.us",
478 "c_tag": "432",
479 "instance_id": 1,
480 "wan_container_ip": null,
481 "volt_id": 3,
482 "s_tag": "222"
483 }
484 }
485 ]
486
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700487
488### View a Subscriber Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700489
490+ Parameters
491 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
492
Teone620bafd2016-04-18 14:39:41 -0700493+ Response 200 (application/json)
494
495 {
496 "humanReadableName": "cordSubscriber-1",
497 "id": 1,
498 "features": {
499 "cdn": false,
500 "uplink_speed": 1000000000,
501 "downlink_speed": 1000000000,
502 "uverse": false,
503 "status": "enabled"
504 },
505 "identity": {
506 "account_num": "123",
507 "name": "My House"
508 },
509 "related": {
510 "instance_name": "mysite_vcpe",
511 "vsg_id": 4,
512 "compute_node_name": "node2.opencloud.us",
513 "c_tag": "432",
514 "instance_id": 1,
515 "wan_container_ip": null,
516 "volt_id": 3,
517 "s_tag": "222"
518 }
519 }
520
521### Delete a Subscriber [DELETE]
522
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700523+ Parameters
524 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
525
Teone620bafd2016-04-18 14:39:41 -0700526+ Response 204
527
528### Subscriber features [/api/tenant/cord/subscriber/{subscriber_id}/features/]
529
530+ Parameters
531 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
532
533### View a Subscriber Features Detail [GET]
534
535+ Response 200 (application/json)
536
537 {
538 "cdn": false,
539 "uplink_speed": 1000000000,
540 "downlink_speed": 1000000000,
541 "uverse": true,
542 "status": "enabled"
543 }
544
545#### Subscriber features uplink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/uplink_speed/]
546
547+ Parameters
548 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
549
550#### Read Subscriber uplink_speed [GET]
551
552+ Response 200 (application/json)
553
554 {
555 "uplink_speed": 1000000000
556 }
557
558#### Update Subscriber uplink_speed [PUT]
559
560+ Request 200 (application/json)
561
562 {
563 "uplink_speed": 1000000000
564 }
565
566+ Response 200 (application/json)
567
568 {
569 "uplink_speed": 1000000000
570 }
571
572#### Subscriber features downlink_speed [/api/tenant/cord/subscriber/{subscriber_id}/features/downlink_speed/]
573
574+ Parameters
575 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
576
577#### Read Subscriber downlink_speed [GET]
578
579+ Response 200 (application/json)
580
581 {
582 "downlink_speed": 1000000000
583 }
584
585#### Update Subscriber downlink_speed [PUT]
586
587+ Request 200 (application/json)
588
589 {
590 "downlink_speed": 1000000000
591 }
592
593+ Response 200 (application/json)
594
595 {
596 "downlink_speed": 1000000000
597 }
598
599#### Subscriber features cdn [/api/tenant/cord/subscriber/{subscriber_id}/features/cdn/]
600
601+ Parameters
602 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
603
604#### Read Subscriber cdn [GET]
605
606+ Response 200 (application/json)
607
608 {
609 "cdn": false
610 }
611
612#### Update Subscriber cdn [PUT]
613
614+ Request 200 (application/json)
615
616 {
617 "cdn": false
618 }
619
620+ Response 200 (application/json)
621
622 {
623 "cdn": false
624 }
625
626#### Subscriber features uverse [/api/tenant/cord/subscriber/{subscriber_id}/features/uverse/]
627
628+ Parameters
629 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
630
631#### Read Subscriber uverse [GET]
632
633+ Response 200 (application/json)
634
635 {
636 "uverse": false
637 }
638
639#### Update Subscriber uverse [PUT]
640
641+ Request 200 (application/json)
642
643 {
644 "uverse": false
645 }
646
647+ Response 200 (application/json)
648
649 {
650 "uverse": false
651 }
652
653#### Subscriber features status [/api/tenant/cord/subscriber/{subscriber_id}/features/status/]
654
655+ Parameters
656 + subscriber_id: 1 (number) - ID of the Subscriber in the form of an integer
657
658#### Read Subscriber status [GET]
659
660+ Response 200 (application/json)
661
662 {
663 "status": "enabled"
664 }
665
666#### Update Subscriber status [PUT]
667
668+ Request 200 (application/json)
669
670 {
671 "status": "enabled"
672 }
673
674+ Response 200 (application/json)
675
676 {
677 "status": "enabled"
678 }
679
680
681# Group Truckroll
682
683Virtual Truckroll, enable to perform basic test on user connectivity such as ping, traceroute and tcpdump.
684
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700685## Truckroll Collection [/api/tenant/truckroll/{truckroll_id}/]
Teone620bafd2016-04-18 14:39:41 -0700686
687### List all Truckroll [GET]
688
689+ Response 200 (application/json)
690
691 [
692 {
693 "humanReadableName": "vTR-tenant-9",
694 "id": 9,
695 "provider_service": 6,
696 "target_id": 2,
697 "scope": "container",
698 "test": "ping",
699 "argument": "8.8.8.8",
700 "result": "",
701 "result_code": "",
702 "is_synced": false,
703 "backend_status": "2 - Exception('Unreachable results in ansible recipe',)"
704 }
705 ]
706
707### Create a Truckroll [POST]
708
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700709A virtual truckroll is complete once is_synced equal true
710
Teone620bafd2016-04-18 14:39:41 -0700711+ Request (application/json)
712
713 {
714 "target_id": 2,
715 "scope": "container",
716 "test": "ping",
717 "argument": "8.8.8.8"
718 }
719
720+ Response 201 (application/json)
721
722 {
723 "humanReadableName": "vTR-tenant-1",
724 "id": 1,
725 "provider_service": 6,
726 "target_id": 2,
727 "scope": "container",
728 "test": "ping",
729 "argument": "8.8.8.8",
730 "result": null,
731 "result_code": null,
732 "is_synced": false,
733 "backend_status": "0 - Provisioning in progress"
734 }
735
Teone620bafd2016-04-18 14:39:41 -0700736
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700737### View a Truckroll Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700738
739+ Parameters
740 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
741
Teone620bafd2016-04-18 14:39:41 -0700742+ Response 200 (application/json)
743
744 {
745 "humanReadableName": "vTR-tenant-10",
746 "id": 10,
747 "provider_service": 6,
748 "target_id": 2,
749 "scope": "container",
750 "test": "ping",
751 "argument": "8.8.8.8",
752 "result": null,
753 "result_code": null,
754 "is_synced": false,
755 "backend_status": "0 - Provisioning in progress"
756 }
757
758### Delete a Truckroll Detail [DELETE]
759
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700760+ Parameters
761 + truckroll_id: 1 (number) - ID of the Truckroll in the form of an integer
762
Teone620bafd2016-04-18 14:39:41 -0700763+ Response 204
764
765
766
767# Group vOLT
768
769OLT devices aggregate a set of subscriber connections
770
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700771## vOLT Collection [/api/tenant/cord/volt/{volt_id}/]
Teone620bafd2016-04-18 14:39:41 -0700772
773### List all vOLT [GET]
774
775+ Response 200 (application/json)
776
777 [
778 {
779 "humanReadableName": "vOLT-tenant-1",
780 "id": 1,
781 "service_specific_id": "123",
782 "s_tag": "222",
783 "c_tag": "432",
784 "subscriber": 1,
785 "related": {
786 "instance_id": 1,
787 "instance_name": "mysite_vcpe",
788 "vsg_id": 4,
789 "wan_container_ip": null,
790 "compute_node_name": "node2.opencloud.us"
791 }
792 }
793 ]
794
795### Create a vOLT [POST]
796
797+ Request (application/json)
798
799 {
800 "s_tag": "222",
801 "c_tag": "432",
802 "subscriber": 1
803 }
804
805+ Response 201 (application/json)
806
807 {
808 "humanReadableName": "vOLT-tenant-1",
809 "id": 1,
810 "service_specific_id": "123",
811 "s_tag": "222",
812 "c_tag": "432",
813 "subscriber": 1,
814 "related": {
815 "instance_id": 1,
816 "instance_name": "mysite_vcpe",
817 "vsg_id": 4,
818 "wan_container_ip": null,
819 "compute_node_name": "node2.opencloud.us"
820 }
821 }
822
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700823### View a vOLT Detail [GET]
Teone620bafd2016-04-18 14:39:41 -0700824
825+ Parameters
826 + volt_id: 1 (number) - ID of the vOLT in the form of an integer
827
Teone620bafd2016-04-18 14:39:41 -0700828+ Response 200 (application/json)
829
830 {
831 "humanReadableName": "vOLT-tenant-1",
832 "id": 1,
833 "service_specific_id": "123",
834 "s_tag": "222",
835 "c_tag": "432",
836 "subscriber": 1,
837 "related": {
838 "instance_id": 1,
839 "instance_name": "mysite_vcpe",
840 "vsg_id": 4,
841 "wan_container_ip": null,
842 "compute_node_name": "node2.opencloud.us"
843 }
844 }
845
846
847
848# Group ONOS Apps
849
Matteo Scandoloe25820a2016-04-27 17:31:11 -0700850## ONOS App Collection [/api/tenant/onos/app/]
Teone620bafd2016-04-18 14:39:41 -0700851
852### List all apps [GET]
853
854+ Response 200 (application/json)
855
856 [
857 {
858 "humanReadableName": "onos-tenant-7",
859 "id": 7,
860 "name": "vBNG_ONOS_app",
861 "dependencies": "org.onosproject.proxyarp, org.onosproject.virtualbng, org.onosproject.openflow, org.onosproject.fwd"
862 }
863 ]