Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
feat: API Sync by GitHub Action (2023-10-02) (#161)
Browse files Browse the repository at this point in the history
This API Sync PR was automated through [GitHub Actions
workflow_displatch](https://github.com/equinix-labs/metal-go/actions?query=event%3Aworkflow_dispatch)
on 2023-10-02.

* latest Swagger is fetched
* patches have been applied
* generated client has been updated

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Charles Treatman <ctreatman@equinix.com>
  • Loading branch information
github-actions[bot] and ctreatma committed Oct 2, 2023
1 parent 5ff62c4 commit 38931a4
Show file tree
Hide file tree
Showing 24 changed files with 473 additions and 21 deletions.
1 change: 1 addition & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ Class | Method | HTTP request | Description
*CapacityApi* | [**FindCapacityForMetro**](docs/CapacityApi.md#findcapacityformetro) | **Get** /capacity/metros | View capacity for metros
*CapacityApi* | [**FindOrganizationCapacityPerFacility**](docs/CapacityApi.md#findorganizationcapacityperfacility) | **Get** /organizations/{id}/capacity | View available hardware plans per Facility for given organization
*CapacityApi* | [**FindOrganizationCapacityPerMetro**](docs/CapacityApi.md#findorganizationcapacitypermetro) | **Get** /organizations/{id}/capacity/metros | View available hardware plans per Metro for given organization
*ConsoleLogDetailsApi* | [**CaptureScreenshot**](docs/ConsoleLogDetailsApi.md#capturescreenshot) | **Get** /devices/{id}/diagnostics/screenshot |
*DevicesApi* | [**CreateBgpSession**](docs/DevicesApi.md#createbgpsession) | **Post** /devices/{id}/bgp/sessions | Create a BGP session
*DevicesApi* | [**CreateDevice**](docs/DevicesApi.md#createdevice) | **Post** /projects/{id}/devices | Create a device
*DevicesApi* | [**CreateIPAssignment**](docs/DevicesApi.md#createipassignment) | **Post** /devices/{id}/ips | Create an ip assignment
Expand Down
56 changes: 53 additions & 3 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ tags:
- description: |
Firmware Sets Management. Notice: Firmware Sets are a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information.
name: Firmware Sets
- description: |
Console Log Details. Notice: This is a test feature currently under active development, and only available to certain users. Please contact Customer Success for more information.
name: Console Log Details
- description: |
Global BGP Range Management
externalDocs:
Expand Down Expand Up @@ -1903,6 +1906,46 @@ paths:
summary: Retrieve the custom metadata of an instance
tags:
- Devices
/devices/{id}/diagnostics/screenshot:
get:
description: "Capture a screenshot from the device, if supported, via the BMC."
operationId: captureScreenshot
parameters:
- description: Device UUID
in: path
name: id
required: true
schema:
format: uuid
type: string
responses:
"200":
content:
application/jpeg:
schema:
format: binary
type: string
description: An image file
"403":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: forbidden
"404":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not found
"501":
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
description: not implemented for device
tags:
- Console Log Details
/devices/{id}/diagnostics/health/rollup:
get:
description: Returns the health rollup status of the device.
Expand Down Expand Up @@ -7660,6 +7703,11 @@ paths:
name: facility
schema:
type: string
- description: Filter by device metro
in: query
name: metro
schema:
type: string
- description: Filter by partial hostname
in: query
name: hostname
Expand Down Expand Up @@ -8795,6 +8843,7 @@ paths:
- SSHKeys
/projects/{id}/transfers:
post:
deprecated: true
description: Organization owners can transfer their projects to other organizations.
operationId: createTransferRequest
parameters:
Expand Down Expand Up @@ -29635,9 +29684,10 @@ components:
type: string
type: array
local_asn:
description: The new `local_asn` value for the VRF. This field cannot be
updated when there are active Interconnection Virtual Circuits associated
to the VRF.
description: "The new `local_asn` value for the VRF. This field cannot be\
\ updated when there are active Interconnection Virtual Circuits associated\
\ to the VRF, or if any of the VLANs of the VRF's metal gateway has been\
\ assigned on an instance."
format: int32
type: integer
name:
Expand Down
79 changes: 79 additions & 0 deletions docs/ConsoleLogDetailsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# \ConsoleLogDetailsApi

All URIs are relative to *https://api.equinix.com/metal/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**CaptureScreenshot**](ConsoleLogDetailsApi.md#CaptureScreenshot) | **Get** /devices/{id}/diagnostics/screenshot |



## CaptureScreenshot

> *os.File CaptureScreenshot(ctx, id).Execute()




### Example

```go
package main

import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix-labs/metal-go/metal/v1"
)

func main() {
id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | Device UUID

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ConsoleLogDetailsApi.CaptureScreenshot(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConsoleLogDetailsApi.CaptureScreenshot``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CaptureScreenshot`: *os.File
fmt.Fprintf(os.Stdout, "Response from `ConsoleLogDetailsApi.CaptureScreenshot`: %v\n", resp)
}
```

### Path Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string** | Device UUID |

### Other Parameters

Other parameters are passed through a pointer to a apiCaptureScreenshotRequest struct via the builder pattern


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------


### Return type

[***os.File**](*os.File.md)

### Authorization

[x_auth_token](../README.md#x_auth_token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/jpeg, application/json

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

6 changes: 4 additions & 2 deletions docs/DevicesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,7 @@ Name | Type | Description | Notes

## FindProjectDevices

> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
> DeviceList FindProjectDevices(ctx, id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
Retrieve all devices of a project

Expand All @@ -1015,6 +1015,7 @@ func main() {
search := "search_example" // string | Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. (optional)
categories := []openapiclient.FindOrganizationDevicesCategoriesParameterInner{openapiclient.findOrganizationDevices_categories_parameter_inner("compute")} // []FindOrganizationDevicesCategoriesParameterInner | Filter by plan category (optional)
facility := "facility_example" // string | Filter by device facility (optional)
metro := "metro_example" // string | Filter by device metro (optional)
hostname := "hostname_example" // string | Filter by partial hostname (optional)
reserved := true // bool | Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. (optional)
tag := "tag_example" // string | Filter by device tag (optional)
Expand All @@ -1027,7 +1028,7 @@ func main() {

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
resp, r, err := apiClient.DevicesApi.FindProjectDevices(context.Background(), id).Search(search).Categories(categories).Facility(facility).Metro(metro).Hostname(hostname).Reserved(reserved).Tag(tag).Type_(type_).HasTerminationTime(hasTerminationTime).Include(include).Exclude(exclude).Page(page).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DevicesApi.FindProjectDevices``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand Down Expand Up @@ -1056,6 +1057,7 @@ Name | Type | Description | Notes
**search** | **string** | Search by hostname, description, short_id, reservation short_id, tags, plan name, plan slug, facility code, facility name, operating system name, operating system slug, IP addresses. |
**categories** | [**[]FindOrganizationDevicesCategoriesParameterInner**](FindOrganizationDevicesCategoriesParameterInner.md) | Filter by plan category |
**facility** | **string** | Filter by device facility |
**metro** | **string** | Filter by device metro |
**hostname** | **string** | Filter by partial hostname |
**reserved** | **bool** | Filter only reserved instances. When set to true, only include reserved instances. When set to false, only include on-demand instances. |
**tag** | **string** | Filter by device tag |
Expand Down
2 changes: 1 addition & 1 deletion docs/VrfUpdateInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**BgpDynamicNeighborsBfdEnabled** | Pointer to **bool** | Toggle BFD on dynamic bgp neighbors sessions | [optional]
**Description** | Pointer to **string** | | [optional]
**IpRanges** | Pointer to **[]string** | A list of CIDR network addresses. Like [\&quot;10.0.0.0/16\&quot;, \&quot;2001:d78::/56\&quot;]. IPv4 blocks must be between /8 and /29 in size. IPv6 blocks must be between /56 and /64. A VRF\\&#39;s IP ranges must be defined in order to create VRF IP Reservations, which can then be used for Metal Gateways or Virtual Circuits. Adding a new CIDR address to the list will result in the creation of a new IP Range for this VRF. Removal of an existing CIDR address from the list will result in the deletion of an existing IP Range for this VRF. Deleting an IP Range will result in the deletion of any VRF IP Reservations contained within the IP Range, as well as the VRF IP Reservation\\&#39;s associated Metal Gateways or Virtual Circuits. If you do not wish to add or remove IP Ranges, either include the full existing list of IP Ranges in the update request, or do not specify the &#x60;ip_ranges&#x60; field in the update request. Specifying a value of &#x60;[]&#x60; will remove all existing IP Ranges from the VRF. | [optional]
**LocalAsn** | Pointer to **int32** | The new &#x60;local_asn&#x60; value for the VRF. This field cannot be updated when there are active Interconnection Virtual Circuits associated to the VRF. | [optional]
**LocalAsn** | Pointer to **int32** | The new &#x60;local_asn&#x60; value for the VRF. This field cannot be updated when there are active Interconnection Virtual Circuits associated to the VRF, or if any of the VLANs of the VRF&#39;s metal gateway has been assigned on an instance. | [optional]
**Name** | Pointer to **string** | | [optional]
**Tags** | Pointer to **[]string** | | [optional]

Expand Down
3 changes: 3 additions & 0 deletions metal/v1/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ api_authentication.go
api_batches.go
api_bgp.go
api_capacity.go
api_console_log_details.go
api_devices.go
api_emails.go
api_events.go
Expand Down Expand Up @@ -86,6 +87,7 @@ docs/CapacityInput.md
docs/CapacityLevelPerBaremetal.md
docs/CapacityList.md
docs/Component.md
docs/ConsoleLogDetailsApi.md
docs/Coordinates.md
docs/CreateDeviceRequest.md
docs/CreateEmailInput.md
Expand Down Expand Up @@ -685,6 +687,7 @@ test/api_authentication_test.go
test/api_batches_test.go
test/api_bgp_test.go
test/api_capacity_test.go
test/api_console_log_details_test.go
test/api_devices_test.go
test/api_emails_test.go
test/api_events_test.go
Expand Down
Loading

0 comments on commit 38931a4

Please sign in to comment.