Skip to content

Fix additionnal *_count field as not required and cleanup #4

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

Merged
merged 3 commits into from
Sep 19, 2024
Merged
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ build:
$(EXEC) goimports -w .

# Build without fetching a new version of openapi.yaml from netbox-docker
.PHONY: build
build:
.PHONY: build-no-fetch
build-no-fetch:
$(EXEC) ./scripts/set-versions.sh $(NETBOX_VERSION) $(NETBOX_DOCKER_VERSION)
$(EXEC) ./scripts/fix-spec.py
./scripts/generate-code.sh
Expand Down
10 changes: 0 additions & 10 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105446,7 +105446,6 @@ components:
- id
- name
- url
- virtualmachine_count
BriefClusterGroup:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -105941,7 +105940,6 @@ components:
- name
- slug
- url
- virtualmachine_count
BriefDeviceRoleRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -106726,7 +106724,6 @@ components:
format: int64
readOnly: true
required:
- devicetype_count
- display
- id
- name
Expand Down Expand Up @@ -106868,7 +106865,6 @@ components:
- name
- slug
- url
- virtualmachine_count
BriefPlatformRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -109546,7 +109542,6 @@ components:
- name
- type
- url
- virtualmachine_count
ClusterGroup:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -113081,7 +113076,6 @@ components:
- name
- slug
- url
- virtualmachine_count
DeviceRoleRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -122498,7 +122492,6 @@ components:
readOnly: true
required:
- created
- devicetype_count
- display
- display_url
- id
Expand Down Expand Up @@ -136601,7 +136594,6 @@ components:
- name
- slug
- url
- virtualmachine_count
PlatformRequest:
type: object
description: Adds support for custom fields and tags.
Expand Down Expand Up @@ -144072,7 +144064,6 @@ components:
- rack_count
- slug
- url
- virtualmachine_count
- vlan_count
SiteGroup:
type: object
Expand Down Expand Up @@ -144531,7 +144522,6 @@ components:
- site_count
- slug
- url
- virtualmachine_count
- vlan_count
- vrf_count
TenantGroup:
Expand Down
6 changes: 3 additions & 3 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ The `go-netbox` project makes use of the [GitHub Flow](https://docs.github.com/g
for contributions.

If you'd like to contribute to the project, please
[open an issue](https://github.com/netbox-community/go-netbox/issues/new) or find an
[existing issue](https://github.com/netbox-community/go-netbox/issues) that you'd like
[open an issue](https://github.com/intercloud/go-netbox/issues/new) or find an
[existing issue](https://github.com/intercloud/go-netbox/issues) that you'd like
to take on. This ensures that efforts are not duplicated, and that a new feature
aligns with the focus of the rest of the repository.

Expand All @@ -20,7 +20,7 @@ code meets the following criteria:

In addition, if this is your first time contributing to the `go-netbox` project,
add your name and email address to the
[AUTHORS](https://github.com/netbox-community/go-netbox/blob/master/AUTHORS) file
[AUTHORS](https://github.com/intercloud/go-netbox/blob/master/AUTHORS) file
under the "Contributors" section using the format:
`First Last <[email protected]>`.

Expand Down
9 changes: 7 additions & 2 deletions docs/BriefCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ Name | Type | Description | Notes
**Display** | **string** | | [readonly]
**Name** | **string** | |
**Description** | Pointer to **string** | | [optional]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefCluster

`func NewBriefCluster(id int32, url string, display string, name string, virtualmachineCount int64, ) *BriefCluster`
`func NewBriefCluster(id int32, url string, display string, name string, ) *BriefCluster`

NewBriefCluster instantiates a new BriefCluster object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -154,6 +154,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *BriefCluster) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/BriefDeviceRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Name | Type | Description | Notes
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefDeviceRole

`func NewBriefDeviceRole(id int32, url string, display string, name string, slug string, virtualmachineCount int64, ) *BriefDeviceRole`
`func NewBriefDeviceRole(id int32, url string, display string, name string, slug string, ) *BriefDeviceRole`

NewBriefDeviceRole instantiates a new BriefDeviceRole object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -201,6 +201,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *BriefDeviceRole) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/BriefManufacturer.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Name | Type | Description | Notes
**Name** | **string** | |
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DevicetypeCount** | **int64** | | [readonly]
**DevicetypeCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefManufacturer

`func NewBriefManufacturer(id int32, url string, display string, name string, slug string, devicetypeCount int64, ) *BriefManufacturer`
`func NewBriefManufacturer(id int32, url string, display string, name string, slug string, ) *BriefManufacturer`

NewBriefManufacturer instantiates a new BriefManufacturer object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -175,6 +175,11 @@ and a boolean to check if the value has been set.

SetDevicetypeCount sets DevicetypeCount field to given value.

### HasDevicetypeCount

`func (o *BriefManufacturer) HasDevicetypeCount() bool`

HasDevicetypeCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/BriefPlatform.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Name | Type | Description | Notes
**Slug** | **string** | |
**Description** | Pointer to **string** | | [optional]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewBriefPlatform

`func NewBriefPlatform(id int32, url string, display string, name string, slug string, virtualmachineCount int64, ) *BriefPlatform`
`func NewBriefPlatform(id int32, url string, display string, name string, slug string, ) *BriefPlatform`

NewBriefPlatform instantiates a new BriefPlatform object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -201,6 +201,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *BriefPlatform) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/Cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ Name | Type | Description | Notes
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewCluster

`func NewCluster(id int32, url string, displayUrl string, display string, name string, type_ BriefClusterType, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *Cluster`
`func NewCluster(id int32, url string, displayUrl string, display string, name string, type_ BriefClusterType, created NullableTime, lastUpdated NullableTime, ) *Cluster`

NewCluster instantiates a new Cluster object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -496,6 +496,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Cluster) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/DeviceRole.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Name | Type | Description | Notes
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewDeviceRole

`func NewDeviceRole(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *DeviceRole`
`func NewDeviceRole(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, ) *DeviceRole`

NewDeviceRole instantiates a new DeviceRole object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -424,6 +424,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *DeviceRole) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/Manufacturer.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to **map[string]interface{}** | | [optional]
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DevicetypeCount** | **int64** | | [readonly]
**DevicetypeCount** | Pointer to **int64** | | [optional] [readonly]
**InventoryitemCount** | **int64** | | [readonly]
**PlatformCount** | **int64** | | [readonly]

## Methods

### NewManufacturer

`func NewManufacturer(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, devicetypeCount int64, inventoryitemCount int64, platformCount int64, ) *Manufacturer`
`func NewManufacturer(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, inventoryitemCount int64, platformCount int64, ) *Manufacturer`

NewManufacturer instantiates a new Manufacturer object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -312,6 +312,11 @@ and a boolean to check if the value has been set.

SetDevicetypeCount sets DevicetypeCount field to given value.

### HasDevicetypeCount

`func (o *Manufacturer) HasDevicetypeCount() bool`

HasDevicetypeCount returns a boolean if a field has been set.

### GetInventoryitemCount

Expand Down
9 changes: 7 additions & 2 deletions docs/Platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Name | Type | Description | Notes
**Created** | **NullableTime** | | [readonly]
**LastUpdated** | **NullableTime** | | [readonly]
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]

## Methods

### NewPlatform

`func NewPlatform(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, virtualmachineCount int64, ) *Platform`
`func NewPlatform(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, ) *Platform`

NewPlatform instantiates a new Platform object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -408,6 +408,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Platform) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.


[[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
9 changes: 7 additions & 2 deletions docs/Site.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ Name | Type | Description | Notes
**DeviceCount** | Pointer to **int64** | | [optional] [readonly]
**PrefixCount** | **int64** | | [readonly]
**RackCount** | **int64** | | [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]
**VlanCount** | **int64** | | [readonly]

## Methods

### NewSite

`func NewSite(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, circuitCount int64, prefixCount int64, rackCount int64, virtualmachineCount int64, vlanCount int64, ) *Site`
`func NewSite(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, circuitCount int64, prefixCount int64, rackCount int64, vlanCount int64, ) *Site`

NewSite instantiates a new Site object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -772,6 +772,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Site) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.

### GetVlanCount

Expand Down
9 changes: 7 additions & 2 deletions docs/Tenant.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Name | Type | Description | Notes
**PrefixCount** | **int64** | | [readonly]
**RackCount** | **int64** | | [readonly]
**SiteCount** | **int64** | | [readonly]
**VirtualmachineCount** | **int64** | | [readonly]
**VirtualmachineCount** | Pointer to **int64** | | [optional] [readonly]
**VlanCount** | **int64** | | [readonly]
**VrfCount** | **int64** | | [readonly]
**ClusterCount** | **int64** | | [readonly]
Expand All @@ -32,7 +32,7 @@ Name | Type | Description | Notes

### NewTenant

`func NewTenant(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, circuitCount int64, ipaddressCount int64, prefixCount int64, rackCount int64, siteCount int64, virtualmachineCount int64, vlanCount int64, vrfCount int64, clusterCount int64, ) *Tenant`
`func NewTenant(id int32, url string, displayUrl string, display string, name string, slug string, created NullableTime, lastUpdated NullableTime, circuitCount int64, ipaddressCount int64, prefixCount int64, rackCount int64, siteCount int64, vlanCount int64, vrfCount int64, clusterCount int64, ) *Tenant`

NewTenant instantiates a new Tenant object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -506,6 +506,11 @@ and a boolean to check if the value has been set.

SetVirtualmachineCount sets VirtualmachineCount field to given value.

### HasVirtualmachineCount

`func (o *Tenant) HasVirtualmachineCount() bool`

HasVirtualmachineCount returns a boolean if a field has been set.

### GetVlanCount

Expand Down
Loading