Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US49481-Included handling of optional VNI and VID for network creation #82

Merged
merged 7 commits into from
May 2, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions v1/api/swagger/components/schemas/LocationInfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ required:
- Country
- Region
- DataCenter
- PrivateNetworkVIDRequired
- PrivateNetworkVNIRequired
properties:
ID:
type: string
Expand All @@ -22,3 +24,9 @@ properties:
type: string
example: FTC1
description: Data center descriptor
PrivateNetworkVIDRequired:
type: boolean
mchuang3 marked this conversation as resolved.
Show resolved Hide resolved
description: Indicates whether or not the fabric dedicated for private networks requires VLAN ID.
PrivateNetworkVNIRequired:
type: boolean
description: Indicates whether or not the fabric dedicated for private networks requires VNI ID.
6 changes: 6 additions & 0 deletions v1/api/swagger/components/schemas/NewNetwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ properties:
If not specified, the network uses the default IP pool allocated from the
hoster/project IP Pool factory and if specified, a new custom IP Pool will
be created and used for IP allocations.
VLAN:
type: integer
description: VLAN ID of the network
mchuang3 marked this conversation as resolved.
Show resolved Hide resolved
VNI:
type: integer
description: VNI ID of the network
mchuang3 marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 7 additions & 5 deletions v1/html/index.html

Large diffs are not rendered by default.

44 changes: 44 additions & 0 deletions v1/pkg/client/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2787,11 +2787,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand All @@ -2802,11 +2806,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand All @@ -2819,11 +2827,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
NumHosts: 4
NumCritical: 6
properties:
Expand Down Expand Up @@ -3152,11 +3164,15 @@ components:
Flavor: ubuntu
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
StorageInventory:
- FlavorID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
Capacity: 1
Expand Down Expand Up @@ -3338,6 +3354,7 @@ components:
- $ref: '#/components/schemas/Network_allOf'
NewNetwork:
example:
VNI: 6
Description: Private network for intra-cluster communication
NewIPPool:
NoProxy: localhost,15.10.0.10,test.com
Expand All @@ -3361,6 +3378,7 @@ components:
LocationID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
HostUse: Default
Purpose: Storage
VLAN: 0
Name: Private2
properties:
Name:
Expand All @@ -3383,6 +3401,12 @@ components:
$ref: '#/components/schemas/NetworkPurpose'
NewIPPool:
$ref: '#/components/schemas/NewIPPool'
VLAN:
description: VLAN ID of the network
type: integer
VNI:
description: VNI ID of the network
type: integer
required:
- LocationID
- Name
Expand Down Expand Up @@ -3820,11 +3844,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand Down Expand Up @@ -3931,11 +3959,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
- DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
NumHosts: 4
NumCritical: 6
properties:
Expand Down Expand Up @@ -4249,8 +4281,10 @@ components:
and data center description strings
example:
DataCenter: FTC1
PrivateNetworkVNIRequired: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDRequired: true
properties:
ID:
description: Unique ID for data center location
Expand All @@ -4266,10 +4300,20 @@ components:
description: Data center descriptor
example: FTC1
type: string
PrivateNetworkVIDRequired:
description: Indicates whether or not the fabric dedicated for private networks
requires VLAN ID.
type: boolean
PrivateNetworkVNIRequired:
description: Indicates whether or not the fabric dedicated for private networks
requires VNI ID.
type: boolean
required:
- Country
- DataCenter
- ID
- PrivateNetworkVIDRequired
- PrivateNetworkVNIRequired
- Region
type: object
AvailableNetwork:
Expand Down
2 changes: 2 additions & 0 deletions v1/pkg/client/docs/LocationInfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Name | Type | Description | Notes
**Country** | [**Country**](Country.md) | |
**Region** | **string** | Region within the indicated country |
**DataCenter** | **string** | Data center descriptor |
**PrivateNetworkVIDRequired** | **bool** | Indicates whether or not the fabric dedicated for private networks requires VLAN ID. |
**PrivateNetworkVNIRequired** | **bool** | Indicates whether or not the fabric dedicated for private networks requires VNI ID. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 2 additions & 0 deletions v1/pkg/client/docs/NewNetwork.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Name | Type | Description | Notes
**HostUse** | [**NetworkHostUse**](NetworkHostUse.md) | | [optional]
**Purpose** | [**NetworkPurpose**](NetworkPurpose.md) | | [optional]
**NewIPPool** | Pointer to [**NewIpPool**](NewIPPool.md) | | [optional]
**VLAN** | **int32** | VLAN ID of the network | [optional]
**VNI** | **int32** | VNI ID of the network | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
4 changes: 4 additions & 0 deletions v1/pkg/client/model_location_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ type LocationInfo struct {
Region string `json:"Region"`
// Data center descriptor
DataCenter string `json:"DataCenter"`
// Indicates whether or not the fabric dedicated for private networks requires VLAN ID.
PrivateNetworkVIDRequired bool `json:"PrivateNetworkVIDRequired"`
// Indicates whether or not the fabric dedicated for private networks requires VNI ID.
PrivateNetworkVNIRequired bool `json:"PrivateNetworkVNIRequired"`
}
4 changes: 4 additions & 0 deletions v1/pkg/client/model_new_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ type NewNetwork struct {
HostUse NetworkHostUse `json:"HostUse,omitempty"`
Purpose NetworkPurpose `json:"Purpose,omitempty"`
NewIPPool *NewIpPool `json:"NewIPPool,omitempty"`
// VLAN ID of the network
VLAN int32 `json:"VLAN,omitempty"`
// VNI ID of the network
VNI int32 `json:"VNI,omitempty"`
}