f-28: api: update api comportement and model
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
7065a9f431
commit
cef465da2e
2 changed files with 19 additions and 3 deletions
|
|
@ -315,7 +315,7 @@ components:
|
||||||
|
|
||||||
SubnetCreateRequest:
|
SubnetCreateRequest:
|
||||||
type: object
|
type: object
|
||||||
required: [name, vpc, vxlan_id, gateway_ip, cidr]
|
required: [name, vpc, gateway_ip, cidr]
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -325,9 +325,18 @@ components:
|
||||||
type: string
|
type: string
|
||||||
description: Parent VPC name
|
description: Parent VPC name
|
||||||
example: vpc1
|
example: vpc1
|
||||||
|
mode:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
Subnet mode. "vxlan" (default): creates a VXLAN tunnel and a host bridge.
|
||||||
|
"bridge": attaches directly to an existing bridge resolved from iface_type in the agent config.
|
||||||
|
"vlan" is reserved for future use.
|
||||||
|
enum: [vxlan, bridge]
|
||||||
|
default: vxlan
|
||||||
|
example: vxlan
|
||||||
vxlan_id:
|
vxlan_id:
|
||||||
type: integer
|
type: integer
|
||||||
description: VXLAN VNI identifier
|
description: VXLAN VNI identifier. Required when mode is "vxlan", ignored otherwise.
|
||||||
example: 100
|
example: 100
|
||||||
iface_type:
|
iface_type:
|
||||||
type: string
|
type: string
|
||||||
|
|
@ -356,12 +365,17 @@ components:
|
||||||
vpc:
|
vpc:
|
||||||
type: string
|
type: string
|
||||||
example: vpc1
|
example: vpc1
|
||||||
|
mode:
|
||||||
|
type: string
|
||||||
|
enum: [vxlan, bridge]
|
||||||
|
example: vxlan
|
||||||
vxlan_id:
|
vxlan_id:
|
||||||
type: integer
|
type: integer
|
||||||
|
description: VXLAN VNI. Present only when mode is "vxlan".
|
||||||
example: 100
|
example: 100
|
||||||
local_iface:
|
local_iface:
|
||||||
type: string
|
type: string
|
||||||
description: Resolved interface name
|
description: Resolved interface name from agent config
|
||||||
example: br-000000
|
example: br-000000
|
||||||
gateway_ip:
|
gateway_ip:
|
||||||
type: string
|
type: string
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ type VPC struct {
|
||||||
type SubnetCreateRequest struct {
|
type SubnetCreateRequest struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
VPC string `json:"vpc"`
|
VPC string `json:"vpc"`
|
||||||
|
Mode string `json:"mode"`
|
||||||
VxlanID int `json:"vxlan_id"`
|
VxlanID int `json:"vxlan_id"`
|
||||||
IfaceType string `json:"iface_type"`
|
IfaceType string `json:"iface_type"`
|
||||||
GatewayIP string `json:"gateway_ip"`
|
GatewayIP string `json:"gateway_ip"`
|
||||||
|
|
@ -22,6 +23,7 @@ type Subnet struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
State string `json:"state"`
|
State string `json:"state"`
|
||||||
VPC string `json:"vpc"`
|
VPC string `json:"vpc"`
|
||||||
|
Mode string `json:"mode"`
|
||||||
VxlanID int `json:"vxlan_id"`
|
VxlanID int `json:"vxlan_id"`
|
||||||
LocalIface string `json:"local_iface"`
|
LocalIface string `json:"local_iface"`
|
||||||
GatewayIP string `json:"gateway_ip"`
|
GatewayIP string `json:"gateway_ip"`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue