baremetal

package
v1.0.0-beta.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package baremetal provides methods and message types of the baremetal v3 API.

Index

Constants

View Source
const (
	ListServerPrivateNetworksRequestOrderByCreatedAtAsc  = ListServerPrivateNetworksRequestOrderBy("created_at_asc")
	ListServerPrivateNetworksRequestOrderByCreatedAtDesc = ListServerPrivateNetworksRequestOrderBy("created_at_desc")
	ListServerPrivateNetworksRequestOrderByUpdatedAtAsc  = ListServerPrivateNetworksRequestOrderBy("updated_at_asc")
	ListServerPrivateNetworksRequestOrderByUpdatedAtDesc = ListServerPrivateNetworksRequestOrderBy("updated_at_desc")
)
View Source
const (
	ServerPrivateNetworkStatusUnknownStatus = ServerPrivateNetworkStatus("unknown_status")
	ServerPrivateNetworkStatusAttaching     = ServerPrivateNetworkStatus("attaching")
	ServerPrivateNetworkStatusAttached      = ServerPrivateNetworkStatus("attached")
	ServerPrivateNetworkStatusError         = ServerPrivateNetworkStatus("error")
	ServerPrivateNetworkStatusDetaching     = ServerPrivateNetworkStatus("detaching")
	ServerPrivateNetworkStatusLocked        = ServerPrivateNetworkStatus("locked")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ListServerPrivateNetworksRequestOrderBy

type ListServerPrivateNetworksRequestOrderBy string

func (ListServerPrivateNetworksRequestOrderBy) MarshalJSON

func (enum ListServerPrivateNetworksRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListServerPrivateNetworksRequestOrderBy) String

func (*ListServerPrivateNetworksRequestOrderBy) UnmarshalJSON

func (enum *ListServerPrivateNetworksRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListServerPrivateNetworksRequestOrderBy) Values

type ListServerPrivateNetworksResponse

type ListServerPrivateNetworksResponse struct {
	ServerPrivateNetworks []*ServerPrivateNetwork `json:"server_private_networks"`

	TotalCount uint64 `json:"total_count"`
}

ListServerPrivateNetworksResponse: list server private networks response.

func (*ListServerPrivateNetworksResponse) UnsafeAppend

func (r *ListServerPrivateNetworksResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListServerPrivateNetworksResponse) UnsafeGetTotalCount

func (r *ListServerPrivateNetworksResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type PrivateNetworkAPI

type PrivateNetworkAPI struct {
	// contains filtered or unexported fields
}

Elastic Metal - Private Networks API.

func NewPrivateNetworkAPI

func NewPrivateNetworkAPI(client *scw.Client) *PrivateNetworkAPI

NewPrivateNetworkAPI returns a PrivateNetworkAPI object from a Scaleway client.

func (*PrivateNetworkAPI) AddServerPrivateNetwork

AddServerPrivateNetwork: Add an Elastic Metal server to a Private Network.

func (*PrivateNetworkAPI) DeleteServerPrivateNetwork

DeleteServerPrivateNetwork: Delete a Private Network.

func (*PrivateNetworkAPI) ListServerPrivateNetworks

ListServerPrivateNetworks: List the Private Networks of an Elastic Metal server.

func (*PrivateNetworkAPI) SetServerPrivateNetworks

SetServerPrivateNetworks: Configure multiple Private Networks on an Elastic Metal server.

func (*PrivateNetworkAPI) WaitForServerPrivateNetworks

func (s *PrivateNetworkAPI) WaitForServerPrivateNetworks(req *WaitForServerPrivateNetworksRequest, opts ...scw.RequestOption) ([]*ServerPrivateNetwork, error)

WaitForServerPrivateNetworks wait for all server private networks to be in a "terminal state" before returning. This function can be used to wait for all server private networks to be set.

func (*PrivateNetworkAPI) Zones

func (s *PrivateNetworkAPI) Zones() []scw.Zone

type PrivateNetworkAPIAddServerPrivateNetworkRequest

type PrivateNetworkAPIAddServerPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server.
	ServerID string `json:"-"`

	// PrivateNetworkID: UUID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`

	// IpamIPIDs: iPAM IDs of an IPs to attach to the server.
	IpamIPIDs []string `json:"ipam_ip_ids"`
}

PrivateNetworkAPIAddServerPrivateNetworkRequest: private network api add server private network request.

type PrivateNetworkAPIDeleteServerPrivateNetworkRequest

type PrivateNetworkAPIDeleteServerPrivateNetworkRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server.
	ServerID string `json:"-"`

	// PrivateNetworkID: UUID of the Private Network.
	PrivateNetworkID string `json:"-"`
}

PrivateNetworkAPIDeleteServerPrivateNetworkRequest: private network api delete server private network request.

type PrivateNetworkAPIListServerPrivateNetworksRequest

type PrivateNetworkAPIListServerPrivateNetworksRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// OrderBy: sort order for the returned Private Networks.
	// Default value: created_at_asc
	OrderBy ListServerPrivateNetworksRequestOrderBy `json:"-"`

	// Page: page number for the returned Private Networks.
	Page *int32 `json:"-"`

	// PageSize: maximum number of Private Networks per page.
	PageSize *uint32 `json:"-"`

	// ServerID: filter Private Networks by server UUID.
	ServerID *string `json:"-"`

	// PrivateNetworkID: filter Private Networks by Private Network UUID.
	PrivateNetworkID *string `json:"-"`

	// OrganizationID: filter Private Networks by organization UUID.
	OrganizationID *string `json:"-"`

	// ProjectID: filter Private Networks by project UUID.
	ProjectID *string `json:"-"`

	// IpamIPIDs: filter Private Networks by IPAM IP UUIDs.
	IpamIPIDs []string `json:"-"`
}

PrivateNetworkAPIListServerPrivateNetworksRequest: private network api list server private networks request.

type PrivateNetworkAPISetServerPrivateNetworksRequest

type PrivateNetworkAPISetServerPrivateNetworksRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	// ServerID: UUID of the server.
	ServerID string `json:"-"`

	// PerPrivateNetworkIpamIPIDs: object where the keys are the UUIDs of Private Networks and the values are arrays of IPAM IDs representing the IPs to assign to this Elastic Metal server on the Private Network. If the array supplied for a Private Network is empty, the next available IP from the Private Network's CIDR block will automatically be used for attachment.
	PerPrivateNetworkIpamIPIDs map[string]*[]string `json:"per_private_network_ipam_ip_ids"`
}

PrivateNetworkAPISetServerPrivateNetworksRequest: private network api set server private networks request.

type ServerPrivateNetwork

type ServerPrivateNetwork struct {
	// ID: UUID of the Server-to-Private Network mapping.
	ID string `json:"id"`

	// ProjectID: private Network Project UUID.
	ProjectID string `json:"project_id"`

	// ServerID: server UUID.
	ServerID string `json:"server_id"`

	// PrivateNetworkID: private Network UUID.
	PrivateNetworkID string `json:"private_network_id"`

	// Vlan: vLAN UUID associated with the Private Network.
	Vlan *uint32 `json:"vlan"`

	// Status: configuration status of the Private Network.
	// Default value: unknown_status
	Status ServerPrivateNetworkStatus `json:"status"`

	// CreatedAt: private Network creation date.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date the Private Network was last modified.
	UpdatedAt *time.Time `json:"updated_at"`

	// IpamIPIDs: iPAM IP IDs of the server, if it has any.
	IpamIPIDs []string `json:"ipam_ip_ids"`
}

ServerPrivateNetwork: server private network.

type ServerPrivateNetworkStatus

type ServerPrivateNetworkStatus string

func (ServerPrivateNetworkStatus) MarshalJSON

func (enum ServerPrivateNetworkStatus) MarshalJSON() ([]byte, error)

func (ServerPrivateNetworkStatus) String

func (enum ServerPrivateNetworkStatus) String() string

func (*ServerPrivateNetworkStatus) UnmarshalJSON

func (enum *ServerPrivateNetworkStatus) UnmarshalJSON(data []byte) error

func (ServerPrivateNetworkStatus) Values

type SetServerPrivateNetworksResponse

type SetServerPrivateNetworksResponse struct {
	ServerPrivateNetworks []*ServerPrivateNetwork `json:"server_private_networks"`
}

SetServerPrivateNetworksResponse: set server private networks response.

type WaitForServerPrivateNetworksRequest

type WaitForServerPrivateNetworksRequest struct {
	ServerID      string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForServerPrivateNetworksRequest is used by WaitForServerPrivateNetworks method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL