Documentation ¶
Index ¶
- func CreateFromDevice(d *v1alpha2.Device, projectID string) *packngo.DeviceCreateRequest
- func GenerateObservation(device *packngo.Device) (v1alpha2.DeviceObservation, error)
- func GetConnectionDetails(device *packngo.Device) managed.ConnectionDetails
- func IsUpToDate(d *v1alpha2.Device, p *packngo.Device) (upToDate bool, networkTypeUpToDate bool)
- func LateInitialize(in *v1alpha2.DeviceParameters, device *packngo.Device)
- func NewUpdateDeviceRequest(d *v1alpha2.Device) *packngo.DeviceUpdateRequest
- type Client
- type ClientWithDefaults
- type CredentialedClient
- type PortsClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromDevice ¶
func CreateFromDevice(d *v1alpha2.Device, projectID string) *packngo.DeviceCreateRequest
CreateFromDevice return packngo.DeviceCreateRequest created from Kubernetes
func GenerateObservation ¶
func GenerateObservation(device *packngo.Device) (v1alpha2.DeviceObservation, error)
GenerateObservation produces v1alpha2.DeviceObservation from packngo.Device
func GetConnectionDetails ¶
func GetConnectionDetails(device *packngo.Device) managed.ConnectionDetails
GetConnectionDetails extracts managed.ConnectionDetails out of packngo.Device.
func IsUpToDate ¶
IsUpToDate returns true if the supplied Kubernetes resource does not differ from the supplied Equinix Metal resource. It considers only fields that can be modified in place without deleting and recreating the instance, which are immutable.
func LateInitialize ¶
func LateInitialize(in *v1alpha2.DeviceParameters, device *packngo.Device)
LateInitialize fills the empty fields in *v1alpha2.DeviceParameters with the values seen in packngo.Device
func NewUpdateDeviceRequest ¶
func NewUpdateDeviceRequest(d *v1alpha2.Device) *packngo.DeviceUpdateRequest
NewUpdateDeviceRequest creates a request to update an instance suitable for use with the Equinix Metal API.
Types ¶
type Client ¶
type Client interface { Get(deviceID string, getOpt *packngo.GetOptions) (*packngo.Device, *packngo.Response, error) Create(*packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error) Delete(deviceID string, force bool) (*packngo.Response, error) Update(string, *packngo.DeviceUpdateRequest) (*packngo.Device, *packngo.Response, error) }
Client implements the Equinix Metal API methods needed to interact with Devices for the Equinix Metal Crossplane Provider
type ClientWithDefaults ¶
type ClientWithDefaults interface { Client PortsClient clients.DefaultGetter }
ClientWithDefaults is an interface that provides Device services and provides default values for common properties
func NewClient ¶
func NewClient(ctx context.Context, config *clients.Credentials) (ClientWithDefaults, error)
NewClient returns a Client implementing the Equinix Metal API methods needed to interact with Devices for the Equinix Metal Crossplane Provider
type CredentialedClient ¶
type CredentialedClient struct { Client PortsClient *clients.Credentials }
CredentialedClient is a credentialed client to Equinix Metal Device services
type PortsClient ¶
type PortsClient interface { DeviceToNetworkType(string, string) (*packngo.Device, error) DeviceNetworkType(string) (string, error) ConvertDevice(*packngo.Device, string) error }
PortsClient implements the Equinix Metal API methods needed to interact with Ports for the Equinix Metal Crossplane Provider