Revision 74f175ed
b/docs/design/cyclades-networking.rst | ||
---|---|---|
493 | 493 |
|
494 | 494 |
The body of the request contains only the id of the subnet that the router |
495 | 495 |
will be detached from. |
496 |
|
|
497 |
|
|
498 |
Floating IPs |
|
499 |
============ |
|
500 |
|
|
501 |
Floating IPs are addresses on external networks (and so can be defined only |
|
502 |
on networks on which the attribute `router:external` has been set to True). In |
|
503 |
the Neutron API, floating IPs are associated with specific ports and IP |
|
504 |
addresses on private networks and are used to allow an instance from a private |
|
505 |
network to access the external network. Cyclades are able to associate a |
|
506 |
floating IP with an instance without the restriction that the instance must |
|
507 |
already have a port and a private IP from a private network. In order to avoid |
|
508 |
this limitation of Neutron API, Cyclades are using a slightly modified and |
|
509 |
extended API. |
|
510 |
|
|
511 |
The attributes of floating IP objects are the following: |
|
512 |
|
|
513 |
* id: A string representing the UUID for the floating IP. |
|
514 |
* floating_network_id: The UUID of the external network with which the floating |
|
515 |
IP is associated. |
|
516 |
* floating_ip_address: The IPv4 address of the floating IP. |
|
517 |
* device_id: The UUID of the device that is associated with the floating IP. |
|
518 |
* router_id: The UUID of the router that is associated with this floating IP. |
|
519 |
* user_id/tenant_id: The UUID of the owner of the floating IP. |
|
520 |
|
|
521 |
Note: The `device_id` is not part of Neutron API. Instead the Neutron API uses |
|
522 |
the `port_id` and `fixed_ip_address` to associate the floating IP with a |
|
523 |
specific port and private address. |
|
524 |
|
|
525 |
Floating IPs are associated/de-associated with instances, using the |
|
526 |
'addfloatingip', and 'removefloatingip' server actions that are defined in the |
|
527 |
extensions of the OpenStack Compute API. When a floating IP is associated with |
|
528 |
a server the corresponding Port is automatically created, with device owner the |
|
529 |
floating IP. However these ports, exactly as with Router Ports, can not be |
|
530 |
managed with the Ports API. |
|
531 |
|
|
532 |
Create(reserve) a floating IP |
|
533 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
534 |
|
|
535 |
METHOD: POST |
|
536 |
|
|
537 |
URI: /floatingips |
|
538 |
|
|
539 |
The body of the request contains the id of the external network |
|
540 |
(`floating_network_id`). If no address is specified (`floating_ip_address`), |
|
541 |
an address will automatically be allocated from the pool addresses of the |
|
542 |
external network. |
|
543 |
|
|
544 |
List floating IPs |
|
545 |
^^^^^^^^^^^^^^^^^ |
|
546 |
|
|
547 |
METHOD: GET |
|
548 |
|
|
549 |
URI: /floatingips |
|
550 |
|
|
551 |
Show a floating IP |
|
552 |
^^^^^^^^^^^^^^^^^^ |
|
553 |
|
|
554 |
METHOD: GET |
|
555 |
|
|
556 |
URI: /floatingips/$(floatingip_id) |
|
557 |
|
|
558 |
Example response: |
|
559 |
|
|
560 |
.. code-block:: console |
|
561 |
|
|
562 |
{ |
|
563 |
"floatingip": { |
|
564 |
"id": "5923c02a-a162-4044-a432-9e52d6d819ce", |
|
565 |
"floating_ip_address": 192.168.1.227, |
|
566 |
"floating_network_id": 00983314-2f3c-43e9-acb0-9fd7cdb32231, |
|
567 |
"router_id": null, |
|
568 |
"device_id": 42, |
|
569 |
"tenant_id: "1012fd8c72284c00b133832cd179f896", |
|
570 |
"user_id": "1012fd8c72284c00b133832cd179f896" |
|
571 |
} |
|
572 |
} |
|
573 |
|
|
574 |
|
|
575 |
Delete a Floating IP |
|
576 |
^^^^^^^^^^^^^^^^^^^^ |
|
577 |
|
|
578 |
METHOD: DELETE |
|
579 |
|
|
580 |
URI: /floatingips/$(floatingip_id) |
|
581 |
|
|
582 |
This operation removes(releases) the floating IP. If it associated with a |
|
583 |
device(port), the port is automatically removed. |
|
584 |
|
|
585 |
Add Floating IP to server |
|
586 |
^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
587 |
|
|
588 |
METHOD: POST |
|
589 |
|
|
590 |
URI: server/$(server_id)/action |
|
591 |
|
|
592 |
Request: |
|
593 |
|
|
594 |
.. code-block:: console |
|
595 |
{ |
|
596 |
"addFloatingIp": { |
|
597 |
"address": "192.168.1.277" |
|
598 |
} |
|
599 |
} |
|
600 |
|
|
601 |
|
|
602 |
Remove Floating IP from server |
|
603 |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
604 |
|
|
605 |
METHOD: POST |
|
606 |
|
|
607 |
URI: servers/$(server_id)/action |
|
608 |
|
|
609 |
.. code-block:: console |
|
610 |
{ |
|
611 |
"removeFloatingIp": { |
|
612 |
"address": "192.168.1.277" |
|
613 |
} |
|
614 |
} |
Also available in: Unified diff