blob: 3a44ff422cc6733f5b5d5137f408f538703efe71 [file] [log] [blame]
Jian Lid3472bf2018-02-12 15:22:04 +09001{
2 "type": "object",
3 "description": "A subnet object.",
4 "required": [
5 "subnets"
6 ],
7 "properties": {
8 "subnets": {
9 "type": "object",
10 "required": [
11 "enable_dhcp",
12 "network_id",
13 "tenant_id",
14 "dns_nameservers",
15 "allocation_pools",
16 "host_routes",
17 "ip_version",
18 "gateway_ip",
19 "ipv6_address_mode",
20 "ipv6_ra_mode"
21 ],
22 "properties": {
23 "enable_dhcp": {
24 "type": "boolean",
25 "example": true,
26 "description": "Indicates whether dhcp is enabled or disabled for the subnet."
27 },
28 "network_id": {
29 "type": "string",
30 "example": "d32019d3-bc6e-4319-9c1d-6722fc136a22",
31 "description": "The ID of the network to which the subnet belongs."
32 },
33 "tenant_id": {
34 "type": "string",
35 "example": "4fd44f30292945e481c7b8a0c8908869",
36 "description": "The ID of the project."
37 },
38 "dns_nameservers": {
39 "type": "array",
40 "description": "List of dns name servers associated with the subnet.",
41 "items": {
42 "type": "string",
43 "description": "A dns name server instance."
44 }
45 },
46 "allocation_pools": {
47 "type": "array",
48 "description": "Allocation pools with start and end IP addresses for this subnet.",
49 "items": {
50 "type": "object",
51 "description": "An allocation pool.",
52 "required": [
53 "start",
54 "end"
55 ],
56 "properties": {
57 "start": {
58 "type": "string",
59 "example": "192.168.199.2",
60 "description": "A start IP address for this subnet."
61 },
62 "end": {
63 "type": "string",
64 "example": "10.10.10.254",
65 "description": "An end IP address for this subnet."
66 }
67 }
68 }
69 },
70 "host_routes": {
71 "type": "array",
72 "description": "Additional routes for the subnet. A list of dictionaries with destination and nexthop parameters.",
73 "items": {
74 "type": "object",
75 "description": "A route for the subnet.",
76 "required": [
77 "destination",
78 "nexthop"
79 ],
80 "properties": {
81 "destination": {
82 "type": "string",
83 "description": "The destination CIDR."
84 },
85 "nexthop": {
86 "type": "string",
87 "description": "The IP address of the next hop for the corresponding destination."
88 }
89 }
90 }
91 },
92 "ip_version": {
93 "type": "integer",
94 "format": "int32",
95 "example": 4,
96 "description": "The IP protocol version. Value is 4 or 6."
97 },
98 "gateway_ip": {
99 "type": "string",
100 "example": "192.168.199.1",
101 "description": "Gateway IP of this subnet. If the value is null that implies no gateway is associated with the subnet."
102 },
103 "ipv6_address_mode": {
104 "type": "string",
105 "description": "The IPv6 address modes specifies mechanisms for assigning IP addresses."
106 },
107 "ipv6_ra_mode": {
108 "type": "string",
109 "description": "The IPv6 router advertisement specifies whether the networking service should transmit ICMPv6 packets, for a subnet."
110 }
111 }
112 }
113 }
114}