Jian Li | 2077f66 | 2018-02-12 14:01:35 +0900 | [diff] [blame] | 1 | { |
| 2 | "type": "object", |
| 3 | "required": [ |
| 4 | "port" |
| 5 | ], |
| 6 | "properties": { |
| 7 | "port": { |
| 8 | "type": "object", |
| 9 | "description": "A port object.", |
| 10 | "required": [ |
| 11 | "id", |
| 12 | "admin_state_up", |
| 13 | "device_id", |
| 14 | "device_owner", |
| 15 | "fixed_ips", |
| 16 | "allowed_address_pairs", |
| 17 | "mac_address", |
| 18 | "network_id", |
| 19 | "state", |
| 20 | "tenant_id", |
| 21 | "security_groups", |
| 22 | "extra_dhcp_opts", |
| 23 | "port_security_enabled", |
| 24 | "binding:host_id", |
| 25 | "binding:vif_type", |
| 26 | "binding:vif_details", |
| 27 | "binding:vnic_type", |
| 28 | "binding:profile" |
| 29 | |
| 30 | ], |
| 31 | "properties": { |
| 32 | "id": { |
| 33 | "type": "string", |
| 34 | "example": "65c0ee9f-d634-4522-8954-51021b570b0d", |
| 35 | "description": "The ID of the resource." |
| 36 | }, |
| 37 | "admin_state_up": { |
| 38 | "type": "boolean", |
| 39 | "example": true, |
| 40 | "description": "The administrative state of the resource, which is up (true) or down (false)." |
| 41 | }, |
| 42 | "device_id": { |
| 43 | "type": "string", |
| 44 | "example": "1", |
| 45 | "description": "The ID of the device that uses this port. For example, a server instance or a logical router." |
| 46 | }, |
| 47 | "device_owner": { |
| 48 | "type": "string", |
| 49 | "example": "compute:nova", |
| 50 | "description": "The entity type that uses this port. For example, compute:nova (server instance)." |
| 51 | }, |
| 52 | "fixed_ips": { |
| 53 | "type": "array", |
| 54 | "items": { |
| 55 | "type": "object", |
| 56 | "title": "fixed_ips", |
| 57 | "description": "The IP addresses for the port. If the port has multiple IP addresses, this field has multiple entries.", |
| 58 | "required": [ |
| 59 | "ip_address", |
| 60 | "subnet_id" |
| 61 | ], |
| 62 | "properties": { |
| 63 | "ip_address": { |
| 64 | "type": "string", |
| 65 | "example": "10.0.0.2", |
| 66 | "description": "The IP address of the port." |
| 67 | }, |
| 68 | "subnet_id": { |
| 69 | "type": "string", |
| 70 | "example": "a0304c3a-4f08-4c43-88af-d796509c97d2", |
| 71 | "description": "The ID of the subnet." |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | }, |
| 76 | "allowed_address_pairs": { |
| 77 | "type": "array", |
| 78 | "items": { |
| 79 | "type": "object", |
| 80 | "title": "allowed_address_pairs", |
| 81 | "description": "A set of zero or more allowed address pair objects each where address pair object contains an ip_address and mac_address.", |
| 82 | "required": [ |
| 83 | "ip_address", |
| 84 | "mac_address" |
| 85 | ], |
| 86 | "properties": { |
| 87 | "ip_address": { |
| 88 | "type": "string", |
| 89 | "example": "12.12.11.12", |
| 90 | "description": "The IP address of the port." |
| 91 | }, |
| 92 | "mac_address": { |
| 93 | "type": "string", |
| 94 | "example": "fa:14:2a:b3:cb:f0", |
| 95 | "description": "The MAC address of the port." |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 | }, |
| 100 | "mac_address": { |
| 101 | "type": "string", |
| 102 | "example": "fa:16:3e:c9:cb:f0", |
| 103 | "description": "The MAC address of the port." |
| 104 | }, |
| 105 | "network_id": { |
| 106 | "type": "string", |
| 107 | "example": "a87cc70a-3e15-4acf-8205-9b711a3531b7", |
| 108 | "description": "The ID of the attached network." |
| 109 | }, |
| 110 | "status": { |
| 111 | "type": "string", |
| 112 | "example": "ACTIVE", |
| 113 | "description": "The port status. Values are ACTIVE, DOWN, BUILD and ERROR." |
| 114 | }, |
| 115 | "tenant_id": { |
| 116 | "type": "string", |
| 117 | "example": "d6700c0c9ffa4f1cb322cd4a1f3906fa", |
| 118 | "description": "The ID of the project." |
| 119 | }, |
| 120 | "security_groups": { |
| 121 | "type": "array", |
| 122 | "items": { |
| 123 | "type": "string", |
| 124 | "example": "f0ac4394-7e4a-4409-9701-ba8be283dbc3", |
| 125 | "description": "The IDs of security groups applied to the port." |
| 126 | } |
| 127 | }, |
| 128 | "extra_dhcp_opts": { |
| 129 | "type": "array", |
| 130 | "items": { |
| 131 | "type": "object", |
| 132 | "title": "extra_dhcp_opts", |
| 133 | "description": "A set of zero or more extra DHCP option pairs. An option pair consists of an option value and name.", |
| 134 | "required": [ |
| 135 | "opt_value", |
| 136 | "opt_name" |
| 137 | ], |
| 138 | "properties": { |
| 139 | "opt_value": { |
| 140 | "type": "string", |
| 141 | "example": "pxelinux.0", |
| 142 | "description": "A value of option pair." |
| 143 | }, |
| 144 | "opt_name": { |
| 145 | "type": "string", |
| 146 | "example": "bootfile-name", |
| 147 | "description": "A name of option pair." |
| 148 | } |
| 149 | } |
| 150 | } |
| 151 | }, |
| 152 | "port_security_enabled": { |
| 153 | "type": "boolean", |
| 154 | "example": true, |
| 155 | "description": "The port security status. A valid value is enabled (true) or disabled (false)." |
| 156 | }, |
| 157 | "binding:host_id": { |
| 158 | "type": "string", |
| 159 | "example": "4df8d9ff-6f6f-438f-90a1-ef660d4586ad", |
| 160 | "description": "The ID of the host where the port resides." |
| 161 | }, |
| 162 | "binding:vif_type": { |
| 163 | "type": "string", |
| 164 | "example": "unbound", |
| 165 | "description": "The type of which mechanism is used for the port." |
| 166 | }, |
| 167 | "binding:vif_details": { |
| 168 | "type": "object", |
| 169 | "additionalProperties": { |
| 170 | "type": "string", |
| 171 | "example": "", |
| 172 | "description": "A dictionary which contains additional information on the port." |
| 173 | } |
| 174 | }, |
| 175 | "binding:vnic_type": { |
| 176 | "type": "string", |
| 177 | "example": "other", |
| 178 | "description": "The type of vNIC which this port should be attached to. This is used to determine which mechanism driver(s) to be used to bind the port." |
| 179 | }, |
| 180 | "binding:profile": { |
| 181 | "type": "object", |
| 182 | "additionalProperties": { |
| 183 | "type": "string", |
Jian Li | 3336163 | 2018-02-23 18:14:54 +0900 | [diff] [blame] | 184 | "example": "", |
Jian Li | 2077f66 | 2018-02-12 14:01:35 +0900 | [diff] [blame] | 185 | "description": "A dictionary that enables the application running on the specific host to pass and receive vif port information specific to the networking back-end." |
| 186 | } |
| 187 | } |
| 188 | } |
| 189 | } |
| 190 | } |
| 191 | } |