Skip to content

Commit

Permalink
US49481-Included handling of optional VNI and VID for network creation (
Browse files Browse the repository at this point in the history
#82)

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

* [auto generated] Checking in generated offline HTML doc

* US49481-Fixed lint

* US49481-Implemented review comments

* [auto generated] Checking in generated offline HTML doc

* US49481-Implemented review comments

* [auto generated] Checking in generated offline HTML doc

---------

Co-authored-by: dbozzato81 <dbozzato81@users.noreply.github.com>
  • Loading branch information
dbozzato81 and dbozzato81 authored May 2, 2023
1 parent b1464cc commit c8c9c49
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 5 deletions.
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
- PrivateNetworkVIDSupport
- PrivateNetworkVNISupport
properties:
ID:
type: string
Expand All @@ -22,3 +24,9 @@ properties:
type: string
example: FTC1
description: Data center descriptor
PrivateNetworkVIDSupport:
type: boolean
description: Indicates whether or not the fabric dedicated for private networks supports VLAN ID.
PrivateNetworkVNISupport:
type: boolean
description: Indicates whether or not the fabric dedicated for private networks supports 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: Optional VLAN ID of the network. If not specified, it is allocated from reserved pool.
VNI:
type: integer
description: Optional VNI ID of the network. If not specified, it is allocated from reserved pool if required.
12 changes: 7 additions & 5 deletions v1/html/index.html

Large diffs are not rendered by default.

46 changes: 46 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
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand All @@ -2802,11 +2806,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand All @@ -2819,11 +2827,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
NumHosts: 4
NumCritical: 6
properties:
Expand Down Expand Up @@ -3152,11 +3164,15 @@ components:
Flavor: ubuntu
Locations:
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: 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,14 @@ components:
$ref: '#/components/schemas/NetworkPurpose'
NewIPPool:
$ref: '#/components/schemas/NewIPPool'
VLAN:
description: Optional VLAN ID of the network. If not specified, it is allocated
from reserved pool.
type: integer
VNI:
description: Optional VNI ID of the network. If not specified, it is allocated
from reserved pool if required.
type: integer
required:
- LocationID
- Name
Expand Down Expand Up @@ -3820,11 +3846,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
NumHosts: 0
ID: ID
NumNetworks: 5
Expand Down Expand Up @@ -3931,11 +3961,15 @@ components:
TotalStorageGB: 1
Locations:
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
- DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
NumHosts: 4
NumCritical: 6
properties:
Expand Down Expand Up @@ -4249,8 +4283,10 @@ components:
and data center description strings
example:
DataCenter: FTC1
PrivateNetworkVNISupport: true
Region: Central
ID: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
PrivateNetworkVIDSupport: true
properties:
ID:
description: Unique ID for data center location
Expand All @@ -4266,10 +4302,20 @@ components:
description: Data center descriptor
example: FTC1
type: string
PrivateNetworkVIDSupport:
description: Indicates whether or not the fabric dedicated for private networks
supports VLAN ID.
type: boolean
PrivateNetworkVNISupport:
description: Indicates whether or not the fabric dedicated for private networks
supports VNI ID.
type: boolean
required:
- Country
- DataCenter
- ID
- PrivateNetworkVIDSupport
- PrivateNetworkVNISupport
- 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 |
**PrivateNetworkVIDSupport** | **bool** | Indicates whether or not the fabric dedicated for private networks supports VLAN ID. |
**PrivateNetworkVNISupport** | **bool** | Indicates whether or not the fabric dedicated for private networks supports 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** | Optional VLAN ID of the network. If not specified, it is allocated from reserved pool. | [optional]
**VNI** | **int32** | Optional VNI ID of the network. If not specified, it is allocated from reserved pool if required. | [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 supports VLAN ID.
PrivateNetworkVIDSupport bool `json:"PrivateNetworkVIDSupport"`
// Indicates whether or not the fabric dedicated for private networks supports VNI ID.
PrivateNetworkVNISupport bool `json:"PrivateNetworkVNISupport"`
}
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"`
// Optional VLAN ID of the network. If not specified, it is allocated from reserved pool.
VLAN int32 `json:"VLAN,omitempty"`
// Optional VNI ID of the network. If not specified, it is allocated from reserved pool if required.
VNI int32 `json:"VNI,omitempty"`
}

0 comments on commit c8c9c49

Please sign in to comment.