blob: e3a82e5076c4a1f65dc0a9dc48d35927842298e6 [file] [log] [blame]
Jian Lid3472bf2018-02-12 15:22:04 +09001{
2 "type": "object",
3 "description": "A subnet object.",
4 "required": [
Jian Li33361632018-02-23 18:14:54 +09005 "subnet"
Jian Lid3472bf2018-02-12 15:22:04 +09006 ],
7 "properties": {
Jian Li33361632018-02-23 18:14:54 +09008 "subnet": {
Jian Lid3472bf2018-02-12 15:22:04 +09009 "type": "object",
10 "required": [
Jian Li33361632018-02-23 18:14:54 +090011 "id",
Jian Lid3472bf2018-02-12 15:22:04 +090012 "enable_dhcp",
13 "network_id",
14 "tenant_id",
Jian Li33361632018-02-23 18:14:54 +090015 "cidr",
Jian Lid3472bf2018-02-12 15:22:04 +090016 "dns_nameservers",
17 "allocation_pools",
18 "host_routes",
19 "ip_version",
20 "gateway_ip",
21 "ipv6_address_mode",
22 "ipv6_ra_mode"
23 ],
24 "properties": {
Jian Li33361632018-02-23 18:14:54 +090025 "id": {
26 "type": "string",
27 "example": "2f245a7b-796b-4f26-9cf9-9e82d248fda7",
28 "description": "The ID of the subnet."
29 },
Jian Lid3472bf2018-02-12 15:22:04 +090030 "enable_dhcp": {
31 "type": "boolean",
32 "example": true,
33 "description": "Indicates whether dhcp is enabled or disabled for the subnet."
34 },
35 "network_id": {
36 "type": "string",
37 "example": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
38 "description": "The ID of the network to which the subnet belongs."
39 },
40 "tenant_id": {
41 "type": "string",
42 "example": "4fd44f30292945e481c7b8a0c8908869",
43 "description": "The ID of the project."
44 },
Jian Li33361632018-02-23 18:14:54 +090045 "cidr": {
46 "type": "string",
47 "example": "192.168.199.0/24",
48 "description": "The CIDR of the subnet."
49 },
Jian Lid3472bf2018-02-12 15:22:04 +090050 "dns_nameservers": {
51 "type": "array",
52 "description": "List of dns name servers associated with the subnet.",
53 "items": {
54 "type": "string",
55 "description": "A dns name server instance."
56 }
57 },
58 "allocation_pools": {
59 "type": "array",
60 "description": "Allocation pools with start and end IP addresses for this subnet.",
61 "items": {
62 "type": "object",
63 "description": "An allocation pool.",
64 "required": [
65 "start",
66 "end"
67 ],
68 "properties": {
69 "start": {
70 "type": "string",
71 "example": "192.168.199.2",
72 "description": "A start IP address for this subnet."
73 },
74 "end": {
75 "type": "string",
76 "example": "10.10.10.254",
77 "description": "An end IP address for this subnet."
78 }
79 }
80 }
81 },
82 "host_routes": {
83 "type": "array",
84 "description": "Additional routes for the subnet. A list of dictionaries with destination and nexthop parameters.",
85 "items": {
86 "type": "object",
87 "description": "A route for the subnet.",
88 "required": [
89 "destination",
90 "nexthop"
91 ],
92 "properties": {
93 "destination": {
94 "type": "string",
Jian Li33361632018-02-23 18:14:54 +090095 "example": "",
Jian Lid3472bf2018-02-12 15:22:04 +090096 "description": "The destination CIDR."
97 },
98 "nexthop": {
99 "type": "string",
Jian Li33361632018-02-23 18:14:54 +0900100 "example": "",
Jian Lid3472bf2018-02-12 15:22:04 +0900101 "description": "The IP address of the next hop for the corresponding destination."
102 }
103 }
104 }
105 },
106 "ip_version": {
107 "type": "integer",
108 "format": "int32",
109 "example": 4,
110 "description": "The IP protocol version. Value is 4 or 6."
111 },
112 "gateway_ip": {
113 "type": "string",
114 "example": "192.168.199.1",
115 "description": "Gateway IP of this subnet. If the value is null that implies no gateway is associated with the subnet."
116 },
117 "ipv6_address_mode": {
118 "type": "string",
Jian Li33361632018-02-23 18:14:54 +0900119 "example": "",
Jian Lid3472bf2018-02-12 15:22:04 +0900120 "description": "The IPv6 address modes specifies mechanisms for assigning IP addresses."
121 },
122 "ipv6_ra_mode": {
123 "type": "string",
Jian Li33361632018-02-23 18:14:54 +0900124 "example": "",
Jian Lid3472bf2018-02-12 15:22:04 +0900125 "description": "The IPv6 router advertisement specifies whether the networking service should transmit ICMPv6 packets, for a subnet."
126 }
127 }
128 }
129 }
130}