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

feat: update virtual networks to reference resource schemas instead of href #28

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 4 additions & 4 deletions services/metalv1/docs/Port.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**Type** | Pointer to [**PortType**](PortType.md) | | [optional]
**NetworkType** | Pointer to [**PortNetworkType**](PortNetworkType.md) | | [optional]
**NativeVirtualNetwork** | Pointer to [**VirtualNetwork**](VirtualNetwork.md) | | [optional]
**VirtualNetworks** | Pointer to [**[]Href**](Href.md) | | [optional]
**VirtualNetworks** | Pointer to [**[]VirtualNetwork**](VirtualNetwork.md) | | [optional]

## Methods

Expand Down Expand Up @@ -261,20 +261,20 @@ HasNativeVirtualNetwork returns a boolean if a field has been set.

### GetVirtualNetworks

`func (o *Port) GetVirtualNetworks() []Href`
`func (o *Port) GetVirtualNetworks() []VirtualNetwork`

GetVirtualNetworks returns the VirtualNetworks field if non-nil, zero value otherwise.

### GetVirtualNetworksOk

`func (o *Port) GetVirtualNetworksOk() (*[]Href, bool)`
`func (o *Port) GetVirtualNetworksOk() (*[]VirtualNetwork, bool)`

GetVirtualNetworksOk returns a tuple with the VirtualNetworks field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetVirtualNetworks

`func (o *Port) SetVirtualNetworks(v []Href)`
`func (o *Port) SetVirtualNetworks(v []VirtualNetwork)`

SetVirtualNetworks sets VirtualNetworks field to given value.

Expand Down
24 changes: 12 additions & 12 deletions services/metalv1/docs/VirtualNetwork.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AssignedTo** | Pointer to [**Href**](Href.md) | | [optional]
**AssignedTo** | Pointer to [**Project**](Project.md) | | [optional]
**AssignedToVirtualCircuit** | Pointer to **bool** | True if the virtual network is attached to a virtual circuit. False if not. | [optional]
**Description** | Pointer to **string** | | [optional]
**Facility** | Pointer to [**Href**](Href.md) | | [optional]
**Href** | Pointer to **string** | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**Id** | Pointer to **string** | | [optional]
**Instances** | Pointer to [**[]Href**](Href.md) | A list of instances with ports currently associated to this Virtual Network. | [optional]
**Instances** | Pointer to [**[]Device**](Device.md) | A list of instances with ports currently associated to this Virtual Network. | [optional]
**MetalGateways** | Pointer to [**[]MetalGatewayLite**](MetalGatewayLite.md) | A list of metal gateways currently associated to this Virtual Network. | [optional]
**Metro** | Pointer to [**Href**](Href.md) | | [optional]
**Metro** | Pointer to [**Metro**](Metro.md) | | [optional]
**MetroCode** | Pointer to **string** | The Metro code of the metro in which this Virtual Network is defined. | [optional]
**Vxlan** | Pointer to **int32** | | [optional]
**Tags** | Pointer to **[]string** | | [optional]
Expand All @@ -39,20 +39,20 @@ but it doesn't guarantee that properties required by API are set

### GetAssignedTo

`func (o *VirtualNetwork) GetAssignedTo() Href`
`func (o *VirtualNetwork) GetAssignedTo() Project`

GetAssignedTo returns the AssignedTo field if non-nil, zero value otherwise.

### GetAssignedToOk

`func (o *VirtualNetwork) GetAssignedToOk() (*Href, bool)`
`func (o *VirtualNetwork) GetAssignedToOk() (*Project, bool)`

GetAssignedToOk returns a tuple with the AssignedTo field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetAssignedTo

`func (o *VirtualNetwork) SetAssignedTo(v Href)`
`func (o *VirtualNetwork) SetAssignedTo(v Project)`

SetAssignedTo sets AssignedTo field to given value.

Expand Down Expand Up @@ -214,20 +214,20 @@ HasId returns a boolean if a field has been set.

### GetInstances

`func (o *VirtualNetwork) GetInstances() []Href`
`func (o *VirtualNetwork) GetInstances() []Device`

GetInstances returns the Instances field if non-nil, zero value otherwise.

### GetInstancesOk

`func (o *VirtualNetwork) GetInstancesOk() (*[]Href, bool)`
`func (o *VirtualNetwork) GetInstancesOk() (*[]Device, bool)`

GetInstancesOk returns a tuple with the Instances field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetInstances

`func (o *VirtualNetwork) SetInstances(v []Href)`
`func (o *VirtualNetwork) SetInstances(v []Device)`

SetInstances sets Instances field to given value.

Expand Down Expand Up @@ -264,20 +264,20 @@ HasMetalGateways returns a boolean if a field has been set.

### GetMetro

`func (o *VirtualNetwork) GetMetro() Href`
`func (o *VirtualNetwork) GetMetro() Metro`

GetMetro returns the Metro field if non-nil, zero value otherwise.

### GetMetroOk

`func (o *VirtualNetwork) GetMetroOk() (*Href, bool)`
`func (o *VirtualNetwork) GetMetroOk() (*Metro, bool)`

GetMetroOk returns a tuple with the Metro field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetMetro

`func (o *VirtualNetwork) SetMetro(v Href)`
`func (o *VirtualNetwork) SetMetro(v Metro)`

SetMetro sets Metro field to given value.

Expand Down
12 changes: 6 additions & 6 deletions services/metalv1/model_port.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions services/metalv1/model_virtual_network.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ properties:
$ref: './VirtualNetwork.yaml'
virtual_networks:
items:
$ref: './Href.yaml'
$ref: './VirtualNetwork.yaml'
type: array
type: object
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
properties:
assigned_to:
$ref: './Href.yaml'
$ref: './Project.yaml'
assigned_to_virtual_circuit:
description: True if the virtual network is attached to a virtual circuit. False
if not.
Expand All @@ -21,15 +21,15 @@ properties:
description: A list of instances with ports currently associated to this Virtual
Network.
items:
$ref: './Href.yaml'
$ref: './Device.yaml'
type: array
metal_gateways:
description: A list of metal gateways currently associated to this Virtual Network.
items:
$ref: './MetalGatewayLite.yaml'
type: array
metro:
$ref: './Href.yaml'
$ref: './Metro.yaml'
metro_code:
description: The Metro code of the metro in which this Virtual Network is defined.
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/spec/services/metalv1/oas3.patched/components/schemas/Port.yaml b/spec/services/metalv1/oas3.patched/components/schemas/Port.yaml
index bceaf31..e232c6d 100644
--- a/spec/services/metalv1/oas3.patched/components/schemas/Port.yaml
+++ b/spec/services/metalv1/oas3.patched/components/schemas/Port.yaml
@@ -35,6 +35,6 @@ properties:
$ref: './VirtualNetwork.yaml'
virtual_networks:
items:
- $ref: './Href.yaml'
+ $ref: './VirtualNetwork.yaml'
type: array
type: object
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetwork.yaml b/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetwork.yaml
index bae14ae..311670d 100644
--- a/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetwork.yaml
+++ b/spec/services/metalv1/oas3.patched/components/schemas/VirtualNetwork.yaml
@@ -1,6 +1,6 @@
properties:
assigned_to:
- $ref: './Href.yaml'
+ $ref: './Project.yaml'
assigned_to_virtual_circuit:
description: True if the virtual network is attached to a virtual circuit. False
if not.
@@ -21,7 +21,7 @@ properties:
description: A list of instances with ports currently associated to this Virtual
Network.
items:
- $ref: './Href.yaml'
+ $ref: './Device.yaml'
type: array
metal_gateways:
description: A list of metal gateways currently associated to this Virtual Network.
@@ -29,7 +29,7 @@ properties:
$ref: './MetalGatewayLite.yaml'
type: array
metro:
- $ref: './Href.yaml'
+ $ref: './Metro.yaml'
metro_code:
description: The Metro code of the metro in which this Virtual Network is defined.
type: string
Loading