Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 1 | { |
| 2 | "type": "object", |
| 3 | "description": "A subnet object.", |
| 4 | "required": [ |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 5 | "subnet" |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 6 | ], |
| 7 | "properties": { |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 8 | "subnet": { |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 9 | "type": "object", |
| 10 | "required": [ |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 11 | "id", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 12 | "enable_dhcp", |
| 13 | "network_id", |
| 14 | "tenant_id", |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 15 | "cidr", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 16 | "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 Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 25 | "id": { |
| 26 | "type": "string", |
| 27 | "example": "2f245a7b-796b-4f26-9cf9-9e82d248fda7", |
| 28 | "description": "The ID of the subnet." |
| 29 | }, |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 30 | "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 Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 45 | "cidr": { |
| 46 | "type": "string", |
| 47 | "example": "192.168.199.0/24", |
| 48 | "description": "The CIDR of the subnet." |
| 49 | }, |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 50 | "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 Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 95 | "example": "", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 96 | "description": "The destination CIDR." |
| 97 | }, |
| 98 | "nexthop": { |
| 99 | "type": "string", |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 100 | "example": "", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 101 | "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 Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 119 | "example": "", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 120 | "description": "The IPv6 address modes specifies mechanisms for assigning IP addresses." |
| 121 | }, |
| 122 | "ipv6_ra_mode": { |
| 123 | "type": "string", |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 124 | "example": "", |
Jian Li | d3472bf | 2018-02-12 15:22:04 +0900 | [diff] [blame] | 125 | "description": "The IPv6 router advertisement specifies whether the networking service should transmit ICMPv6 packets, for a subnet." |
| 126 | } |
| 127 | } |
| 128 | } |
| 129 | } |
| 130 | } |