blob: 47d0f414f33e9155a4296b3a55855e3e9c6a85e6 [file] [log] [blame]
Jian Lid3472bf2018-02-12 15:22:04 +09001{
2 "type": "object",
3 "required": [
4 "router"
5 ],
6 "properties": {
7 "router": {
8 "type": "object",
9 "description": "A router object.",
10 "required": [
11 "id",
12 "name",
13 "status",
14 "external_gateway_info",
15 "admin_state_up",
16 "tenant_id",
17 "routes",
18 "distributed"
19 ],
20 "properties": {
21 "id": {
22 "type": "string",
23 "example": "f49a1319-423a-4ee6-ba54-1d95a4f6cc68",
24 "description": "The ID of the router."
25 },
26 "name": {
27 "type": "string",
28 "example": "router1",
29 "description": "Human-readable name of the resource."
30 },
31 "status": {
32 "type": "string",
33 "example": "ACTIVE",
34 "description": "The router status."
35 },
36 "external_gateway_info": {
37 "type": "object",
38 "description": "The external gateway information of the router.",
39 "required": [
40 "network_id",
41 "enable_snat"
42 ],
43 "properties": {
44 "network_id": {
45 "type": "string",
46 "example": "a87cc70a-3e15-4acf-8205-9b711a3531b7",
47 "description": "Network ID which the router gateway is connected to."
48 },
49 "enable_snat": {
50 "type": "boolean",
51 "example": false,
52 "description": "Enable Source NAT (SNAT) attribute. true means Network Address Translation (NAT) is enabled."
53 }
54 }
55 },
56 "admin_state_up": {
57 "type": "boolean",
58 "example": true,
59 "description": "The administrative state of the resource, which is up (true) or down (false)."
60 },
61 "tenant_id": {
62 "type": "string",
63 "example": "d6700c0c9ffa4f1cb322cd4a1f3906fa",
64 "description": "The ID of the project."
65 },
66 "routes": {
67 "type": "array",
68 "description": "The extra routes configuration for L3 router. A list of dictionaries with destination and nexthop parameters.",
69 "items": {
70 "type": "object",
71 "title": "route",
72 "required": [
73 "destination",
74 "nexthop"
75 ],
76 "properties": {
77 "destination": {
78 "type": "string",
79 "description": "The destination CIDR."
80 },
81 "nexthop": {
82 "type": "string",
83 "description": "The IP address of the next hop for the corresponding destination."
84 }
85 }
86 }
87 },
88 "distributed": {
89 "type": "boolean",
90 "example": false,
91 "description": "true indicates a distributed router. It is available when dvr extension is enabled."
92 }
93 }
94 }
95 }
96}