root / docs / design / cyclades-networking.rst @ d8e8581b
History | View | Annotate | Download (21.9 kB)
1 | a19cbc67 | Christos Stavrakakis | =================== |
---|---|---|---|
2 | a19cbc67 | Christos Stavrakakis | Cyclades Networking |
3 | a19cbc67 | Christos Stavrakakis | =================== |
4 | a19cbc67 | Christos Stavrakakis | |
5 | a19cbc67 | Christos Stavrakakis | Networks |
6 | a19cbc67 | Christos Stavrakakis | ======== |
7 | a19cbc67 | Christos Stavrakakis | |
8 | a19cbc67 | Christos Stavrakakis | A Cyclades network is a virtual network that can be, depending on it's Network |
9 | a19cbc67 | Christos Stavrakakis | Flavor, either an isolated Layer-2 broadcast domain or a Layer-3 network. |
10 | a19cbc67 | Christos Stavrakakis | Networks can either be private or public. Private networks are reserved for the |
11 | a19cbc67 | Christos Stavrakakis | user who created it, while public networks are created by the administrator and |
12 | a19cbc67 | Christos Stavrakakis | are visible to all users. Also, networks can be marked with the |
13 | a19cbc67 | Christos Stavrakakis | `--router:external` attribute to indicate that are external networks (public |
14 | a19cbc67 | Christos Stavrakakis | internet) |
15 | a19cbc67 | Christos Stavrakakis | |
16 | a19cbc67 | Christos Stavrakakis | Currently there are four available Networks Flavors: |
17 | a19cbc67 | Christos Stavrakakis | |
18 | a19cbc67 | Christos Stavrakakis | * IP_ONLY: A Layer-3 network where host routes traffic to the external network. |
19 | a19cbc67 | Christos Stavrakakis | * PHYSICAL_VLAN: A Layer-2 network where a physical VLAN is assigned to the |
20 | a19cbc67 | Christos Stavrakakis | network. |
21 | a19cbc67 | Christos Stavrakakis | * MAC_FILTERED: A Layer-2 network. All networks of this type share the same |
22 | a19cbc67 | Christos Stavrakakis | physical VLAN, but isolation is achieved by filtering rules based on a |
23 | a19cbc67 | Christos Stavrakakis | unique MAC prefix that is assigned to each network. |
24 | a19cbc67 | Christos Stavrakakis | |
25 | a19cbc67 | Christos Stavrakakis | The administrator can limit which networks can be created via API with the |
26 | a19cbc67 | Christos Stavrakakis | `API_ENABLED_NETOWRK_FLAVORS` setting. |
27 | a19cbc67 | Christos Stavrakakis | |
28 | a19cbc67 | Christos Stavrakakis | The attributes for network objects are the following: |
29 | a19cbc67 | Christos Stavrakakis | |
30 | a19cbc67 | Christos Stavrakakis | * id: A string representing the UUID for the network. |
31 | a19cbc67 | Christos Stavrakakis | * name: A human readable name. |
32 | a19cbc67 | Christos Stavrakakis | * status: String representing the state of the network. Possible values for the |
33 | a19cbc67 | Christos Stavrakakis | state include: ACTIVE, DOWN, BUILD, ERROR or 'SNF:DRAINED' (no new ports |
34 | a19cbc67 | Christos Stavrakakis | or floating IPs can be created from this network). |
35 | a19cbc67 | Christos Stavrakakis | * subnets: List of subnet UUIDs that are associated with this network. |
36 | a19cbc67 | Christos Stavrakakis | * public: Whether network is visible to other users or not. |
37 | a19cbc67 | Christos Stavrakakis | * user_id/tenant_id: The UUID of the owner of the network. |
38 | a19cbc67 | Christos Stavrakakis | * admin_state_up: Boolean value indicating the administrative state of the |
39 | a19cbc67 | Christos Stavrakakis | network. If 'down' the network does not forward packets. |
40 | a19cbc67 | Christos Stavrakakis | * router:external: Whether the network is connected to an external router or |
41 | a19cbc67 | Christos Stavrakakis | not. (/router API extension) |
42 | a19cbc67 | Christos Stavrakakis | * SNF:floating_ip_pool: Whether the network can be used to allocate floating |
43 | a19cbc67 | Christos Stavrakakis | IPs. |
44 | a19cbc67 | Christos Stavrakakis | |
45 | a19cbc67 | Christos Stavrakakis | Note: The 'admin_state_up' value is used only for compatibility with Neutron |
46 | a19cbc67 | Christos Stavrakakis | API. It will be read-only, and will always be True. |
47 | a19cbc67 | Christos Stavrakakis | |
48 | a19cbc67 | Christos Stavrakakis | Create a new network |
49 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^ |
50 | a19cbc67 | Christos Stavrakakis | |
51 | a19cbc67 | Christos Stavrakakis | Method: POST |
52 | a19cbc67 | Christos Stavrakakis | |
53 | a19cbc67 | Christos Stavrakakis | URI: /networks |
54 | a19cbc67 | Christos Stavrakakis | |
55 | a19cbc67 | Christos Stavrakakis | The body of the request must contain the 'type' of the network. Also it can |
56 | a19cbc67 | Christos Stavrakakis | contain a 'name' attribute. |
57 | a19cbc67 | Christos Stavrakakis | |
58 | a19cbc67 | Christos Stavrakakis | List Networks |
59 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^ |
60 | a19cbc67 | Christos Stavrakakis | |
61 | a19cbc67 | Christos Stavrakakis | Method: GET |
62 | a19cbc67 | Christos Stavrakakis | |
63 | a19cbc67 | Christos Stavrakakis | URI: /networks |
64 | a19cbc67 | Christos Stavrakakis | |
65 | a19cbc67 | Christos Stavrakakis | Get details about a network |
66 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
67 | a19cbc67 | Christos Stavrakakis | |
68 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
69 | a19cbc67 | Christos Stavrakakis | |
70 | a19cbc67 | Christos Stavrakakis | URI: /networks/$(network_id) |
71 | a19cbc67 | Christos Stavrakakis | |
72 | a19cbc67 | Christos Stavrakakis | Example response: |
73 | a19cbc67 | Christos Stavrakakis | |
74 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
75 | a19cbc67 | Christos Stavrakakis | | Field | Value | |
76 | a19cbc67 | Christos Stavrakakis | +=================+===================================+ |
77 | a19cbc67 | Christos Stavrakakis | | admin_state_up | True | |
78 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
79 | a19cbc67 | Christos Stavrakakis | | id | 42 | |
80 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
81 | a19cbc67 | Christos Stavrakakis | | name | Test_network | |
82 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
83 | a19cbc67 | Christos Stavrakakis | | network_type | MAC_FILTERED | |
84 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
85 | a19cbc67 | Christos Stavrakakis | | router:external | False | |
86 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
87 | a19cbc67 | Christos Stavrakakis | | public | False | |
88 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
89 | a19cbc67 | Christos Stavrakakis | | status | ACTIVE | |
90 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
91 | a19cbc67 | Christos Stavrakakis | | subnets | [] | |
92 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
93 | a19cbc67 | Christos Stavrakakis | | SNF:floating_ip | False | |
94 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
95 | a19cbc67 | Christos Stavrakakis | | user_id | 1012fd8c72284c00b133832cd179f896 | |
96 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
97 | a19cbc67 | Christos Stavrakakis | | tenant_id | 1012fd8c72284c00b133832cd179f896 | |
98 | a19cbc67 | Christos Stavrakakis | +-----------------+-----------------------------------+ |
99 | a19cbc67 | Christos Stavrakakis | |
100 | a19cbc67 | Christos Stavrakakis | Delete a network |
101 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
102 | a19cbc67 | Christos Stavrakakis | |
103 | a19cbc67 | Christos Stavrakakis | METHOD: DELETE |
104 | a19cbc67 | Christos Stavrakakis | |
105 | a19cbc67 | Christos Stavrakakis | URI: /networks/$(network_id) |
106 | a19cbc67 | Christos Stavrakakis | |
107 | a19cbc67 | Christos Stavrakakis | The network cannot be deleted if there are any Ports connected to it or |
108 | a19cbc67 | Christos Stavrakakis | any FloatingIPs reserved from this network. The subnets that are connected |
109 | a19cbc67 | Christos Stavrakakis | to this network are automatically deleted upon network deletion. |
110 | a19cbc67 | Christos Stavrakakis | |
111 | a19cbc67 | Christos Stavrakakis | Update a network |
112 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
113 | a19cbc67 | Christos Stavrakakis | |
114 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
115 | a19cbc67 | Christos Stavrakakis | |
116 | a19cbc67 | Christos Stavrakakis | URI: /networks/$(network_id) |
117 | a19cbc67 | Christos Stavrakakis | |
118 | a19cbc67 | Christos Stavrakakis | Only the name of the network can be updated. |
119 | a19cbc67 | Christos Stavrakakis | |
120 | a19cbc67 | Christos Stavrakakis | |
121 | a19cbc67 | Christos Stavrakakis | Subnets |
122 | a19cbc67 | Christos Stavrakakis | ======= |
123 | a19cbc67 | Christos Stavrakakis | |
124 | a19cbc67 | Christos Stavrakakis | A subnet represents L3-Layer characteristics of the network that is associated |
125 | a19cbc67 | Christos Stavrakakis | with. Specifically, it represents an IP address block that is used in order to |
126 | a19cbc67 | Christos Stavrakakis | assign addresses to virtual machines. A subnet is associated with a network |
127 | a19cbc67 | Christos Stavrakakis | when created. |
128 | a19cbc67 | Christos Stavrakakis | |
129 | a19cbc67 | Christos Stavrakakis | |
130 | a19cbc67 | Christos Stavrakakis | The attributes for subnet objects are the following: |
131 | a19cbc67 | Christos Stavrakakis | |
132 | a19cbc67 | Christos Stavrakakis | * id: A string representing the UUID for the subnet. |
133 | a19cbc67 | Christos Stavrakakis | * name: A human readable name. |
134 | a19cbc67 | Christos Stavrakakis | * network_id: The UUID of the network that the subnet is associated with. |
135 | a19cbc67 | Christos Stavrakakis | * ip_version: The IP version of the subnet. Can either be 4 or 6, default is 4. |
136 | a19cbc67 | Christos Stavrakakis | * cidr: cidr representing IP range for this subnet, based on the IP version. |
137 | a19cbc67 | Christos Stavrakakis | * gateway_ip: Default gateway used by devices in this subnet. If not specified |
138 | a19cbc67 | Christos Stavrakakis | the gateway will be the first available IP address. Set to None in order to |
139 | a19cbc67 | Christos Stavrakakis | get no gateway. |
140 | a19cbc67 | Christos Stavrakakis | * enable_dhcp(CR): Boolean value indicating whether nfdhcpd is enabled for this |
141 | a19cbc67 | Christos Stavrakakis | subnet or not. |
142 | a19cbc67 | Christos Stavrakakis | * enable_slaac: Boolean value indicating whether SLAAC is enabled for this |
143 | a19cbc67 | Christos Stavrakakis | subnet or not. |
144 | a19cbc67 | Christos Stavrakakis | * allocation_pools(CR): Subranges of cidr available for dynamic allocation. |
145 | a19cbc67 | Christos Stavrakakis | A list of dictionaries of the form {"start": "192.168.2.0", "end": 192.168.2.10"} |
146 | a19cbc67 | Christos Stavrakakis | * user_id/tenant_id: The UUID of the owner of the network. |
147 | a19cbc67 | Christos Stavrakakis | * host_routes(R): List of routes that should be used by devices with IPs from |
148 | a19cbc67 | Christos Stavrakakis | this subnet. |
149 | a19cbc67 | Christos Stavrakakis | * dns_nameservers(R): List of DNS name servers used by hosts in this subnet. |
150 | a19cbc67 | Christos Stavrakakis | |
151 | a19cbc67 | Christos Stavrakakis | Note: 'host_routes' and 'dns_nameservers' is used only for compatibility with |
152 | a19cbc67 | Christos Stavrakakis | Neutron. These values will be read-only and always be []. |
153 | a19cbc67 | Christos Stavrakakis | |
154 | a19cbc67 | Christos Stavrakakis | |
155 | a19cbc67 | Christos Stavrakakis | Create a Subnet |
156 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^ |
157 | a19cbc67 | Christos Stavrakakis | |
158 | a19cbc67 | Christos Stavrakakis | METHOD: POST |
159 | a19cbc67 | Christos Stavrakakis | |
160 | a19cbc67 | Christos Stavrakakis | URI: /subnets/ |
161 | a19cbc67 | Christos Stavrakakis | |
162 | a19cbc67 | Christos Stavrakakis | To create a subnet the user must specify the network_id and the cidr for the |
163 | a19cbc67 | Christos Stavrakakis | subnet. If the CIDR is an IPv6 subnet, the user must set the ip_version to 6. |
164 | a19cbc67 | Christos Stavrakakis | If allocation pools overlap, or gateway overlaps with allocation_pools then 409 |
165 | a19cbc67 | Christos Stavrakakis | conflict is returned. |
166 | a19cbc67 | Christos Stavrakakis | |
167 | a19cbc67 | Christos Stavrakakis | Finally, the user can create maximum one subnet of each ip_version, meaning |
168 | a19cbc67 | Christos Stavrakakis | that a network can have no subnets, or one IPv4 subnet or one IPv6 subnet, or |
169 | a19cbc67 | Christos Stavrakakis | one IPv4 and one IPv6 subnet. Also the user cannot create a subnet for a |
170 | a19cbc67 | Christos Stavrakakis | network that has or had a port connected to it. |
171 | a19cbc67 | Christos Stavrakakis | |
172 | a19cbc67 | Christos Stavrakakis | Note: Bulk creation of subnets, is not supported. |
173 | a19cbc67 | Christos Stavrakakis | |
174 | a19cbc67 | Christos Stavrakakis | List user subnets |
175 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^ |
176 | a19cbc67 | Christos Stavrakakis | |
177 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
178 | a19cbc67 | Christos Stavrakakis | |
179 | a19cbc67 | Christos Stavrakakis | URI: /subnets/ |
180 | a19cbc67 | Christos Stavrakakis | |
181 | a19cbc67 | Christos Stavrakakis | Get details about a subnet |
182 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
183 | a19cbc67 | Christos Stavrakakis | |
184 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
185 | a19cbc67 | Christos Stavrakakis | |
186 | a19cbc67 | Christos Stavrakakis | URI: /subnets/$(subnet_id) |
187 | a19cbc67 | Christos Stavrakakis | |
188 | a19cbc67 | Christos Stavrakakis | Example response: |
189 | a19cbc67 | Christos Stavrakakis | |
190 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
191 | a19cbc67 | Christos Stavrakakis | | Field | Value | |
192 | a19cbc67 | Christos Stavrakakis | +==================+==================================================+ |
193 | a19cbc67 | Christos Stavrakakis | | allocation_pools | {"start": "192.168.2.2", "end": "192.168.2.254"} | |
194 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
195 | a19cbc67 | Christos Stavrakakis | | cidr | 192.168.2.0/24 | |
196 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
197 | a19cbc67 | Christos Stavrakakis | | dns_nameservers | [] | |
198 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
199 | a19cbc67 | Christos Stavrakakis | | enable_dhcp | False | |
200 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
201 | a19cbc67 | Christos Stavrakakis | | gateway_ip | 192.168.2.1 | |
202 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
203 | a19cbc67 | Christos Stavrakakis | | host_routes | [] | |
204 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
205 | a19cbc67 | Christos Stavrakakis | | id | 49ce3872-446c-43e9-aa22-68dbc2bac0b5 | |
206 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
207 | a19cbc67 | Christos Stavrakakis | | ip_version | 4 | |
208 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
209 | a19cbc67 | Christos Stavrakakis | | name | test1 | |
210 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
211 | a19cbc67 | Christos Stavrakakis | | network_id | 8fc5e2bf-9c1b-4458-8f71-e38177ed23a5 | |
212 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
213 | a19cbc67 | Christos Stavrakakis | | tenant_id | 11a65261147d462b998eafb7f696f0ba | |
214 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
215 | a19cbc67 | Christos Stavrakakis | | user_id | 11a65261147d462b998eafb7f696f0ba | |
216 | a19cbc67 | Christos Stavrakakis | +------------------+--------------------------------------------------+ |
217 | a19cbc67 | Christos Stavrakakis | |
218 | a19cbc67 | Christos Stavrakakis | |
219 | a19cbc67 | Christos Stavrakakis | Delete a subnet |
220 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
221 | a19cbc67 | Christos Stavrakakis | |
222 | a19cbc67 | Christos Stavrakakis | METHOD: DELETE |
223 | a19cbc67 | Christos Stavrakakis | |
224 | a19cbc67 | Christos Stavrakakis | URI: /subnets/$(subnet_id) |
225 | a19cbc67 | Christos Stavrakakis | |
226 | a19cbc67 | Christos Stavrakakis | We do not allow deletion of subnets. Subnets will be deleted when the network |
227 | a19cbc67 | Christos Stavrakakis | is deleted. This call will return 400 (badRequest). |
228 | a19cbc67 | Christos Stavrakakis | |
229 | a19cbc67 | Christos Stavrakakis | |
230 | a19cbc67 | Christos Stavrakakis | Update a subnet |
231 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
232 | a19cbc67 | Christos Stavrakakis | |
233 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
234 | a19cbc67 | Christos Stavrakakis | |
235 | a19cbc67 | Christos Stavrakakis | URI: /subnets/$(subnet_id) |
236 | a19cbc67 | Christos Stavrakakis | |
237 | a19cbc67 | Christos Stavrakakis | |
238 | a19cbc67 | Christos Stavrakakis | Only the name of the subnet can be updated. This call will return 400 (badRequest) |
239 | a19cbc67 | Christos Stavrakakis | if the user tries to update any other field. |
240 | a19cbc67 | Christos Stavrakakis | |
241 | a19cbc67 | Christos Stavrakakis | |
242 | a19cbc67 | Christos Stavrakakis | Ports |
243 | a19cbc67 | Christos Stavrakakis | ===== |
244 | a19cbc67 | Christos Stavrakakis | |
245 | a19cbc67 | Christos Stavrakakis | A port represents a virtual switch port on a network switch. Virtual machines |
246 | a19cbc67 | Christos Stavrakakis | attach their interfaces to ports. A port that is connected to a network |
247 | a19cbc67 | Christos Stavrakakis | gets an IP address for each subnet that is associated with the network. If the |
248 | a19cbc67 | Christos Stavrakakis | network has no subnets, then the port will have no IP. |
249 | a19cbc67 | Christos Stavrakakis | |
250 | a19cbc67 | Christos Stavrakakis | |
251 | a19cbc67 | Christos Stavrakakis | The attributes for port objects are the following: |
252 | a19cbc67 | Christos Stavrakakis | |
253 | a19cbc67 | Christos Stavrakakis | * id: A string representing the UUID for the port. |
254 | a19cbc67 | Christos Stavrakakis | * network_id: The UUID of the network that this port is associated with. |
255 | a19cbc67 | Christos Stavrakakis | * name: A human readable name. |
256 | a19cbc67 | Christos Stavrakakis | * status: String representing the state of the port. Possible values for the |
257 | a19cbc67 | Christos Stavrakakis | state include: ACTIVE, DOWN, BUILD, ERROR. |
258 | a19cbc67 | Christos Stavrakakis | * mac_address: MAC address. |
259 | a19cbc67 | Christos Stavrakakis | * fixed_ips(R): List of dictionaries subnet_id->ip_address. |
260 | a19cbc67 | Christos Stavrakakis | * device_id(CR): Device using this port (VM id or Router id). |
261 | a19cbc67 | Christos Stavrakakis | * device_owner(CR): Entity using this port. e.g., network:router, |
262 | a19cbc67 | Christos Stavrakakis | network:router_gateway. |
263 | a19cbc67 | Christos Stavrakakis | * user_id/tenant_id: The UUID of the owner of the port. |
264 | a19cbc67 | Christos Stavrakakis | * security_groups(CRUD): List of security groups IDs associated with this port. |
265 | a19cbc67 | Christos Stavrakakis | * admin_state_up: Boolean value indicating the administrative state of the |
266 | a19cbc67 | Christos Stavrakakis | port. If 'down' the port does not forward packets. |
267 | a19cbc67 | Christos Stavrakakis | |
268 | a19cbc67 | Christos Stavrakakis | .. note:: Due to the way ports are implementing to Ganeti, a port will get an |
269 | a19cbc67 | Christos Stavrakakis | IPv6 address from a subnet only when the state of the port becomes 'ACTIVE'. |
270 | a19cbc67 | Christos Stavrakakis | |
271 | a19cbc67 | Christos Stavrakakis | .. note:: The 'admin_state_up' value is used only for compatibility with |
272 | a19cbc67 | Christos Stavrakakis | Neutron API. It will be read-only, and will always be True. |
273 | a19cbc67 | Christos Stavrakakis | |
274 | a19cbc67 | Christos Stavrakakis | Create a new Port |
275 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^ |
276 | a19cbc67 | Christos Stavrakakis | |
277 | a19cbc67 | Christos Stavrakakis | Method: POST |
278 | a19cbc67 | Christos Stavrakakis | |
279 | a19cbc67 | Christos Stavrakakis | URI: /ports |
280 | a19cbc67 | Christos Stavrakakis | |
281 | a19cbc67 | Christos Stavrakakis | The body of the request must contain the 'network_id' of the network that |
282 | a19cbc67 | Christos Stavrakakis | the port will be associated with. If the request contains a 'device_Id', the |
283 | a19cbc67 | Christos Stavrakakis | port will be connected to that device. |
284 | a19cbc67 | Christos Stavrakakis | |
285 | a19cbc67 | Christos Stavrakakis | The new port will get an IPv4 address from each of the subnets that are |
286 | a19cbc67 | Christos Stavrakakis | associated with that network. If the network has an IPv4 subnet the request |
287 | a19cbc67 | Christos Stavrakakis | can also contain the 'fixed_ips' attribute containing a specific IPv4 address |
288 | a19cbc67 | Christos Stavrakakis | to use. |
289 | a19cbc67 | Christos Stavrakakis | |
290 | a19cbc67 | Christos Stavrakakis | Creating a port to a public network is only supported if the user has a |
291 | a19cbc67 | Christos Stavrakakis | floating IP from this network (see /floatingips extension) and the 'fixed_ip' |
292 | a19cbc67 | Christos Stavrakakis | attribute of the request contains the IPv4 address of this floating IP. |
293 | a19cbc67 | Christos Stavrakakis | Otherwise, badRequest(400) is returned. |
294 | a19cbc67 | Christos Stavrakakis | |
295 | a19cbc67 | Christos Stavrakakis | Finally, the request can contain the following optional attributes: |
296 | a19cbc67 | Christos Stavrakakis | |
297 | a19cbc67 | Christos Stavrakakis | * security_groups |
298 | a19cbc67 | Christos Stavrakakis | * name |
299 | a19cbc67 | Christos Stavrakakis | |
300 | a19cbc67 | Christos Stavrakakis | Example request: |
301 | a19cbc67 | Christos Stavrakakis | |
302 | a19cbc67 | Christos Stavrakakis | .. code:: json |
303 | a19cbc67 | Christos Stavrakakis | |
304 | a19cbc67 | Christos Stavrakakis | {"port": { |
305 | a19cbc67 | Christos Stavrakakis | "name": "port1", |
306 | a19cbc67 | Christos Stavrakakis | "network_id": "42", |
307 | a19cbc67 | Christos Stavrakakis | "device_id": "2", |
308 | a19cbc67 | Christos Stavrakakis | "fixed_ips": [ |
309 | a19cbc67 | Christos Stavrakakis | { |
310 | a19cbc67 | Christos Stavrakakis | "ip_address": "192.168.2.20" |
311 | a19cbc67 | Christos Stavrakakis | } |
312 | a19cbc67 | Christos Stavrakakis | ] |
313 | a19cbc67 | Christos Stavrakakis | } |
314 | a19cbc67 | Christos Stavrakakis | |
315 | a19cbc67 | Christos Stavrakakis | |
316 | a19cbc67 | Christos Stavrakakis | |
317 | a19cbc67 | Christos Stavrakakis | List ports |
318 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^ |
319 | a19cbc67 | Christos Stavrakakis | |
320 | a19cbc67 | Christos Stavrakakis | Method: GET |
321 | a19cbc67 | Christos Stavrakakis | |
322 | a19cbc67 | Christos Stavrakakis | URI: /ports |
323 | a19cbc67 | Christos Stavrakakis | |
324 | a19cbc67 | Christos Stavrakakis | Get details about a port |
325 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
326 | a19cbc67 | Christos Stavrakakis | |
327 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
328 | a19cbc67 | Christos Stavrakakis | |
329 | a19cbc67 | Christos Stavrakakis | URI: /ports/$(port_id) |
330 | a19cbc67 | Christos Stavrakakis | |
331 | a19cbc67 | Christos Stavrakakis | Example response: |
332 | a19cbc67 | Christos Stavrakakis | |
333 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
334 | a19cbc67 | Christos Stavrakakis | | Field | Value | |
335 | a19cbc67 | Christos Stavrakakis | +=======================+=================================================================================+ |
336 | a19cbc67 | Christos Stavrakakis | | admin_state_up | True | |
337 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
338 | a19cbc67 | Christos Stavrakakis | | device_id | 39a02a66-33be-478a-8e9f-012141258678 | |
339 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
340 | a19cbc67 | Christos Stavrakakis | | device_owner | network:router_interface | |
341 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
342 | a19cbc67 | Christos Stavrakakis | | fixed_ips | {"subnet_id": "2313705f-68c1-4e16-80e3-c9fd8c0a5170", "ip_address": "10.0.2.1"} | |
343 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
344 | a19cbc67 | Christos Stavrakakis | | id | ff15e3fe-7b39-4adc-ae98-a7e29588977e | |
345 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
346 | a19cbc67 | Christos Stavrakakis | | mac_address | fa:16:3e:c1:63:06 | |
347 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
348 | a19cbc67 | Christos Stavrakakis | | name | "test_port" | |
349 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
350 | a19cbc67 | Christos Stavrakakis | | network_id | 2f04b49f-ca49-4b93-9139-11a4eca35fdd | |
351 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
352 | a19cbc67 | Christos Stavrakakis | | security_groups | [] | |
353 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
354 | a19cbc67 | Christos Stavrakakis | | status | DOWN | |
355 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
356 | a19cbc67 | Christos Stavrakakis | | tenant_id | 1012fd8c72284c00b133832cd179f896 | |
357 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
358 | a19cbc67 | Christos Stavrakakis | | user_id | 1012fd8c72284c00b133832cd179f896 | |
359 | a19cbc67 | Christos Stavrakakis | +-----------------------+---------------------------------------------------------------------------------+ |
360 | a19cbc67 | Christos Stavrakakis | |
361 | a19cbc67 | Christos Stavrakakis | Delete a port |
362 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
363 | a19cbc67 | Christos Stavrakakis | |
364 | a19cbc67 | Christos Stavrakakis | METHOD: DELETE |
365 | a19cbc67 | Christos Stavrakakis | |
366 | a19cbc67 | Christos Stavrakakis | URI: /ports/$(port_id) |
367 | a19cbc67 | Christos Stavrakakis | |
368 | a19cbc67 | Christos Stavrakakis | Deleting a port from a public network is only allowed if the port has |
369 | a19cbc67 | Christos Stavrakakis | been creating using a floating IP address. |
370 | a19cbc67 | Christos Stavrakakis | |
371 | a19cbc67 | Christos Stavrakakis | Update a port |
372 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
373 | a19cbc67 | Christos Stavrakakis | |
374 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
375 | a19cbc67 | Christos Stavrakakis | |
376 | a19cbc67 | Christos Stavrakakis | URI: /ports/$(port_id) |
377 | a19cbc67 | Christos Stavrakakis | |
378 | a19cbc67 | Christos Stavrakakis | Only the name of the port can be updated. |
379 | a19cbc67 | Christos Stavrakakis | |
380 | a19cbc67 | Christos Stavrakakis | |
381 | a19cbc67 | Christos Stavrakakis | |
382 | a19cbc67 | Christos Stavrakakis | Floating IPs |
383 | a19cbc67 | Christos Stavrakakis | ============ |
384 | a19cbc67 | Christos Stavrakakis | |
385 | a19cbc67 | Christos Stavrakakis | Floating IPs are addresses on external networks (and so can be defined only on |
386 | a19cbc67 | Christos Stavrakakis | networks on which the attribute `router:external` has been set to True) that |
387 | a19cbc67 | Christos Stavrakakis | are marked as floating IP pools (`SNF:floating_ip_pool`). In the Neutron API, |
388 | a19cbc67 | Christos Stavrakakis | floating IPs are associated with specific ports and IP addresses on private |
389 | a19cbc67 | Christos Stavrakakis | networks and are used to allow an instance from a private network to access the |
390 | a19cbc67 | Christos Stavrakakis | external network. Cyclades are able to associate a floating IP with an instance |
391 | a19cbc67 | Christos Stavrakakis | without the restriction that the instance must already have a port and a |
392 | a19cbc67 | Christos Stavrakakis | private IP from a private network. In order to avoid this limitation of Neutron |
393 | a19cbc67 | Christos Stavrakakis | API, Cyclades are using a slightly modified and extended API. |
394 | a19cbc67 | Christos Stavrakakis | |
395 | a19cbc67 | Christos Stavrakakis | The attributes of floating IP objects are the following: |
396 | a19cbc67 | Christos Stavrakakis | |
397 | a19cbc67 | Christos Stavrakakis | * id: A string representing the UUID for the floating IP. |
398 | a19cbc67 | Christos Stavrakakis | * floating_network_id: The UUID of the external network with which the floating |
399 | a19cbc67 | Christos Stavrakakis | IP is associated. |
400 | a19cbc67 | Christos Stavrakakis | * floating_ip_address: The IPv4 address of the floating IP. |
401 | a19cbc67 | Christos Stavrakakis | * fixed_ip_address: The value of this option is always `None`. |
402 | a19cbc67 | Christos Stavrakakis | * port_id: The port that is currently using this floating IP. |
403 | a19cbc67 | Christos Stavrakakis | * instance_id: The device that is currently using this floating IP. |
404 | a19cbc67 | Christos Stavrakakis | * user_id/tenant_id: The UUID of the owner of the floating IP. |
405 | a19cbc67 | Christos Stavrakakis | |
406 | a19cbc67 | Christos Stavrakakis | |
407 | a19cbc67 | Christos Stavrakakis | Floating IPs can be used via the /ports API. In order to attach a floating IP |
408 | a19cbc67 | Christos Stavrakakis | to a server, the user must create a port that specified the IPv4 address |
409 | a19cbc67 | Christos Stavrakakis | of the floating IP in the `fixed_ips` attribute of the port creation request. |
410 | a19cbc67 | Christos Stavrakakis | Also, the floating IP can be detached from the server by destroying the |
411 | a19cbc67 | Christos Stavrakakis | port that the floating IP is attached to. |
412 | a19cbc67 | Christos Stavrakakis | |
413 | a19cbc67 | Christos Stavrakakis | Create(reserve) a floating IP |
414 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
415 | a19cbc67 | Christos Stavrakakis | |
416 | a19cbc67 | Christos Stavrakakis | METHOD: POST |
417 | a19cbc67 | Christos Stavrakakis | |
418 | a19cbc67 | Christos Stavrakakis | URI: /floatingips |
419 | a19cbc67 | Christos Stavrakakis | |
420 | a19cbc67 | Christos Stavrakakis | The body of the request contains the id of the external network |
421 | a19cbc67 | Christos Stavrakakis | (`floating_network_id`). If no address is specified (`floating_ip_address`), |
422 | a19cbc67 | Christos Stavrakakis | an address will automatically be allocated from the pool addresses of the |
423 | a19cbc67 | Christos Stavrakakis | external network. |
424 | a19cbc67 | Christos Stavrakakis | |
425 | a19cbc67 | Christos Stavrakakis | List floating IPs |
426 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^ |
427 | a19cbc67 | Christos Stavrakakis | |
428 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
429 | a19cbc67 | Christos Stavrakakis | |
430 | a19cbc67 | Christos Stavrakakis | URI: /floatingips |
431 | a19cbc67 | Christos Stavrakakis | |
432 | a19cbc67 | Christos Stavrakakis | Show a floating IP |
433 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^ |
434 | a19cbc67 | Christos Stavrakakis | |
435 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
436 | a19cbc67 | Christos Stavrakakis | |
437 | a19cbc67 | Christos Stavrakakis | URI: /floatingips/$(floatingip_id) |
438 | a19cbc67 | Christos Stavrakakis | |
439 | a19cbc67 | Christos Stavrakakis | Example response: |
440 | a19cbc67 | Christos Stavrakakis | |
441 | a19cbc67 | Christos Stavrakakis | .. code-block:: console |
442 | a19cbc67 | Christos Stavrakakis | |
443 | a19cbc67 | Christos Stavrakakis | { |
444 | a19cbc67 | Christos Stavrakakis | "floatingip": { |
445 | a19cbc67 | Christos Stavrakakis | "id": "5923c02a-a162-4044-a432-9e52d6d819ce", |
446 | a19cbc67 | Christos Stavrakakis | "floating_ip_address": 192.168.1.227, |
447 | a19cbc67 | Christos Stavrakakis | "floating_network_id": 00983314-2f3c-43e9-acb0-9fd7cdb32231, |
448 | a19cbc67 | Christos Stavrakakis | "router_id": null, |
449 | a19cbc67 | Christos Stavrakakis | "device_id": 42, |
450 | a19cbc67 | Christos Stavrakakis | "tenant_id: "1012fd8c72284c00b133832cd179f896", |
451 | a19cbc67 | Christos Stavrakakis | "user_id": "1012fd8c72284c00b133832cd179f896" |
452 | a19cbc67 | Christos Stavrakakis | } |
453 | a19cbc67 | Christos Stavrakakis | } |
454 | a19cbc67 | Christos Stavrakakis | |
455 | a19cbc67 | Christos Stavrakakis | |
456 | a19cbc67 | Christos Stavrakakis | Delete a Floating IP |
457 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^ |
458 | a19cbc67 | Christos Stavrakakis | |
459 | a19cbc67 | Christos Stavrakakis | METHOD: DELETE |
460 | a19cbc67 | Christos Stavrakakis | |
461 | a19cbc67 | Christos Stavrakakis | URI: /floatingips/$(floatingip_id) |
462 | a19cbc67 | Christos Stavrakakis | |
463 | a19cbc67 | Christos Stavrakakis | This operation removes(releases) the floating IP. If it associated with a |
464 | a19cbc67 | Christos Stavrakakis | device(port), the port is automatically removed. |
465 | a19cbc67 | Christos Stavrakakis | |
466 | a19cbc67 | Christos Stavrakakis | |
467 | a19cbc67 | Christos Stavrakakis | Routers |
468 | a19cbc67 | Christos Stavrakakis | ======= |
469 | a19cbc67 | Christos Stavrakakis | |
470 | a19cbc67 | Christos Stavrakakis | |
471 | a19cbc67 | Christos Stavrakakis | .. note:: This section contains a draft design document for virtual routers, |
472 | a19cbc67 | Christos Stavrakakis | and currently there is no implementation for this API. |
473 | a19cbc67 | Christos Stavrakakis | |
474 | a19cbc67 | Christos Stavrakakis | A router is a logical entity that can be used to: |
475 | a19cbc67 | Christos Stavrakakis | |
476 | a19cbc67 | Christos Stavrakakis | * interconnect subnets and forward traffic among them, and |
477 | a19cbc67 | Christos Stavrakakis | * NAT internal traffic to external networks. |
478 | a19cbc67 | Christos Stavrakakis | |
479 | a19cbc67 | Christos Stavrakakis | A router is associated with subnets through interfaces. The router gets an |
480 | a19cbc67 | Christos Stavrakakis | interface with each subnet that is associated with. By default, the IP address |
481 | a19cbc67 | Christos Stavrakakis | of such interface is the gateway of the subnet. Besides the interfaces, the |
482 | a19cbc67 | Christos Stavrakakis | router also gets a Port for each network that is associated with (through |
483 | a19cbc67 | Christos Stavrakakis | the corresponding subnets). These ports are created automatically when |
484 | a19cbc67 | Christos Stavrakakis | interfaces are added to the router, have as device_owner the router, and |
485 | a19cbc67 | Christos Stavrakakis | can not be managed with the Port API. |
486 | a19cbc67 | Christos Stavrakakis | |
487 | a19cbc67 | Christos Stavrakakis | Besides the internal subnets, the router, can also be associated with an |
488 | a19cbc67 | Christos Stavrakakis | external network in order to NAT traffic from internal networks to the external |
489 | a19cbc67 | Christos Stavrakakis | one. The id of the external network is specified in the `external_gateway_info` |
490 | a19cbc67 | Christos Stavrakakis | attribute of the network, and a port will be created for the router with an |
491 | a19cbc67 | Christos Stavrakakis | IP address from the range of the public network. Besides the network id, the |
492 | a19cbc67 | Christos Stavrakakis | user can also specify a floating IP from this network, to use as the router IP. |
493 | a19cbc67 | Christos Stavrakakis | This port can also not be managed with the Port API. |
494 | a19cbc67 | Christos Stavrakakis | |
495 | a19cbc67 | Christos Stavrakakis | The attributes for Router objects are the following: |
496 | a19cbc67 | Christos Stavrakakis | |
497 | a19cbc67 | Christos Stavrakakis | * id: A string representing the UUID for the router. |
498 | a19cbc67 | Christos Stavrakakis | * name: A human readable name. |
499 | a19cbc67 | Christos Stavrakakis | * status: String representing the state of the network. Possible values for the |
500 | a19cbc67 | Christos Stavrakakis | state include: ACTIVE, DOWN, BUILD, ERROR. |
501 | a19cbc67 | Christos Stavrakakis | * user_id/tenant_id: The UUID of the owner of the router. |
502 | a19cbc67 | Christos Stavrakakis | * admin_state_up: Boolean value indicating the administrative state of the |
503 | a19cbc67 | Christos Stavrakakis | router. If 'down' the router does not forward packets. |
504 | a19cbc67 | Christos Stavrakakis | * external_gateway_info: Dictionary with the information about the external |
505 | a19cbc67 | Christos Stavrakakis | gateway for the router. |
506 | a19cbc67 | Christos Stavrakakis | |
507 | a19cbc67 | Christos Stavrakakis | Create a new router |
508 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^ |
509 | a19cbc67 | Christos Stavrakakis | |
510 | a19cbc67 | Christos Stavrakakis | Method: POST |
511 | a19cbc67 | Christos Stavrakakis | |
512 | a19cbc67 | Christos Stavrakakis | URI: /routers |
513 | a19cbc67 | Christos Stavrakakis | |
514 | a19cbc67 | Christos Stavrakakis | The body of the request contains the name of the router. The new router that |
515 | a19cbc67 | Christos Stavrakakis | is created does not have any internal interface and so it is not associated |
516 | a19cbc67 | Christos Stavrakakis | with any subnet. |
517 | a19cbc67 | Christos Stavrakakis | |
518 | a19cbc67 | Christos Stavrakakis | Also, the used can specify an external gateway for the router at create time. |
519 | a19cbc67 | Christos Stavrakakis | This is done by specifying the network_id in the `external_gateway_info` |
520 | a19cbc67 | Christos Stavrakakis | attribute. This network must have the attribute `router:external` set to |
521 | a19cbc67 | Christos Stavrakakis | `True`. Besides the id of the network, the used can also specify one of his |
522 | a19cbc67 | Christos Stavrakakis | floating IPs to use. An example request is the following |
523 | a19cbc67 | Christos Stavrakakis | |
524 | a19cbc67 | Christos Stavrakakis | |
525 | a19cbc67 | Christos Stavrakakis | .. code-block:: console |
526 | a19cbc67 | Christos Stavrakakis | |
527 | a19cbc67 | Christos Stavrakakis | { |
528 | a19cbc67 | Christos Stavrakakis | "router": |
529 | a19cbc67 | Christos Stavrakakis | { |
530 | a19cbc67 | Christos Stavrakakis | "name": "example_router", |
531 | a19cbc67 | Christos Stavrakakis | "external_gateway_info": |
532 | a19cbc67 | Christos Stavrakakis | { |
533 | a19cbc67 | Christos Stavrakakis | "network_id": "42", |
534 | a19cbc67 | Christos Stavrakakis | "floating_ip_id": "142" |
535 | a19cbc67 | Christos Stavrakakis | } |
536 | a19cbc67 | Christos Stavrakakis | } |
537 | a19cbc67 | Christos Stavrakakis | } |
538 | a19cbc67 | Christos Stavrakakis | |
539 | a19cbc67 | Christos Stavrakakis | List routers |
540 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^ |
541 | a19cbc67 | Christos Stavrakakis | |
542 | a19cbc67 | Christos Stavrakakis | Method: GET |
543 | a19cbc67 | Christos Stavrakakis | |
544 | a19cbc67 | Christos Stavrakakis | URI: /routers |
545 | a19cbc67 | Christos Stavrakakis | |
546 | a19cbc67 | Christos Stavrakakis | Get details about a router |
547 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
548 | a19cbc67 | Christos Stavrakakis | |
549 | a19cbc67 | Christos Stavrakakis | METHOD: GET |
550 | a19cbc67 | Christos Stavrakakis | |
551 | a19cbc67 | Christos Stavrakakis | URI: /routers/$(router_id) |
552 | a19cbc67 | Christos Stavrakakis | |
553 | a19cbc67 | Christos Stavrakakis | Example response: |
554 | a19cbc67 | Christos Stavrakakis | |
555 | a19cbc67 | Christos Stavrakakis | .. code-block:: console |
556 | a19cbc67 | Christos Stavrakakis | |
557 | a19cbc67 | Christos Stavrakakis | { |
558 | a19cbc67 | Christos Stavrakakis | "id": "5", |
559 | a19cbc67 | Christos Stavrakakis | "name": "example_router", |
560 | a19cbc67 | Christos Stavrakakis | "status": "ACTIVE", |
561 | a19cbc67 | Christos Stavrakakis | "user_id": "1012fd8c72284c00b133832cd179f896", |
562 | a19cbc67 | Christos Stavrakakis | "tenant_id": "1012fd8c72284c00b133832cd179f896", |
563 | a19cbc67 | Christos Stavrakakis | "external_gateway_info": { |
564 | a19cbc67 | Christos Stavrakakis | "network_id": "42", |
565 | a19cbc67 | Christos Stavrakakis | "floating_ip_id": "142" |
566 | a19cbc67 | Christos Stavrakakis | } |
567 | a19cbc67 | Christos Stavrakakis | } |
568 | a19cbc67 | Christos Stavrakakis | |
569 | a19cbc67 | Christos Stavrakakis | Delete a router |
570 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
571 | a19cbc67 | Christos Stavrakakis | |
572 | a19cbc67 | Christos Stavrakakis | METHOD: DELETE |
573 | a19cbc67 | Christos Stavrakakis | |
574 | a19cbc67 | Christos Stavrakakis | URI: /routers/$(router_id) |
575 | a19cbc67 | Christos Stavrakakis | |
576 | a19cbc67 | Christos Stavrakakis | This operation removes a logical router; |
577 | a19cbc67 | Christos Stavrakakis | the operation will fail if the router still has some internal interfaces. |
578 | a19cbc67 | Christos Stavrakakis | |
579 | a19cbc67 | Christos Stavrakakis | Update a router |
580 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^ |
581 | a19cbc67 | Christos Stavrakakis | |
582 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
583 | a19cbc67 | Christos Stavrakakis | |
584 | a19cbc67 | Christos Stavrakakis | URI: /routers/$(router_id) |
585 | a19cbc67 | Christos Stavrakakis | |
586 | a19cbc67 | Christos Stavrakakis | Only the `name` of the router and the `external_gateway_info` can be updated. |
587 | a19cbc67 | Christos Stavrakakis | |
588 | a19cbc67 | Christos Stavrakakis | Add interface to router |
589 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^ |
590 | a19cbc67 | Christos Stavrakakis | |
591 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
592 | a19cbc67 | Christos Stavrakakis | |
593 | a19cbc67 | Christos Stavrakakis | URI: /routers/$(router_id)/add_router_interface |
594 | a19cbc67 | Christos Stavrakakis | |
595 | a19cbc67 | Christos Stavrakakis | The body of the request contains only the id of the subnet that the router |
596 | a19cbc67 | Christos Stavrakakis | will be associated to. |
597 | a19cbc67 | Christos Stavrakakis | |
598 | a19cbc67 | Christos Stavrakakis | Remove interface from router |
599 | a19cbc67 | Christos Stavrakakis | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
600 | a19cbc67 | Christos Stavrakakis | |
601 | a19cbc67 | Christos Stavrakakis | METHOD: PUT |
602 | a19cbc67 | Christos Stavrakakis | |
603 | a19cbc67 | Christos Stavrakakis | URI: /routers/$(router_id)/remove_router_interface |
604 | a19cbc67 | Christos Stavrakakis | |
605 | a19cbc67 | Christos Stavrakakis | The body of the request contains only the id of the subnet that the router |
606 | a19cbc67 | Christos Stavrakakis | will be detached from. |
607 | a19cbc67 | Christos Stavrakakis | |
608 | a19cbc67 | Christos Stavrakakis | |
609 | a19cbc67 | Christos Stavrakakis | |
610 | a19cbc67 | Christos Stavrakakis | |
611 | a19cbc67 | Christos Stavrakakis | General Implementation Details |
612 | a19cbc67 | Christos Stavrakakis | ============================== |
613 | a19cbc67 | Christos Stavrakakis | |
614 | a19cbc67 | Christos Stavrakakis | Creation of a network corresponds to only creating a Network object in the |
615 | a19cbc67 | Christos Stavrakakis | Cyclades DB. Also, creation of a subnet corresponds to creation of a Subnet in |
616 | a19cbc67 | Christos Stavrakakis | the Cyclades DB and the of the corresponding allocation pools. The Ganeti |
617 | a19cbc67 | Christos Stavrakakis | network will only be created in the Ganeti backend when a port is connected to |
618 | a19cbc67 | Christos Stavrakakis | this network. Updating fields of Ganeti networks is really hard (e.g., |
619 | a19cbc67 | Christos Stavrakakis | changing the dhcp option) or impossible (e.g., changing the subnet). For this |
620 | a19cbc67 | Christos Stavrakakis | reason, if the network has been created in a Ganeti backend, then it will be |
621 | a19cbc67 | Christos Stavrakakis | marked as read-only! |
622 | a19cbc67 | Christos Stavrakakis | |
623 | a19cbc67 | Christos Stavrakakis | A port is mapped to a Ganeti NIC directly. The port will be created in DB in |
624 | a19cbc67 | Christos Stavrakakis | the "BUILD" state and an OP_INSTANCE_MODIFY will be issued to Ganeti to create |
625 | a19cbc67 | Christos Stavrakakis | the NIC in the specified VM. When the job successfully completes, the NIC will |
626 | a19cbc67 | Christos Stavrakakis | be updated to state "ACTIVE" in the DB. Also the MAC address that was allocated |
627 | a19cbc67 | Christos Stavrakakis | from Ganeti will be stored in the updated NIC. |