diff --git a/netbox/client/dcim/dcim_connected_device_list_parameters.go b/netbox/client/dcim/dcim_connected_device_list_parameters.go index b1017d65b0045ea142df45c57288249e1b408e60..2524a3be637bc6984f97fc9d138eb11121ba3e7e 100644 --- a/netbox/client/dcim/dcim_connected_device_list_parameters.go +++ b/netbox/client/dcim/dcim_connected_device_list_parameters.go @@ -35,7 +35,7 @@ import ( // NewDcimConnectedDeviceListParams creates a new DcimConnectedDeviceListParams object // with the default values initialized. func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams { - + var () return &DcimConnectedDeviceListParams{ timeout: cr.DefaultTimeout, @@ -45,7 +45,7 @@ func NewDcimConnectedDeviceListParams() *DcimConnectedDeviceListParams { // NewDcimConnectedDeviceListParamsWithTimeout creates a new DcimConnectedDeviceListParams object // with the default values initialized, and the ability to set a timeout on a request func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimConnectedDeviceListParams { - + var () return &DcimConnectedDeviceListParams{ timeout: timeout, @@ -55,7 +55,7 @@ func NewDcimConnectedDeviceListParamsWithTimeout(timeout time.Duration) *DcimCon // NewDcimConnectedDeviceListParamsWithContext creates a new DcimConnectedDeviceListParams object // with the default values initialized, and the ability to set a context for a request func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConnectedDeviceListParams { - + var () return &DcimConnectedDeviceListParams{ Context: ctx, @@ -65,7 +65,7 @@ func NewDcimConnectedDeviceListParamsWithContext(ctx context.Context) *DcimConne // NewDcimConnectedDeviceListParamsWithHTTPClient creates a new DcimConnectedDeviceListParams object // with the default values initialized, and the ability to set a custom HTTPClient for a request func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimConnectedDeviceListParams { - + var () return &DcimConnectedDeviceListParams{ HTTPClient: client, } @@ -75,6 +75,18 @@ func NewDcimConnectedDeviceListParamsWithHTTPClient(client *http.Client) *DcimCo for the dcim connected device list operation typically these are written to a http.Request */ type DcimConnectedDeviceListParams struct { + + /*PeerDevice + The name of the peer device + + */ + PeerDevice string + /*PeerInterface + The name of the peer interface + + */ + PeerInterface string + timeout time.Duration Context context.Context HTTPClient *http.Client @@ -113,6 +125,28 @@ func (o *DcimConnectedDeviceListParams) SetHTTPClient(client *http.Client) { o.HTTPClient = client } +// WithPeerDevice adds the peerDevice to the dcim connected device list params +func (o *DcimConnectedDeviceListParams) WithPeerDevice(peerDevice string) *DcimConnectedDeviceListParams { + o.SetPeerDevice(peerDevice) + return o +} + +// SetPeerDevice adds the peerDevice to the dcim connected device list params +func (o *DcimConnectedDeviceListParams) SetPeerDevice(peerDevice string) { + o.PeerDevice = peerDevice +} + +// WithPeerInterface adds the peerInterface to the dcim connected device list params +func (o *DcimConnectedDeviceListParams) WithPeerInterface(peerInterface string) *DcimConnectedDeviceListParams { + o.SetPeerInterface(peerInterface) + return o +} + +// SetPeerInterface adds the peerInterface to the dcim connected device list params +func (o *DcimConnectedDeviceListParams) SetPeerInterface(peerInterface string) { + o.PeerInterface = peerInterface +} + // WriteToRequest writes these params to a swagger request func (o *DcimConnectedDeviceListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -121,6 +155,24 @@ func (o *DcimConnectedDeviceListParams) WriteToRequest(r runtime.ClientRequest, } var res []error + // query param peer-device + qrPeerDevice := o.PeerDevice + qPeerDevice := qrPeerDevice + if qPeerDevice != "" { + if err := r.SetQueryParam("peer-device", qPeerDevice); err != nil { + return err + } + } + + // query param peer-interface + qrPeerInterface := o.PeerInterface + qPeerInterface := qrPeerInterface + if qPeerInterface != "" { + if err := r.SetQueryParam("peer-interface", qPeerInterface); err != nil { + return err + } + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/dcim/dcim_connected_device_list_responses.go b/netbox/client/dcim/dcim_connected_device_list_responses.go index 74f5a35fa321fab9a80b72464da54d8b8a483869..2aada3c8b36f5a90b911823fd01cd1ccba41f607 100644 --- a/netbox/client/dcim/dcim_connected_device_list_responses.go +++ b/netbox/client/dcim/dcim_connected_device_list_responses.go @@ -21,10 +21,13 @@ package dcim import ( "fmt" + "io" "github.com/go-openapi/runtime" strfmt "github.com/go-openapi/strfmt" + + "github.com/digitalocean/go-netbox/netbox/models" ) // DcimConnectedDeviceListReader is a Reader for the DcimConnectedDeviceList structure. @@ -58,13 +61,21 @@ func NewDcimConnectedDeviceListOK() *DcimConnectedDeviceListOK { DcimConnectedDeviceListOK dcim connected device list o k */ type DcimConnectedDeviceListOK struct { + Payload *models.Device } func (o *DcimConnectedDeviceListOK) Error() string { - return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK ", 200) + return fmt.Sprintf("[GET /dcim/connected-device/][%d] dcimConnectedDeviceListOK %+v", 200, o.Payload) } func (o *DcimConnectedDeviceListOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + o.Payload = new(models.Device) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + return nil } diff --git a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go index ff45e97b6b0c9066f0b960eee0f3a88785dee7bb..69ec092fc534a91d8bfba28f962be3589c11f029 100644 --- a/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_groups_list_parameters.go @@ -82,11 +82,15 @@ type VirtualizationClusterGroupsListParams struct { */ Limit *int64 + /*Name*/ + Name *string /*Offset The initial index from which to return the results. */ Offset *int64 + /*Slug*/ + Slug *string timeout time.Duration Context context.Context @@ -137,6 +141,17 @@ func (o *VirtualizationClusterGroupsListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithName adds the name to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithName(name *string) *VirtualizationClusterGroupsListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetName(name *string) { + o.Name = name +} + // WithOffset adds the offset to the virtualization cluster groups list params func (o *VirtualizationClusterGroupsListParams) WithOffset(offset *int64) *VirtualizationClusterGroupsListParams { o.SetOffset(offset) @@ -148,6 +163,17 @@ func (o *VirtualizationClusterGroupsListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithSlug adds the slug to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) WithSlug(slug *string) *VirtualizationClusterGroupsListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the virtualization cluster groups list params +func (o *VirtualizationClusterGroupsListParams) SetSlug(slug *string) { + o.Slug = slug +} + // WriteToRequest writes these params to a swagger request func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -172,6 +198,22 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + if o.Offset != nil { // query param offset @@ -188,6 +230,22 @@ func (o *VirtualizationClusterGroupsListParams) WriteToRequest(r runtime.ClientR } + if o.Slug != nil { + + // query param slug + var qrSlug string + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go index 5431ebebd07b25f46a203c53a4a614d655787d35..cf4d45412227ba9a536e5b4e73543b2dc4fd963a 100644 --- a/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go +++ b/netbox/client/virtualization/virtualization_cluster_types_list_parameters.go @@ -82,11 +82,15 @@ type VirtualizationClusterTypesListParams struct { */ Limit *int64 + /*Name*/ + Name *string /*Offset The initial index from which to return the results. */ Offset *int64 + /*Slug*/ + Slug *string timeout time.Duration Context context.Context @@ -137,6 +141,17 @@ func (o *VirtualizationClusterTypesListParams) SetLimit(limit *int64) { o.Limit = limit } +// WithName adds the name to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithName(name *string) *VirtualizationClusterTypesListParams { + o.SetName(name) + return o +} + +// SetName adds the name to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetName(name *string) { + o.Name = name +} + // WithOffset adds the offset to the virtualization cluster types list params func (o *VirtualizationClusterTypesListParams) WithOffset(offset *int64) *VirtualizationClusterTypesListParams { o.SetOffset(offset) @@ -148,6 +163,17 @@ func (o *VirtualizationClusterTypesListParams) SetOffset(offset *int64) { o.Offset = offset } +// WithSlug adds the slug to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) WithSlug(slug *string) *VirtualizationClusterTypesListParams { + o.SetSlug(slug) + return o +} + +// SetSlug adds the slug to the virtualization cluster types list params +func (o *VirtualizationClusterTypesListParams) SetSlug(slug *string) { + o.Slug = slug +} + // WriteToRequest writes these params to a swagger request func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { @@ -172,6 +198,22 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } + if o.Name != nil { + + // query param name + var qrName string + if o.Name != nil { + qrName = *o.Name + } + qName := qrName + if qName != "" { + if err := r.SetQueryParam("name", qName); err != nil { + return err + } + } + + } + if o.Offset != nil { // query param offset @@ -188,6 +230,22 @@ func (o *VirtualizationClusterTypesListParams) WriteToRequest(r runtime.ClientRe } + if o.Slug != nil { + + // query param slug + var qrSlug string + if o.Slug != nil { + qrSlug = *o.Slug + } + qSlug := qrSlug + if qSlug != "" { + if err := r.SetQueryParam("slug", qSlug); err != nil { + return err + } + } + + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } diff --git a/swagger.json b/swagger.json index fc76f1e451e3d89e4eb3636ed0138cc44d3c2c8a..a38cecf25537ef98797134e9c897445896cddcc7 100644 --- a/swagger.json +++ b/swagger.json @@ -1063,10 +1063,28 @@ "get": { "operationId": "dcim_connected-device_list", "description": "This endpoint allows a user to determine what device (if any) is connected to a given peer device and peer\ninterface. This is useful in a situation where a device boots with no configuration, but can detect its neighbors\nvia a protocol such as LLDP. Two query parameters must be included in the request:\n\n* `peer-device`: The name of the peer device\n* `peer-interface`: The name of the peer interface", - "parameters": [], + "parameters": [ + { + "name": "peer-device", + "in": "query", + "description": "The name of the peer device", + "required": true, + "type": "string" + }, + { + "name": "peer-interface", + "in": "query", + "description": "The name of the peer interface", + "required": true, + "type": "string" + } + ], "responses": { "200": { - "description": "" + "description": "", + "schema": { + "$ref": "#/definitions/Device" + } } }, "tags": [ @@ -11136,6 +11154,20 @@ "operationId": "virtualization_cluster-groups_list", "description": "", "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -11310,6 +11342,20 @@ "operationId": "virtualization_cluster-types_list", "description": "", "parameters": [ + { + "name": "name", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, + { + "name": "slug", + "in": "query", + "description": "", + "required": false, + "type": "string" + }, { "name": "limit", "in": "query", @@ -13112,68 +13158,6 @@ } } }, - "ConsoleServerPort": { - "title": "Cs port", - "required": [ - "device", - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "device": { - "$ref": "#/definitions/NestedDevice" - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "connected_console": { - "title": "Connected console", - "type": "string", - "readOnly": true - } - } - }, - "ConsolePort": { - "required": [ - "device", - "name", - "cs_port" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "device": { - "$ref": "#/definitions/NestedDevice" - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "cs_port": { - "$ref": "#/definitions/ConsoleServerPort" - }, - "connection_status": { - "title": "Connection status", - "type": "boolean", - "enum": [ - false, - true - ] - } - } - }, "NestedManufacturer": { "title": "Manufacturer", "required": [ @@ -13244,10 +13228,11 @@ } } }, - "ConsolePortTemplate": { + "NestedDeviceRole": { + "title": "Device role", "required": [ - "device_type", - "name" + "name", + "slug" ], "type": "object", "properties": { @@ -13256,20 +13241,31 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true }, "name": { "title": "Name", "type": "string", "maxLength": 50 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50 } } }, - "WritableConsolePortTemplate": { + "NestedPlatform": { + "title": "Platform", "required": [ - "device_type", - "name" + "name", + "slug" ], "type": "object", "properties": { @@ -13278,20 +13274,29 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true }, "name": { "title": "Name", "type": "string", "maxLength": 50 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50 } } }, - "WritableConsolePort": { + "NestedRack": { + "title": "Rack", "required": [ - "device", "name" ], "type": "object", @@ -13301,33 +13306,28 @@ "type": "integer", "readOnly": true }, - "device": { - "title": "Device", - "type": "integer" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true }, "name": { "title": "Name", "type": "string", "maxLength": 50 }, - "cs_port": { - "title": "Console server port", - "type": "integer" - }, - "connection_status": { - "title": "Connection status", - "type": "boolean", - "enum": [ - false, - true - ] + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true } } }, - "ConsoleServerPortTemplate": { + "DeviceIPAddress": { + "title": "Primary ip", "required": [ - "device_type", - "name" + "address" ], "type": "object", "properties": { @@ -13336,19 +13336,27 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" - }, - "name": { - "title": "Name", + "url": { + "title": "Url", "type": "string", - "maxLength": 50 + "format": "uri", + "readOnly": true + }, + "family": { + "title": "Family", + "type": "integer", + "readOnly": true + }, + "address": { + "title": "Address", + "description": "IPv4 or IPv6 address (with mask)", + "type": "string" } } }, - "WritableConsoleServerPortTemplate": { + "NestedCluster": { + "title": "Cluster", "required": [ - "device_type", "name" ], "type": "object", @@ -13358,21 +13366,23 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "url": { + "title": "Url", + "type": "string", + "format": "uri", + "readOnly": true }, "name": { "title": "Name", "type": "string", - "maxLength": 50 + "maxLength": 100 } } }, - "WritableConsoleServerPort": { + "DeviceVirtualChassis": { + "title": "Virtual chassis", "required": [ - "device", - "name" + "master" ], "type": "object", "properties": { @@ -13381,21 +13391,34 @@ "type": "integer", "readOnly": true }, - "device": { - "title": "Device", - "type": "integer" - }, - "name": { - "title": "Name", + "url": { + "title": "Url", "type": "string", - "maxLength": 50 + "format": "uri", + "readOnly": true + }, + "master": { + "$ref": "#/definitions/NestedDevice" } } }, - "DeviceBayTemplate": { + "Device": { "required": [ "device_type", - "name" + "device_role", + "tenant", + "platform", + "site", + "rack", + "position", + "face", + "status", + "primary_ip", + "primary_ip4", + "primary_ip6", + "cluster", + "virtual_chassis", + "vc_position" ], "type": "object", "properties": { @@ -13404,19 +13427,143 @@ "type": "integer", "readOnly": true }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" - }, "name": { "title": "Name", "type": "string", + "maxLength": 64 + }, + "display_name": { + "title": "Display name", + "type": "string", + "readOnly": true + }, + "device_type": { + "$ref": "#/definitions/NestedDeviceType" + }, + "device_role": { + "$ref": "#/definitions/NestedDeviceRole" + }, + "tenant": { + "$ref": "#/definitions/NestedTenant" + }, + "platform": { + "$ref": "#/definitions/NestedPlatform" + }, + "serial": { + "title": "Serial number", + "type": "string", "maxLength": 50 + }, + "asset_tag": { + "title": "Asset tag", + "description": "A unique tag used to identify this device", + "type": "string", + "maxLength": 50 + }, + "site": { + "$ref": "#/definitions/NestedSite" + }, + "rack": { + "$ref": "#/definitions/NestedRack" + }, + "position": { + "title": "Position (U)", + "description": "The lowest-numbered unit occupied by the device", + "type": "integer", + "maximum": 32767, + "minimum": 1 + }, + "face": { + "title": "Face", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "integer", + "x-nullable": true + } + } + }, + "parent_device": { + "title": "Parent device", + "type": "string", + "readOnly": true + }, + "status": { + "title": "Status", + "required": [ + "label", + "value" + ], + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + }, + "primary_ip": { + "$ref": "#/definitions/DeviceIPAddress" + }, + "primary_ip4": { + "$ref": "#/definitions/DeviceIPAddress" + }, + "primary_ip6": { + "$ref": "#/definitions/DeviceIPAddress" + }, + "cluster": { + "$ref": "#/definitions/NestedCluster" + }, + "virtual_chassis": { + "$ref": "#/definitions/DeviceVirtualChassis" + }, + "vc_position": { + "title": "Vc position", + "type": "integer", + "maximum": 255, + "minimum": 0 + }, + "vc_priority": { + "title": "Vc priority", + "type": "integer", + "maximum": 255, + "minimum": 0 + }, + "comments": { + "title": "Comments", + "type": "string" + }, + "custom_fields": { + "title": "Custom fields", + "type": "object" + }, + "created": { + "title": "Created", + "type": "string", + "format": "date", + "readOnly": true + }, + "last_updated": { + "title": "Last updated", + "type": "string", + "format": "date-time", + "readOnly": true } } }, - "WritableDeviceBayTemplate": { + "ConsoleServerPort": { + "title": "Cs port", "required": [ - "device_type", + "device", "name" ], "type": "object", @@ -13426,22 +13573,26 @@ "type": "integer", "readOnly": true }, - "device_type": { - "title": "Device type", - "type": "integer" + "device": { + "$ref": "#/definitions/NestedDevice" }, "name": { "title": "Name", "type": "string", "maxLength": 50 + }, + "connected_console": { + "title": "Connected console", + "type": "string", + "readOnly": true } } }, - "DeviceBay": { + "ConsolePort": { "required": [ "device", "name", - "installed_device" + "cs_port" ], "type": "object", "properties": { @@ -13458,14 +13609,22 @@ "type": "string", "maxLength": 50 }, - "installed_device": { - "$ref": "#/definitions/NestedDevice" + "cs_port": { + "$ref": "#/definitions/ConsoleServerPort" + }, + "connection_status": { + "title": "Connection status", + "type": "boolean", + "enum": [ + false, + true + ] } } }, - "WritableDeviceBay": { + "ConsolePortTemplate": { "required": [ - "device", + "device_type", "name" ], "type": "object", @@ -13475,26 +13634,20 @@ "type": "integer", "readOnly": true }, - "device": { - "title": "Device", - "type": "integer" + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, "name": { "title": "Name", "type": "string", "maxLength": 50 - }, - "installed_device": { - "title": "Installed device", - "type": "integer" } } }, - "DeviceRole": { + "WritableConsolePortTemplate": { "required": [ - "name", - "slug", - "color" + "device_type", + "name" ], "type": "object", "properties": { @@ -13503,38 +13656,56 @@ "type": "integer", "readOnly": true }, + "device_type": { + "title": "Device type", + "type": "integer" + }, "name": { "title": "Name", "type": "string", "maxLength": 50 + } + } + }, + "WritableConsolePort": { + "required": [ + "device", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true }, - "slug": { - "title": "Slug", + "device": { + "title": "Device", + "type": "integer" + }, + "name": { + "title": "Name", "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", "maxLength": 50 }, - "color": { - "title": "Color", - "type": "string", - "pattern": "^[0-9a-f]{6}$", - "maxLength": 6 + "cs_port": { + "title": "Console server port", + "type": "integer" }, - "vm_role": { - "title": "VM Role", - "description": "Virtual machines may be assigned to this role", - "type": "boolean" + "connection_status": { + "title": "Connection status", + "type": "boolean", + "enum": [ + false, + true + ] } } }, - "DeviceType": { + "ConsoleServerPortTemplate": { "required": [ - "manufacturer", - "model", - "slug", - "interface_ordering", - "subdevice_role" + "device_type", + "name" ], "type": "object", "properties": { @@ -13543,24 +13714,231 @@ "type": "integer", "readOnly": true }, - "manufacturer": { - "$ref": "#/definitions/NestedManufacturer" - }, - "model": { - "title": "Model", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 + "device_type": { + "$ref": "#/definitions/NestedDeviceType" }, - "part_number": { - "title": "Part number", - "description": "Discrete part number (optional)", + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + } + } + }, + "WritableConsoleServerPortTemplate": { + "required": [ + "device_type", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device_type": { + "title": "Device type", + "type": "integer" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + } + } + }, + "WritableConsoleServerPort": { + "required": [ + "device", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device": { + "title": "Device", + "type": "integer" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + } + } + }, + "DeviceBayTemplate": { + "required": [ + "device_type", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device_type": { + "$ref": "#/definitions/NestedDeviceType" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + } + } + }, + "WritableDeviceBayTemplate": { + "required": [ + "device_type", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device_type": { + "title": "Device type", + "type": "integer" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + } + } + }, + "DeviceBay": { + "required": [ + "device", + "name", + "installed_device" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device": { + "$ref": "#/definitions/NestedDevice" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + }, + "installed_device": { + "$ref": "#/definitions/NestedDevice" + } + } + }, + "WritableDeviceBay": { + "required": [ + "device", + "name" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "device": { + "title": "Device", + "type": "integer" + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + }, + "installed_device": { + "title": "Installed device", + "type": "integer" + } + } + }, + "DeviceRole": { + "required": [ + "name", + "slug", + "color" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "name": { + "title": "Name", + "type": "string", + "maxLength": 50 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50 + }, + "color": { + "title": "Color", + "type": "string", + "pattern": "^[0-9a-f]{6}$", + "maxLength": 6 + }, + "vm_role": { + "title": "VM Role", + "description": "Virtual machines may be assigned to this role", + "type": "boolean" + } + } + }, + "DeviceType": { + "required": [ + "manufacturer", + "model", + "slug", + "interface_ordering", + "subdevice_role" + ], + "type": "object", + "properties": { + "id": { + "title": "ID", + "type": "integer", + "readOnly": true + }, + "manufacturer": { + "$ref": "#/definitions/NestedManufacturer" + }, + "model": { + "title": "Model", + "type": "string", + "maxLength": 50 + }, + "slug": { + "title": "Slug", + "type": "string", + "format": "slug", + "pattern": "^[-a-zA-Z0-9_]+$", + "maxLength": 50 + }, + "part_number": { + "title": "Part number", + "description": "Discrete part number (optional)", "type": "string", "maxLength": 50 }, @@ -13728,338 +14106,6 @@ } } }, - "NestedDeviceRole": { - "title": "Device role", - "required": [ - "name", - "slug" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - } - } - }, - "NestedPlatform": { - "title": "Platform", - "required": [ - "name", - "slug" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "slug": { - "title": "Slug", - "type": "string", - "format": "slug", - "pattern": "^[-a-zA-Z0-9_]+$", - "maxLength": 50 - } - } - }, - "NestedRack": { - "title": "Rack", - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 50 - }, - "display_name": { - "title": "Display name", - "type": "string", - "readOnly": true - } - } - }, - "DeviceIPAddress": { - "title": "Primary ip", - "required": [ - "address" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "family": { - "title": "Family", - "type": "integer", - "readOnly": true - }, - "address": { - "title": "Address", - "description": "IPv4 or IPv6 address (with mask)", - "type": "string" - } - } - }, - "NestedCluster": { - "title": "Cluster", - "required": [ - "name" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 100 - } - } - }, - "DeviceVirtualChassis": { - "title": "Virtual chassis", - "required": [ - "master" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "url": { - "title": "Url", - "type": "string", - "format": "uri", - "readOnly": true - }, - "master": { - "$ref": "#/definitions/NestedDevice" - } - } - }, - "Device": { - "required": [ - "device_type", - "device_role", - "tenant", - "platform", - "site", - "rack", - "position", - "face", - "status", - "primary_ip", - "primary_ip4", - "primary_ip6", - "cluster", - "virtual_chassis", - "vc_position" - ], - "type": "object", - "properties": { - "id": { - "title": "ID", - "type": "integer", - "readOnly": true - }, - "name": { - "title": "Name", - "type": "string", - "maxLength": 64 - }, - "display_name": { - "title": "Display name", - "type": "string", - "readOnly": true - }, - "device_type": { - "$ref": "#/definitions/NestedDeviceType" - }, - "device_role": { - "$ref": "#/definitions/NestedDeviceRole" - }, - "tenant": { - "$ref": "#/definitions/NestedTenant" - }, - "platform": { - "$ref": "#/definitions/NestedPlatform" - }, - "serial": { - "title": "Serial number", - "type": "string", - "maxLength": 50 - }, - "asset_tag": { - "title": "Asset tag", - "description": "A unique tag used to identify this device", - "type": "string", - "maxLength": 50 - }, - "site": { - "$ref": "#/definitions/NestedSite" - }, - "rack": { - "$ref": "#/definitions/NestedRack" - }, - "position": { - "title": "Position (U)", - "description": "The lowest-numbered unit occupied by the device", - "type": "integer", - "maximum": 32767, - "minimum": 1 - }, - "face": { - "title": "Face", - "required": [ - "label", - "value" - ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "integer", - "x-nullable": true - } - } - }, - "parent_device": { - "title": "Parent device", - "type": "string", - "readOnly": true - }, - "status": { - "title": "Status", - "required": [ - "label", - "value" - ], - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "value": { - "type": "integer" - } - } - }, - "primary_ip": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "primary_ip4": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "primary_ip6": { - "$ref": "#/definitions/DeviceIPAddress" - }, - "cluster": { - "$ref": "#/definitions/NestedCluster" - }, - "virtual_chassis": { - "$ref": "#/definitions/DeviceVirtualChassis" - }, - "vc_position": { - "title": "Vc position", - "type": "integer", - "maximum": 255, - "minimum": 0 - }, - "vc_priority": { - "title": "Vc priority", - "type": "integer", - "maximum": 255, - "minimum": 0 - }, - "comments": { - "title": "Comments", - "type": "string" - }, - "custom_fields": { - "title": "Custom fields", - "type": "object" - }, - "created": { - "title": "Created", - "type": "string", - "format": "date", - "readOnly": true - }, - "last_updated": { - "title": "Last updated", - "type": "string", - "format": "date-time", - "readOnly": true - } - } - }, "WritableDevice": { "required": [ "device_type",