Documentation
¶
Index ¶
- Constants
- Variables
- func GetInstanceSshKeyGroupName(instanceName string) string
- func GetSSHKeyFingerprint(publicKey string) (*string, error)
- func Int32PtrToIntPtr(i *int32) *int
- func IntPtr(i int) *int
- func IntPtrToInt32Ptr(i *int) *int32
- func StringPtr(s string) *string
- func WithLogger(ctx context.Context, logger Logger) context.Context
- type ApiError
- type ApiMetadata
- func (am *ApiMetadata) Initialize(ctx context.Context, org string, apiClient *standard.APIClient) *ApiError
- func (am *ApiMetadata) IsMinimumAPIVersion(requiredVersion string) (string, bool)
- func (am *ApiMetadata) SetDefaultSite(ctx context.Context, apiClient *standard.APIClient) *ApiError
- func (am *ApiMetadata) SetDefaultSubnet(ctx context.Context, apiClient *standard.APIClient) *ApiError
- func (am *ApiMetadata) SetDefaultVPC(ctx context.Context, apiClient *standard.APIClient) *ApiError
- func (am *ApiMetadata) SetDefaultVPCPrefix(ctx context.Context, apiClient *standard.APIClient) *ApiError
- type Client
- func (c *Client) Authenticate(ctx context.Context) error
- func (c *Client) BatchCreateExpectedMachines(ctx context.Context, requests []ExpectedMachineCreateRequest) ([]ExpectedMachine, *ApiError)
- func (c *Client) BatchUpdateExpectedMachines(ctx context.Context, updates []ExpectedMachineUpdateRequest) ([]ExpectedMachine, *ApiError)
- func (c *Client) CreateDpuExtensionService(ctx context.Context, request DpuExtensionServiceCreateRequest) (*DpuExtensionService, *ApiError)
- func (c *Client) CreateExpectedMachine(ctx context.Context, request ExpectedMachineCreateRequest) (*ExpectedMachine, *ApiError)
- func (c *Client) CreateInfinibandPartition(ctx context.Context, request InfinibandPartitionCreateRequest) (*InfinibandPartition, *ApiError)
- func (c *Client) CreateInstance(ctx context.Context, request InstanceCreateRequest) (*standard.Instance, *ApiError)
- func (c *Client) CreateNVLinkLogicalPartition(ctx context.Context, request NVLinkLogicalPartitionCreateRequest) (*NVLinkLogicalPartition, *ApiError)
- func (c *Client) CreateOperatingSystem(ctx context.Context, request OperatingSystemCreateRequest) (*OperatingSystem, *ApiError)
- func (c *Client) CreateSshKey(ctx context.Context, sshPublicKey string) (*standard.SshKey, *ApiError)
- func (c *Client) CreateSshKeyGroupForInstance(ctx context.Context, instanceName string, sshPublicKeys []string) (*standard.SshKeyGroup, *ApiError)
- func (c *Client) CreateVpc(ctx context.Context, request VpcCreateRequest) (*Vpc, *ApiError)
- func (c *Client) DeleteDpuExtensionService(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteDpuExtensionServiceVersion(ctx context.Context, id string, version string) *ApiError
- func (c *Client) DeleteExpectedMachine(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteInfinibandPartition(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteInstance(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteNVLinkLogicalPartition(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteOperatingSystem(ctx context.Context, id string) *ApiError
- func (c *Client) DeleteSshKeyGroup(ctx context.Context, sshKeyGroupID string) *ApiError
- func (c *Client) DeleteVpc(ctx context.Context, id string) *ApiError
- func (c *Client) GetDpuExtensionService(ctx context.Context, id string) (*DpuExtensionService, *ApiError)
- func (c *Client) GetDpuExtensionServiceVersion(ctx context.Context, id string, version string) (*standard.DpuExtensionServiceVersionInfo, *ApiError)
- func (c *Client) GetDpuExtensionServices(ctx context.Context, paginationFilter *PaginationFilter) ([]DpuExtensionService, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetExpectedMachine(ctx context.Context, id string) (*ExpectedMachine, *ApiError)
- func (c *Client) GetExpectedMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]ExpectedMachine, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetInfinibandPartition(ctx context.Context, id string) (*InfinibandPartition, *ApiError)
- func (c *Client) GetInfinibandPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]InfinibandPartition, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetInstance(ctx context.Context, id string) (*standard.Instance, *ApiError)
- func (c *Client) GetInstances(ctx context.Context, instanceFilter *InstanceFilter, ...) ([]standard.Instance, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetIpBlock(ctx context.Context, id string) (*IpBlock, *ApiError)
- func (c *Client) GetIpBlocks(ctx context.Context, paginationFilter *PaginationFilter) ([]IpBlock, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetMachine(ctx context.Context, id string) (*Machine, *ApiError)
- func (c *Client) GetMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]Machine, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetNVLinkLogicalPartition(ctx context.Context, id string) (*NVLinkLogicalPartition, *ApiError)
- func (c *Client) GetNVLinkLogicalPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]NVLinkLogicalPartition, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetOperatingSystem(ctx context.Context, id string) (*OperatingSystem, *ApiError)
- func (c *Client) GetOperatingSystems(ctx context.Context, paginationFilter *PaginationFilter) ([]OperatingSystem, *standard.PaginationResponse, *ApiError)
- func (c *Client) GetSiteID() string
- func (c *Client) GetSshKeyGroup(ctx context.Context, sshKeyGroupID string) (*standard.SshKeyGroup, *ApiError)
- func (c *Client) GetSubnetID() string
- func (c *Client) GetVpc(ctx context.Context, id string) (*Vpc, *ApiError)
- func (c *Client) GetVpcID() string
- func (c *Client) GetVpcPrefixID() string
- func (c *Client) GetVpcs(ctx context.Context, vpcFilter *VpcFilter, paginationFilter *PaginationFilter) ([]Vpc, *standard.PaginationResponse, *ApiError)
- func (c *Client) IsMinimumAPIVersion(requiredVersion string) (string, bool)
- func (c *Client) SetSiteID(siteID string)
- func (c *Client) SetSubnetID(subnetID string)
- func (c *Client) SetVpcID(vpcID string)
- func (c *Client) SetVpcPrefixID(vpcPrefixID string)
- func (c *Client) UpdateDpuExtensionService(ctx context.Context, id string, request DpuExtensionServiceUpdateRequest) (*DpuExtensionService, *ApiError)
- func (c *Client) UpdateExpectedMachine(ctx context.Context, id string, request ExpectedMachineUpdateRequest) (*ExpectedMachine, *ApiError)
- func (c *Client) UpdateInfinibandPartition(ctx context.Context, id string, request InfinibandPartitionUpdateRequest) (*InfinibandPartition, *ApiError)
- func (c *Client) UpdateInstance(ctx context.Context, id string, request InstanceUpdateRequest) (*standard.Instance, *ApiError)
- func (c *Client) UpdateNVLinkLogicalPartition(ctx context.Context, id string, request NVLinkLogicalPartitionUpdateRequest) (*NVLinkLogicalPartition, *ApiError)
- func (c *Client) UpdateOperatingSystem(ctx context.Context, id string, request OperatingSystemUpdateRequest) (*OperatingSystem, *ApiError)
- func (c *Client) UpdateToken(ctx context.Context, token string) error
- func (c *Client) UpdateVpc(ctx context.Context, id string, request VpcUpdateRequest) (*Vpc, *ApiError)
- type ClientConfig
- type ClientInterface
- type DpuExtensionService
- type DpuExtensionServiceCreateRequest
- type DpuExtensionServiceDeploymentRequest
- type DpuExtensionServiceManager
- func (dm DpuExtensionServiceManager) Create(ctx context.Context, request DpuExtensionServiceCreateRequest) (*DpuExtensionService, *ApiError)
- func (dm DpuExtensionServiceManager) Delete(ctx context.Context, id string) *ApiError
- func (dm DpuExtensionServiceManager) DeleteDpuExtensionServiceVersion(ctx context.Context, id string, version string) *ApiError
- func (dm DpuExtensionServiceManager) Get(ctx context.Context, id string) (*DpuExtensionService, *ApiError)
- func (dm DpuExtensionServiceManager) GetDpuExtensionServiceVersion(ctx context.Context, id string, version string) (*standard.DpuExtensionServiceVersionInfo, *ApiError)
- func (dm DpuExtensionServiceManager) GetDpuExtensionServices(ctx context.Context, paginationFilter *PaginationFilter) ([]DpuExtensionService, *standard.PaginationResponse, *ApiError)
- func (dm DpuExtensionServiceManager) Update(ctx context.Context, id string, request DpuExtensionServiceUpdateRequest) (*DpuExtensionService, *ApiError)
- type DpuExtensionServiceUpdateRequest
- type ExpectedMachine
- type ExpectedMachineCreateRequest
- type ExpectedMachineManager
- func (emm ExpectedMachineManager) BatchCreate(ctx context.Context, requests []ExpectedMachineCreateRequest) ([]ExpectedMachine, *ApiError)
- func (emm ExpectedMachineManager) BatchUpdate(ctx context.Context, updates []ExpectedMachineUpdateRequest) ([]ExpectedMachine, *ApiError)
- func (emm ExpectedMachineManager) Create(ctx context.Context, request ExpectedMachineCreateRequest) (*ExpectedMachine, *ApiError)
- func (emm ExpectedMachineManager) Delete(ctx context.Context, id string) *ApiError
- func (emm ExpectedMachineManager) Get(ctx context.Context, id string) (*ExpectedMachine, *ApiError)
- func (emm ExpectedMachineManager) GetExpectedMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]ExpectedMachine, *standard.PaginationResponse, *ApiError)
- func (emm ExpectedMachineManager) Update(ctx context.Context, id string, request ExpectedMachineUpdateRequest) (*ExpectedMachine, *ApiError)
- type ExpectedMachineUpdateRequest
- type InfiniBandInterfaceCreateOrUpdateRequest
- type InfinibandPartition
- type InfinibandPartitionCreateRequest
- type InfinibandPartitionManager
- func (ipm InfinibandPartitionManager) Create(ctx context.Context, request InfinibandPartitionCreateRequest) (*InfinibandPartition, *ApiError)
- func (ipm InfinibandPartitionManager) Delete(ctx context.Context, id string) *ApiError
- func (ipm InfinibandPartitionManager) Get(ctx context.Context, id string) (*InfinibandPartition, *ApiError)
- func (ipm InfinibandPartitionManager) GetInfinibandPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]InfinibandPartition, *standard.PaginationResponse, *ApiError)
- func (ipm InfinibandPartitionManager) Update(ctx context.Context, id string, request InfinibandPartitionUpdateRequest) (*InfinibandPartition, *ApiError)
- type InfinibandPartitionUpdateRequest
- type InstanceCreateRequest
- type InstanceFilter
- type InstanceManager
- func (im InstanceManager) Create(ctx context.Context, request InstanceCreateRequest) (*standard.Instance, *ApiError)
- func (im InstanceManager) Delete(ctx context.Context, id string) *ApiError
- func (im InstanceManager) Get(ctx context.Context, id string) (*standard.Instance, *ApiError)
- func (im InstanceManager) GetInstances(ctx context.Context, instanceFilter *InstanceFilter, ...) ([]standard.Instance, *standard.PaginationResponse, *ApiError)
- func (im InstanceManager) Update(ctx context.Context, id string, request InstanceUpdateRequest) (*standard.Instance, *ApiError)
- type InstanceUpdateRequest
- type IpBlock
- type IpBlockManager
- type Logger
- type Machine
- type MachineAdminInterface
- type MachineCapability
- type MachineManager
- type NVLinkInterfaceCreateOrUpdateRequest
- type NVLinkLogicalPartition
- type NVLinkLogicalPartitionCreateRequest
- type NVLinkLogicalPartitionManager
- func (nlm NVLinkLogicalPartitionManager) Create(ctx context.Context, request NVLinkLogicalPartitionCreateRequest) (*NVLinkLogicalPartition, *ApiError)
- func (nlm NVLinkLogicalPartitionManager) Delete(ctx context.Context, id string) *ApiError
- func (nlm NVLinkLogicalPartitionManager) Get(ctx context.Context, id string) (*NVLinkLogicalPartition, *ApiError)
- func (nlm NVLinkLogicalPartitionManager) GetNVLinkLogicalPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]NVLinkLogicalPartition, *standard.PaginationResponse, *ApiError)
- func (nlm NVLinkLogicalPartitionManager) Update(ctx context.Context, id string, request NVLinkLogicalPartitionUpdateRequest) (*NVLinkLogicalPartition, *ApiError)
- type NVLinkLogicalPartitionUpdateRequest
- type OperatingSystem
- type OperatingSystemCreateRequest
- type OperatingSystemManager
- func (osm OperatingSystemManager) Create(ctx context.Context, request OperatingSystemCreateRequest) (*OperatingSystem, *ApiError)
- func (osm OperatingSystemManager) Delete(ctx context.Context, id string) *ApiError
- func (osm OperatingSystemManager) Get(ctx context.Context, id string) (*OperatingSystem, *ApiError)
- func (osm OperatingSystemManager) GetOperatingSystems(ctx context.Context, paginationFilter *PaginationFilter) ([]OperatingSystem, *standard.PaginationResponse, *ApiError)
- func (osm OperatingSystemManager) Update(ctx context.Context, id string, request OperatingSystemUpdateRequest) (*OperatingSystem, *ApiError)
- type OperatingSystemUpdateRequest
- type PaginationFilter
- type SshKeyGroupManager
- func (skm SshKeyGroupManager) CreateSshKey(ctx context.Context, sshPublicKey string) (*standard.SshKey, *ApiError)
- func (skm SshKeyGroupManager) CreateSshKeyGroupForInstance(ctx context.Context, instanceName string, sshPublicKeys []string) (*standard.SshKeyGroup, *ApiError)
- func (skm SshKeyGroupManager) DeleteSshKeyGroup(ctx context.Context, sshKeyGroupID string) *ApiError
- func (skm SshKeyGroupManager) GetSshKeyGroup(ctx context.Context, sshKeyGroupID string) (*standard.SshKeyGroup, *ApiError)
- func (skm SshKeyGroupManager) IsSSHKeyGroupMatching(existingGroup *standard.SshKeyGroup, wantedSshKeyIDs []string) bool
- type Vpc
- type VpcCreateRequest
- type VpcFilter
- type VpcManager
- func (vm VpcManager) CreateVpc(ctx context.Context, request VpcCreateRequest) (*Vpc, *ApiError)
- func (vm VpcManager) DeleteVpc(ctx context.Context, id string) *ApiError
- func (vm VpcManager) GetVpc(ctx context.Context, id string) (*Vpc, *ApiError)
- func (vm VpcManager) GetVpcs(ctx context.Context, vpcFilter *VpcFilter, paginationFilter *PaginationFilter) ([]Vpc, *standard.PaginationResponse, *ApiError)
- func (vm VpcManager) UpdateVpc(ctx context.Context, id string, request VpcUpdateRequest) (*Vpc, *ApiError)
- type VpcUpdateRequest
Constants ¶
const ( // ServiceOrg is the organization ID the service should use for client initialization ServiceOrg = "vmaas-service" FNNVirtualizationType = "FNN" )
const (
// DpuExtensionServiceTypeKubernetesPod is the type of the DPU extension service for Kubernetes Pod
DpuExtensionServiceTypeKubernetesPod = "KubernetesPod"
)
const StatusClientClosedRequest = 499
StatusClientClosedRequest is the HTTP status code (499) used when the client closes the connection before the server responds. It is a non-standard code used by nginx and gRPC for cancelled requests.
Variables ¶
var ( // NotImplementedError is an error that is returned when a method is not implemented NotImplementedError = errors.New("not implemented") )
Functions ¶
func GetInstanceSshKeyGroupName ¶
GetInstanceSshKeyGroupName returns the name of the SSH Key Group for an Instance
func GetSSHKeyFingerprint ¶
GetSSHKeyFingerprint generates the fingerprint for a given SSH public key
func Int32PtrToIntPtr ¶
Int32PtrToIntPtr converts a *int32 to a *int
func IntPtrToInt32Ptr ¶
IntPtrToInt32Ptr converts a *int to a *int32
Types ¶
type ApiError ¶
type ApiError struct {
Code int `json:"code"`
Message string `json:"message"`
Data map[string]interface{} `json:"data"`
}
ApiError is a struct that encapsulates the error response from the API
func HandleResponseError ¶
HandleResponseError handles the response error from the API
type ApiMetadata ¶
type ApiMetadata struct {
// Organization is the organization ID for the service using this SDK
Organization string
// SiteId is ID of the Site all SDK requests are scoped to
SiteID string
// SiteName is the Name of the selected Site
SiteName string
// ProviderId is the provider ID for the service using this SDK
ProviderID string
// TenantID is the tenant ID for the service using this SDK
TenantID string
// VpcId is the ID of the default VPC for the Site
VpcID string
// VpcName is the Name of default VPC for the Site
VpcName string
// VpcNetworkVirtualizationType is the network virtualization type of the default VPC
VpcNetworkVirtualizationType string
// VpcPrefix is the prefix of the default VPC for the Site
VpcPrefixID string
// VpcPrefixName is the Prefix Name of the default VPC for the Site
VpcPrefixName string
// SubnetID is the ID of the default Subnet for the Site (used when FNN is not supported)
SubnetID string
// SubnetName is the Name of the default Subnet for the Site (used when FNN is not supported)
SubnetName string
// contains filtered or unexported fields
}
func (*ApiMetadata) Initialize ¶
func (am *ApiMetadata) Initialize(ctx context.Context, org string, apiClient *standard.APIClient) *ApiError
Initialize initializes the ApiMetadata struct. It will try to use preset values if provided, otherwise it will fetch and set the values from the API.
func (*ApiMetadata) IsMinimumAPIVersion ¶
func (am *ApiMetadata) IsMinimumAPIVersion(requiredVersion string) (string, bool)
IsMinimumAPIVersion returns the API version and whether it meets the required minimum. Returns false if the current API version is empty or does not start with "v", as semver.Compare treats two invalid versions as equal (returning 0), which would otherwise produce a false positive.
func (*ApiMetadata) SetDefaultSite ¶
SetDefaultSite try to use the preset SiteId if provided and exists, otherwise fetch and set a default Site for the Organization.
func (*ApiMetadata) SetDefaultSubnet ¶
func (am *ApiMetadata) SetDefaultSubnet(ctx context.Context, apiClient *standard.APIClient) *ApiError
SetDefaultSubnet try to use the preset SubnetId if provided and exists, otherwise fetch and set a default Subnet for the VPC.
func (*ApiMetadata) SetDefaultVPC ¶
SetDefaultVPC try to use the preset VpcId if provided and exists, otherwise fetch and set a default VPC for the Site.
func (*ApiMetadata) SetDefaultVPCPrefix ¶
func (am *ApiMetadata) SetDefaultVPCPrefix(ctx context.Context, apiClient *standard.APIClient) *ApiError
SetDefaultVPCPrefix try to use the preset VpcPrefixId if provided and exists, otherwise fetch and set a default VPC Prefix for the VPC.
type Client ¶
type Client struct {
// The configuration for the client supplied by the SDK user
Config ClientConfig
// Logger is the logger instance used by the client
Logger Logger
// contains filtered or unexported fields
}
Client is a struct that contains the client for the Forge API
func NewClient ¶
func NewClient(config ClientConfig) (*Client, error)
NewClient creates a new simple SDK client
func NewClientFromEnv ¶
NewClientFromEnv creates a new client from environment variables
func NewClientFromEnvWithLogger ¶
NewClientFromEnvWithLogger creates a new client from environment variables with the specified logger
func (*Client) Authenticate ¶
Authenticate initiate session with carbide-rest-api/keycloak and retrieve JWT. It also makes an API call to retrieve service-specific information to cache.
func (*Client) BatchCreateExpectedMachines ¶
func (c *Client) BatchCreateExpectedMachines(ctx context.Context, requests []ExpectedMachineCreateRequest) ([]ExpectedMachine, *ApiError)
func (*Client) BatchUpdateExpectedMachines ¶
func (c *Client) BatchUpdateExpectedMachines(ctx context.Context, updates []ExpectedMachineUpdateRequest) ([]ExpectedMachine, *ApiError)
func (*Client) CreateDpuExtensionService ¶
func (c *Client) CreateDpuExtensionService(ctx context.Context, request DpuExtensionServiceCreateRequest) (*DpuExtensionService, *ApiError)
DpuExtensionService
func (*Client) CreateExpectedMachine ¶
func (c *Client) CreateExpectedMachine(ctx context.Context, request ExpectedMachineCreateRequest) (*ExpectedMachine, *ApiError)
ExpectedMachine
func (*Client) CreateInfinibandPartition ¶
func (c *Client) CreateInfinibandPartition(ctx context.Context, request InfinibandPartitionCreateRequest) (*InfinibandPartition, *ApiError)
InfinibandPartition
func (*Client) CreateInstance ¶
func (c *Client) CreateInstance(ctx context.Context, request InstanceCreateRequest) (*standard.Instance, *ApiError)
Instance
func (*Client) CreateNVLinkLogicalPartition ¶
func (c *Client) CreateNVLinkLogicalPartition(ctx context.Context, request NVLinkLogicalPartitionCreateRequest) (*NVLinkLogicalPartition, *ApiError)
NVLinkLogicalPartition
func (*Client) CreateOperatingSystem ¶
func (c *Client) CreateOperatingSystem(ctx context.Context, request OperatingSystemCreateRequest) (*OperatingSystem, *ApiError)
OperatingSystem
func (*Client) CreateSshKey ¶
func (c *Client) CreateSshKey(ctx context.Context, sshPublicKey string) (*standard.SshKey, *ApiError)
SshKeyGroup
func (*Client) CreateSshKeyGroupForInstance ¶
func (*Client) DeleteDpuExtensionService ¶
func (*Client) DeleteDpuExtensionServiceVersion ¶
func (*Client) DeleteExpectedMachine ¶
func (*Client) DeleteInfinibandPartition ¶
func (*Client) DeleteInstance ¶
func (*Client) DeleteNVLinkLogicalPartition ¶
func (*Client) DeleteOperatingSystem ¶
func (*Client) DeleteSshKeyGroup ¶
func (*Client) GetDpuExtensionService ¶
func (*Client) GetDpuExtensionServiceVersion ¶
func (*Client) GetDpuExtensionServices ¶
func (c *Client) GetDpuExtensionServices(ctx context.Context, paginationFilter *PaginationFilter) ([]DpuExtensionService, *standard.PaginationResponse, *ApiError)
func (*Client) GetExpectedMachine ¶
func (*Client) GetExpectedMachines ¶
func (c *Client) GetExpectedMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]ExpectedMachine, *standard.PaginationResponse, *ApiError)
func (*Client) GetInfinibandPartition ¶
func (*Client) GetInfinibandPartitions ¶
func (c *Client) GetInfinibandPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]InfinibandPartition, *standard.PaginationResponse, *ApiError)
func (*Client) GetInstance ¶
func (*Client) GetInstances ¶
func (c *Client) GetInstances(ctx context.Context, instanceFilter *InstanceFilter, paginationFilter *PaginationFilter) ([]standard.Instance, *standard.PaginationResponse, *ApiError)
func (*Client) GetIpBlock ¶
func (*Client) GetIpBlocks ¶
func (c *Client) GetIpBlocks(ctx context.Context, paginationFilter *PaginationFilter) ([]IpBlock, *standard.PaginationResponse, *ApiError)
IpBlock
func (*Client) GetMachine ¶
func (*Client) GetMachines ¶
func (c *Client) GetMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]Machine, *standard.PaginationResponse, *ApiError)
Machine
func (*Client) GetNVLinkLogicalPartition ¶
func (*Client) GetNVLinkLogicalPartitions ¶
func (c *Client) GetNVLinkLogicalPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]NVLinkLogicalPartition, *standard.PaginationResponse, *ApiError)
func (*Client) GetOperatingSystem ¶
func (*Client) GetOperatingSystems ¶
func (c *Client) GetOperatingSystems(ctx context.Context, paginationFilter *PaginationFilter) ([]OperatingSystem, *standard.PaginationResponse, *ApiError)
func (*Client) GetSshKeyGroup ¶
func (*Client) GetSubnetID ¶
GetSubnetID returns the current Subnet ID from the client
func (*Client) GetVpcPrefixID ¶
GetVpcPrefixID returns the current VPC Prefix ID from the client
func (*Client) GetVpcs ¶
func (c *Client) GetVpcs(ctx context.Context, vpcFilter *VpcFilter, paginationFilter *PaginationFilter) ([]Vpc, *standard.PaginationResponse, *ApiError)
func (*Client) IsMinimumAPIVersion ¶
IsMinimumAPIVersion returns the API version and whether it meets the required minimum
func (*Client) SetSiteID ¶
SetSiteID sets the Site ID for the client. Can be used to override the default Site ID for testing.
func (*Client) SetSubnetID ¶
SetSubnetID sets the Subnet ID for the client
func (*Client) SetVpcPrefixID ¶
SetVpcPrefixID sets the VPC Prefix ID for the client
func (*Client) UpdateDpuExtensionService ¶
func (c *Client) UpdateDpuExtensionService(ctx context.Context, id string, request DpuExtensionServiceUpdateRequest) (*DpuExtensionService, *ApiError)
func (*Client) UpdateExpectedMachine ¶
func (c *Client) UpdateExpectedMachine(ctx context.Context, id string, request ExpectedMachineUpdateRequest) (*ExpectedMachine, *ApiError)
func (*Client) UpdateInfinibandPartition ¶
func (c *Client) UpdateInfinibandPartition(ctx context.Context, id string, request InfinibandPartitionUpdateRequest) (*InfinibandPartition, *ApiError)
func (*Client) UpdateInstance ¶
func (*Client) UpdateNVLinkLogicalPartition ¶
func (c *Client) UpdateNVLinkLogicalPartition(ctx context.Context, id string, request NVLinkLogicalPartitionUpdateRequest) (*NVLinkLogicalPartition, *ApiError)
func (*Client) UpdateOperatingSystem ¶
func (c *Client) UpdateOperatingSystem(ctx context.Context, id string, request OperatingSystemUpdateRequest) (*OperatingSystem, *ApiError)
func (*Client) UpdateToken ¶
UpdateToken updates the JWT token and re-authenticates
type ClientConfig ¶
type ClientConfig struct {
// BaseURL is the base URL of Carbide REST API. For in-cluster requests, use "https://carbide-rest-api.carbide-rest.svc.cluster.local"
BaseURL string
// Org is the organization to use for the client. Select desired service org from const.go.
Org string
// Token should contain a valid JWT
Token string
// Logger is the logger instance to use for SDK logging. If nil, a no-op logger will be used by default.
Logger Logger
}
ClientConfig is a struct that contains the configuration for the client
type ClientInterface ¶
type ClientInterface interface {
// Authentication management interfaces
Authenticate(ctx context.Context) error
UpdateToken(ctx context.Context, token string) error
// Instance management interfaces
CreateInstance(ctx context.Context, request InstanceCreateRequest) (*standard.Instance, *ApiError)
GetInstances(ctx context.Context, instanceFilter *InstanceFilter, paginationFilter *PaginationFilter) ([]standard.Instance, *standard.PaginationResponse, *ApiError)
GetInstance(ctx context.Context, id string) (*standard.Instance, *ApiError)
UpdateInstance(ctx context.Context, id string, request InstanceUpdateRequest) (*standard.Instance, *ApiError)
DeleteInstance(ctx context.Context, id string) *ApiError
// IP Block Management interfaces
GetIpBlocks(ctx context.Context, paginationFilter *PaginationFilter) ([]IpBlock, *standard.PaginationResponse, *ApiError)
GetIpBlock(ctx context.Context, id string) (*IpBlock, *ApiError)
// InfiniBand Partition management interfaces
CreateInfinibandPartition(ctx context.Context, request InfinibandPartitionCreateRequest) (*InfinibandPartition, *ApiError)
GetInfinibandPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]InfinibandPartition, *standard.PaginationResponse, *ApiError)
GetInfinibandPartition(ctx context.Context, id string) (*InfinibandPartition, *ApiError)
UpdateInfinibandPartition(ctx context.Context, id string, request InfinibandPartitionUpdateRequest) (*InfinibandPartition, *ApiError)
DeleteInfinibandPartition(ctx context.Context, id string) *ApiError
// Machine management interfaces
GetMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]Machine, *standard.PaginationResponse, *ApiError)
GetMachine(ctx context.Context, id string) (*Machine, *ApiError)
// Expected Machine management interfaces
CreateExpectedMachine(ctx context.Context, request ExpectedMachineCreateRequest) (*ExpectedMachine, *ApiError)
GetExpectedMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]ExpectedMachine, *standard.PaginationResponse, *ApiError)
GetExpectedMachine(ctx context.Context, id string) (*ExpectedMachine, *ApiError)
UpdateExpectedMachine(ctx context.Context, id string, request ExpectedMachineUpdateRequest) (*ExpectedMachine, *ApiError)
DeleteExpectedMachine(ctx context.Context, id string) *ApiError
BatchCreateExpectedMachines(ctx context.Context, requests []ExpectedMachineCreateRequest) ([]ExpectedMachine, *ApiError)
BatchUpdateExpectedMachines(ctx context.Context, updates []ExpectedMachineUpdateRequest) ([]ExpectedMachine, *ApiError)
// Operating System management interfaces
CreateOperatingSystem(ctx context.Context, request OperatingSystemCreateRequest) (*OperatingSystem, *ApiError)
GetOperatingSystems(ctx context.Context, paginationFilter *PaginationFilter) ([]OperatingSystem, *standard.PaginationResponse, *ApiError)
GetOperatingSystem(ctx context.Context, id string) (*OperatingSystem, *ApiError)
UpdateOperatingSystem(ctx context.Context, id string, request OperatingSystemUpdateRequest) (*OperatingSystem, *ApiError)
DeleteOperatingSystem(ctx context.Context, id string) *ApiError
// NVLink Logical Partition management interfaces
CreateNVLinkLogicalPartition(ctx context.Context, request NVLinkLogicalPartitionCreateRequest) (*NVLinkLogicalPartition, *ApiError)
GetNVLinkLogicalPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]NVLinkLogicalPartition, *standard.PaginationResponse, *ApiError)
GetNVLinkLogicalPartition(ctx context.Context, id string) (*NVLinkLogicalPartition, *ApiError)
UpdateNVLinkLogicalPartition(ctx context.Context, id string, request NVLinkLogicalPartitionUpdateRequest) (*NVLinkLogicalPartition, *ApiError)
DeleteNVLinkLogicalPartition(ctx context.Context, id string) *ApiError
// DPU Extension Service management interfaces
CreateDpuExtensionService(ctx context.Context, request DpuExtensionServiceCreateRequest) (*DpuExtensionService, *ApiError)
GetDpuExtensionServices(ctx context.Context, paginationFilter *PaginationFilter) ([]DpuExtensionService, *standard.PaginationResponse, *ApiError)
GetDpuExtensionService(ctx context.Context, id string) (*DpuExtensionService, *ApiError)
UpdateDpuExtensionService(ctx context.Context, id string, request DpuExtensionServiceUpdateRequest) (*DpuExtensionService, *ApiError)
DeleteDpuExtensionService(ctx context.Context, id string) *ApiError
GetDpuExtensionServiceVersion(ctx context.Context, id string, version string) (*standard.DpuExtensionServiceVersionInfo, *ApiError)
DeleteDpuExtensionServiceVersion(ctx context.Context, id string, version string) *ApiError
// VPC management interfaces
CreateVpc(ctx context.Context, request VpcCreateRequest) (*Vpc, *ApiError)
GetVpcs(ctx context.Context, vpcFilter *VpcFilter, paginationFilter *PaginationFilter) ([]Vpc, *standard.PaginationResponse, *ApiError)
GetVpc(ctx context.Context, id string) (*Vpc, *ApiError)
UpdateVpc(ctx context.Context, id string, request VpcUpdateRequest) (*Vpc, *ApiError)
DeleteVpc(ctx context.Context, id string) *ApiError
}
ClientInterface defines the methods for the simple SDK Client
type DpuExtensionService ¶
type DpuExtensionService struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
ServiceType string `json:"serviceType"`
Version *string `json:"version"`
ActiveVersions []string `json:"activeVersions"`
Status string `json:"status"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
DpuExtensionService represents a simplified DPU Extension Service
type DpuExtensionServiceCreateRequest ¶
type DpuExtensionServiceCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
ServiceType string `json:"serviceType"`
Data string `json:"data"`
}
DpuExtensionServiceCreateRequest represents a request to create a DPU Extension Service
type DpuExtensionServiceDeploymentRequest ¶
type DpuExtensionServiceDeploymentRequest struct {
DpuExtensionServiceID string `json:"dpuExtensionServiceId"`
Version *string `json:"version"`
}
DpuExtensionServiceDeploymentRequest represents a DPU extension service deployment
type DpuExtensionServiceManager ¶
type DpuExtensionServiceManager struct {
// contains filtered or unexported fields
}
DpuExtensionServiceManager manages DPU Extension Service operations
func NewDpuExtensionServiceManager ¶
func NewDpuExtensionServiceManager(client *Client) DpuExtensionServiceManager
NewDpuExtensionServiceManager creates a new DpuExtensionServiceManager
func (DpuExtensionServiceManager) Create ¶
func (dm DpuExtensionServiceManager) Create(ctx context.Context, request DpuExtensionServiceCreateRequest) (*DpuExtensionService, *ApiError)
Create creates a new DPU Extension Service
func (DpuExtensionServiceManager) Delete ¶
func (dm DpuExtensionServiceManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes a DPU Extension Service
func (DpuExtensionServiceManager) DeleteDpuExtensionServiceVersion ¶
func (dm DpuExtensionServiceManager) DeleteDpuExtensionServiceVersion(ctx context.Context, id string, version string) *ApiError
DeleteDpuExtensionServiceVersion deletes a specific version of a DPU extension service
func (DpuExtensionServiceManager) Get ¶
func (dm DpuExtensionServiceManager) Get(ctx context.Context, id string) (*DpuExtensionService, *ApiError)
Get returns a DPU Extension Service by ID
func (DpuExtensionServiceManager) GetDpuExtensionServiceVersion ¶
func (dm DpuExtensionServiceManager) GetDpuExtensionServiceVersion(ctx context.Context, id string, version string) (*standard.DpuExtensionServiceVersionInfo, *ApiError)
GetDpuExtensionServiceVersion returns information about a specific version of a DPU extension service
func (DpuExtensionServiceManager) GetDpuExtensionServices ¶
func (dm DpuExtensionServiceManager) GetDpuExtensionServices(ctx context.Context, paginationFilter *PaginationFilter) ([]DpuExtensionService, *standard.PaginationResponse, *ApiError)
GetDpuExtensionServices returns all DPU Extension Services
func (DpuExtensionServiceManager) Update ¶
func (dm DpuExtensionServiceManager) Update(ctx context.Context, id string, request DpuExtensionServiceUpdateRequest) (*DpuExtensionService, *ApiError)
Update updates a DPU Extension Service
type DpuExtensionServiceUpdateRequest ¶
type DpuExtensionServiceUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
Data *string `json:"data"`
}
DpuExtensionServiceUpdateRequest represents a request to update a DPU Extension Service
type ExpectedMachine ¶
type ExpectedMachine struct {
ID string `json:"id"`
BmcMacAddress string `json:"bmcMacAddress"`
ChassisSerialNumber string `json:"chassisSerialNumber"`
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
SkuID *string `json:"skuId"`
Sku *standard.Sku `json:"sku,omitempty"`
MachineID *string `json:"machineId"`
Machine *standard.MachineSummary `json:"machine,omitempty"`
Labels map[string]string `json:"labels"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
ExpectedMachine represents a simplified Expected Machine
type ExpectedMachineCreateRequest ¶
type ExpectedMachineCreateRequest struct {
BmcMacAddress string `json:"bmcMacAddress"`
BmcUsername *string `json:"bmcUsername"`
BmcPassword *string `json:"bmcPassword"`
ChassisSerialNumber string `json:"chassisSerialNumber"`
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
Labels map[string]string `json:"labels"`
}
ExpectedMachineCreateRequest represents a request to create an Expected Machine
type ExpectedMachineManager ¶
type ExpectedMachineManager struct {
// contains filtered or unexported fields
}
ExpectedMachineManager manages Expected Machine operations
func NewExpectedMachineManager ¶
func NewExpectedMachineManager(client *Client) ExpectedMachineManager
NewExpectedMachineManager creates a new ExpectedMachineManager
func (ExpectedMachineManager) BatchCreate ¶
func (emm ExpectedMachineManager) BatchCreate(ctx context.Context, requests []ExpectedMachineCreateRequest) ([]ExpectedMachine, *ApiError)
BatchCreate creates multiple Expected Machines (max 100 per request)
func (ExpectedMachineManager) BatchUpdate ¶
func (emm ExpectedMachineManager) BatchUpdate(ctx context.Context, updates []ExpectedMachineUpdateRequest) ([]ExpectedMachine, *ApiError)
BatchUpdate updates multiple Expected Machines (max 100 per request). Each request must have ID set.
func (ExpectedMachineManager) Create ¶
func (emm ExpectedMachineManager) Create(ctx context.Context, request ExpectedMachineCreateRequest) (*ExpectedMachine, *ApiError)
Create creates a new Expected Machine
func (ExpectedMachineManager) Delete ¶
func (emm ExpectedMachineManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes an Expected Machine
func (ExpectedMachineManager) Get ¶
func (emm ExpectedMachineManager) Get(ctx context.Context, id string) (*ExpectedMachine, *ApiError)
Get returns an Expected Machine by ID
func (ExpectedMachineManager) GetExpectedMachines ¶
func (emm ExpectedMachineManager) GetExpectedMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]ExpectedMachine, *standard.PaginationResponse, *ApiError)
GetExpectedMachines returns all Expected Machines
func (ExpectedMachineManager) Update ¶
func (emm ExpectedMachineManager) Update(ctx context.Context, id string, request ExpectedMachineUpdateRequest) (*ExpectedMachine, *ApiError)
Update updates an Expected Machine
type ExpectedMachineUpdateRequest ¶
type ExpectedMachineUpdateRequest struct {
ID string `json:"id,omitempty"` // Required for batch operations
BmcMacAddress *string `json:"bmcMacAddress"`
BmcUsername *string `json:"bmcUsername"`
BmcPassword *string `json:"bmcPassword"`
ChassisSerialNumber *string `json:"chassisSerialNumber"`
FallbackDPUSerialNumbers []string `json:"fallbackDPUSerialNumbers"`
SkuID *string `json:"skuId"`
Labels map[string]string `json:"labels"`
}
ExpectedMachineUpdateRequest represents a request to update an Expected Machine
type InfiniBandInterfaceCreateOrUpdateRequest ¶
type InfiniBandInterfaceCreateOrUpdateRequest struct {
PartitionID string `json:"partitionId"`
Device string `json:"device"`
Vendor *string `json:"vendor"`
DeviceInstance int `json:"deviceInstance"`
IsPhysical bool `json:"isPhysical"`
VirtualFunctionID *int `json:"virtualFunctionId"`
}
InfiniBandInterfaceCreateOrUpdateRequest represents an InfiniBand interface attachment
type InfinibandPartition ¶
type InfinibandPartition struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
PartitionKey *string `json:"partitionKey"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Status string `json:"status"`
}
InfinibandPartition represents a simplified InfiniBand Partition
type InfinibandPartitionCreateRequest ¶
type InfinibandPartitionCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
}
InfinibandPartitionCreateRequest represents a request to create an InfiniBand Partition
type InfinibandPartitionManager ¶
type InfinibandPartitionManager struct {
// contains filtered or unexported fields
}
InfinibandPartitionManager manages InfiniBand Partition operations
func NewInfinibandPartitionManager ¶
func NewInfinibandPartitionManager(client *Client) InfinibandPartitionManager
NewInfinibandPartitionManager creates a new InfinibandPartitionManager
func (InfinibandPartitionManager) Create ¶
func (ipm InfinibandPartitionManager) Create(ctx context.Context, request InfinibandPartitionCreateRequest) (*InfinibandPartition, *ApiError)
Create creates a new InfiniBand Partition
func (InfinibandPartitionManager) Delete ¶
func (ipm InfinibandPartitionManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes an InfiniBand Partition
func (InfinibandPartitionManager) Get ¶
func (ipm InfinibandPartitionManager) Get(ctx context.Context, id string) (*InfinibandPartition, *ApiError)
Get returns an InfiniBand Partition by ID
func (InfinibandPartitionManager) GetInfinibandPartitions ¶
func (ipm InfinibandPartitionManager) GetInfinibandPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]InfinibandPartition, *standard.PaginationResponse, *ApiError)
GetInfinibandPartitions returns all InfiniBand Partitions
func (InfinibandPartitionManager) Update ¶
func (ipm InfinibandPartitionManager) Update(ctx context.Context, id string, request InfinibandPartitionUpdateRequest) (*InfinibandPartition, *ApiError)
Update updates an InfiniBand Partition
type InfinibandPartitionUpdateRequest ¶
type InfinibandPartitionUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
}
InfinibandPartitionUpdateRequest represents a request to update an InfiniBand Partition
type InstanceCreateRequest ¶
type InstanceCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
MachineID string `json:"machineId"`
VpcID *string `json:"vpcId"`
IpxeScript string `json:"ipxeScript"`
UserData *string `json:"userData"`
SSHKeys []string `json:"sshKeys"`
Labels map[string]string `json:"labels"`
InfinibandInterfaces []InfiniBandInterfaceCreateOrUpdateRequest `json:"infinibandInterfaces"`
NVLinkInterfaces []NVLinkInterfaceCreateOrUpdateRequest `json:"nvLinkInterfaces"`
DpuExtensionServiceDeployments []DpuExtensionServiceDeploymentRequest `json:"dpuExtensionServiceDeployments"`
}
InstanceCreateRequest represents a simplified request to create an Instance
type InstanceFilter ¶
InstanceFilter encapsulates instance list filter parameters
type InstanceManager ¶
type InstanceManager struct {
// contains filtered or unexported fields
}
InstanceManager manages Instance operations
func NewInstanceManager ¶
func NewInstanceManager(client *Client) InstanceManager
NewInstanceManager creates a new InstanceManager
func (InstanceManager) Create ¶
func (im InstanceManager) Create(ctx context.Context, request InstanceCreateRequest) (*standard.Instance, *ApiError)
Create creates a new Instance
func (InstanceManager) Delete ¶
func (im InstanceManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes an Instance
func (InstanceManager) GetInstances ¶
func (im InstanceManager) GetInstances(ctx context.Context, instanceFilter *InstanceFilter, paginationFilter *PaginationFilter) ([]standard.Instance, *standard.PaginationResponse, *ApiError)
GetInstances returns all Instances
func (InstanceManager) Update ¶
func (im InstanceManager) Update(ctx context.Context, id string, request InstanceUpdateRequest) (*standard.Instance, *ApiError)
Update updates an Instance
type InstanceUpdateRequest ¶
type InstanceUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
IpxeScript *string `json:"ipxeScript"`
UserData *string `json:"userData"`
Labels map[string]string `json:"labels"`
InfinibandInterfaces []InfiniBandInterfaceCreateOrUpdateRequest `json:"infinibandInterfaces"`
NVLinkInterfaces []NVLinkInterfaceCreateOrUpdateRequest `json:"nvLinkInterfaces"`
DpuExtensionServiceDeployments []DpuExtensionServiceDeploymentRequest `json:"dpuExtensionServiceDeployments"`
}
InstanceUpdateRequest represents a simplified request to update an Instance
type IpBlock ¶
type IpBlock struct {
ID string `json:"id"`
Name *string `json:"name"`
Description *string `json:"description"`
SiteID *string `json:"siteId"`
Cidr string `json:"cidr"` // prefix/prefixLength
ProtocolVersion *string `json:"protocolVersion"`
Status string `json:"status"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
IpBlock represents a simplified IP block
type IpBlockManager ¶
type IpBlockManager struct {
// contains filtered or unexported fields
}
IpBlockManager manages IP block operations
func NewIpBlockManager ¶
func NewIpBlockManager(client *Client) IpBlockManager
NewIpBlockManager creates a new IpBlockManager
func (IpBlockManager) GetIpBlock ¶
GetIpBlock returns an IP block by ID
func (IpBlockManager) GetIpBlocks ¶
func (im IpBlockManager) GetIpBlocks(ctx context.Context, paginationFilter *PaginationFilter) ([]IpBlock, *standard.PaginationResponse, *ApiError)
GetIpBlocks returns all IP blocks
type Logger ¶
Logger is an alias for *zerolog.Logger
func LoggerFromContext ¶
LoggerFromContext extracts the logger from the context. If no logger is found in the context, it returns a no-op logger.
func NewNoOpLogger ¶
func NewNoOpLogger() Logger
NewNoOpLogger returns a no-op logger that discards all log messages
type Machine ¶
type Machine struct {
ID string `json:"id"`
InstanceTypeID *string `json:"instanceTypeId"`
InstanceID *string `json:"instanceId"`
Vendor *string `json:"vendor"`
ProductName *string `json:"productName"`
SerialNumber *string `json:"serialNumber"`
Hostname *string `json:"hostname"`
MachineCapabilities []MachineCapability `json:"machineCapabilities"`
AdminInterfaces []MachineAdminInterface `json:"adminInterfaces"`
MaintenanceMessage *string `json:"maintenanceMessage"`
Labels map[string]string `json:"labels"`
Status string `json:"status"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
Machine represents a simplified Machine
type MachineAdminInterface ¶
type MachineAdminInterface struct {
ID *string `json:"id"`
IsPrimary *bool `json:"isPrimary"`
MacAddress *string `json:"macAddress"`
IpAddresses []string `json:"ipAddresses"`
Created *time.Time `json:"created"`
Updated *time.Time `json:"updated"`
}
MachineAdminInterface describes an interface attached to a machine
type MachineCapability ¶
type MachineCapability struct {
Type string `json:"type"`
Name string `json:"name"`
Frequency *string `json:"frequency"`
Cores *int `json:"cores"`
Threads *int `json:"threads"`
Capacity *string `json:"capacity"`
Vendor *string `json:"vendor"`
InactiveDevices []int `json:"inactiveDevices"`
Count *int `json:"count"`
DeviceType *string `json:"deviceType"`
}
MachineCapability represents a machine capability
type MachineManager ¶
type MachineManager struct {
// contains filtered or unexported fields
}
MachineManager manages Machine operations
func NewMachineManager ¶
func NewMachineManager(client *Client) MachineManager
NewMachineManager creates a new MachineManager
func (MachineManager) GetMachine ¶
GetMachine returns a Machine by ID
func (MachineManager) GetMachines ¶
func (mm MachineManager) GetMachines(ctx context.Context, paginationFilter *PaginationFilter) ([]Machine, *standard.PaginationResponse, *ApiError)
GetMachines returns all Machines
type NVLinkInterfaceCreateOrUpdateRequest ¶
type NVLinkInterfaceCreateOrUpdateRequest struct {
NVLinkLogicalPartitionID string `json:"nvLinkLogicalPartitionId"`
DeviceInstance int `json:"deviceInstance"`
}
NVLinkInterfaceCreateOrUpdateRequest represents an NVLink interface attachment
type NVLinkLogicalPartition ¶
type NVLinkLogicalPartition struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
Status string `json:"status"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
NVLinkLogicalPartition represents a simplified NVLink Logical Partition
type NVLinkLogicalPartitionCreateRequest ¶
type NVLinkLogicalPartitionCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
}
NVLinkLogicalPartitionCreateRequest represents a request to create an NVLink Logical Partition
type NVLinkLogicalPartitionManager ¶
type NVLinkLogicalPartitionManager struct {
// contains filtered or unexported fields
}
NVLinkLogicalPartitionManager manages NVLink Logical Partition operations
func NewNVLinkLogicalPartitionManager ¶
func NewNVLinkLogicalPartitionManager(client *Client) NVLinkLogicalPartitionManager
NewNVLinkLogicalPartitionManager creates a new NVLinkLogicalPartitionManager
func (NVLinkLogicalPartitionManager) Create ¶
func (nlm NVLinkLogicalPartitionManager) Create(ctx context.Context, request NVLinkLogicalPartitionCreateRequest) (*NVLinkLogicalPartition, *ApiError)
Create creates a new NVLink Logical Partition
func (NVLinkLogicalPartitionManager) Delete ¶
func (nlm NVLinkLogicalPartitionManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes an NVLink Logical Partition
func (NVLinkLogicalPartitionManager) Get ¶
func (nlm NVLinkLogicalPartitionManager) Get(ctx context.Context, id string) (*NVLinkLogicalPartition, *ApiError)
Get returns an NVLink Logical Partition by ID
func (NVLinkLogicalPartitionManager) GetNVLinkLogicalPartitions ¶
func (nlm NVLinkLogicalPartitionManager) GetNVLinkLogicalPartitions(ctx context.Context, paginationFilter *PaginationFilter) ([]NVLinkLogicalPartition, *standard.PaginationResponse, *ApiError)
GetNVLinkLogicalPartitions returns all NVLink Logical Partitions
func (NVLinkLogicalPartitionManager) Update ¶
func (nlm NVLinkLogicalPartitionManager) Update(ctx context.Context, id string, request NVLinkLogicalPartitionUpdateRequest) (*NVLinkLogicalPartition, *ApiError)
Update updates an NVLink Logical Partition
type NVLinkLogicalPartitionUpdateRequest ¶
type NVLinkLogicalPartitionUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
}
NVLinkLogicalPartitionUpdateRequest represents a request to update an NVLink Logical Partition
type OperatingSystem ¶
type OperatingSystem struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
IpxeScript *string `json:"ipxeScript"`
UserData *string `json:"userData"`
Status string `json:"status"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
OperatingSystem represents a simplified Operating System
type OperatingSystemCreateRequest ¶
type OperatingSystemCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
IpxeScript *string `json:"ipxeScript"`
UserData *string `json:"userData"`
}
OperatingSystemCreateRequest represents a request to create an Operating System
type OperatingSystemManager ¶
type OperatingSystemManager struct {
// contains filtered or unexported fields
}
OperatingSystemManager manages Operating System operations
func NewOperatingSystemManager ¶
func NewOperatingSystemManager(client *Client) OperatingSystemManager
NewOperatingSystemManager creates a new OperatingSystemManager
func (OperatingSystemManager) Create ¶
func (osm OperatingSystemManager) Create(ctx context.Context, request OperatingSystemCreateRequest) (*OperatingSystem, *ApiError)
Create creates a new Operating System
func (OperatingSystemManager) Delete ¶
func (osm OperatingSystemManager) Delete(ctx context.Context, id string) *ApiError
Delete deletes an Operating System
func (OperatingSystemManager) Get ¶
func (osm OperatingSystemManager) Get(ctx context.Context, id string) (*OperatingSystem, *ApiError)
Get returns an Operating System by ID
func (OperatingSystemManager) GetOperatingSystems ¶
func (osm OperatingSystemManager) GetOperatingSystems(ctx context.Context, paginationFilter *PaginationFilter) ([]OperatingSystem, *standard.PaginationResponse, *ApiError)
GetOperatingSystems returns all Operating Systems
func (OperatingSystemManager) Update ¶
func (osm OperatingSystemManager) Update(ctx context.Context, id string, request OperatingSystemUpdateRequest) (*OperatingSystem, *ApiError)
Update updates an Operating System
type OperatingSystemUpdateRequest ¶
type OperatingSystemUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
IpxeScript *string `json:"ipxeScript"`
UserData *string `json:"userData"`
}
OperatingSystemUpdateRequest represents a request to update an Operating System
type PaginationFilter ¶
type PaginationFilter struct {
// PageNumber is the page number to retrieve
PageNumber *int
// PageSize is the number of items per page
PageSize *int
// OrderBy is the field to order the results by
OrderBy *string
}
PaginationFilter is a struct that encapsulates supported query parameters for pagination
type SshKeyGroupManager ¶
type SshKeyGroupManager struct {
// contains filtered or unexported fields
}
SshKeyGroupManager manages SSH Key Group operations
func NewSshKeyGroupManager ¶
func NewSshKeyGroupManager(client *Client) SshKeyGroupManager
NewSshKeyGroupManager creates a new SshKeyGroupManager
func (SshKeyGroupManager) CreateSshKey ¶
func (skm SshKeyGroupManager) CreateSshKey(ctx context.Context, sshPublicKey string) (*standard.SshKey, *ApiError)
CreateSshKey creates a new SSH Key (uses fingerprint as name)
func (SshKeyGroupManager) CreateSshKeyGroupForInstance ¶
func (skm SshKeyGroupManager) CreateSshKeyGroupForInstance(ctx context.Context, instanceName string, sshPublicKeys []string) (*standard.SshKeyGroup, *ApiError)
CreateSshKeyGroupForInstance creates a new SSH Key Group for the specified Instance
func (SshKeyGroupManager) DeleteSshKeyGroup ¶
func (skm SshKeyGroupManager) DeleteSshKeyGroup(ctx context.Context, sshKeyGroupID string) *ApiError
DeleteSshKeyGroup deletes an SSH Key Group
func (SshKeyGroupManager) GetSshKeyGroup ¶
func (skm SshKeyGroupManager) GetSshKeyGroup(ctx context.Context, sshKeyGroupID string) (*standard.SshKeyGroup, *ApiError)
GetSshKeyGroup returns an SSH Key Group by ID
func (SshKeyGroupManager) IsSSHKeyGroupMatching ¶
func (skm SshKeyGroupManager) IsSSHKeyGroupMatching(existingGroup *standard.SshKeyGroup, wantedSshKeyIDs []string) bool
IsSSHKeyGroupMatching checks if an existing group matches the wanted SSH key IDs
type Vpc ¶
type Vpc struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description"`
NetworkVirtualizationType string `json:"networkVirtualizationType"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
Vpc represents a simplified VPC
type VpcCreateRequest ¶
type VpcCreateRequest struct {
Name string `json:"name"`
Description *string `json:"description"`
NetworkVirtualizationType string `json:"networkVirtualizationType"`
}
VpcCreateRequest is a request to create a VPC
type VpcFilter ¶
type VpcFilter struct {
SiteID *string
}
VpcFilter encapsulates VPC filter parameters
type VpcManager ¶
type VpcManager struct {
// contains filtered or unexported fields
}
VpcManager manages VPC operations
func NewVpcManager ¶
func NewVpcManager(client *Client) VpcManager
NewVpcManager creates a new VpcManager
func (VpcManager) CreateVpc ¶
func (vm VpcManager) CreateVpc(ctx context.Context, request VpcCreateRequest) (*Vpc, *ApiError)
CreateVpc creates a new VPC
func (VpcManager) DeleteVpc ¶
func (vm VpcManager) DeleteVpc(ctx context.Context, id string) *ApiError
DeleteVpc deletes a VPC
func (VpcManager) GetVpcs ¶
func (vm VpcManager) GetVpcs(ctx context.Context, vpcFilter *VpcFilter, paginationFilter *PaginationFilter) ([]Vpc, *standard.PaginationResponse, *ApiError)
GetVpcs returns all VPCs
func (VpcManager) UpdateVpc ¶
func (vm VpcManager) UpdateVpc(ctx context.Context, id string, request VpcUpdateRequest) (*Vpc, *ApiError)
UpdateVpc updates a VPC
type VpcUpdateRequest ¶
type VpcUpdateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
}
VpcUpdateRequest is a request to update a VPC
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
expectedmachine
command
|
|
|
expectedmachine/batch_manage
command
|
|
|
instance
command
|
|
|
instance/create
command
|
|
|
instance/filter_by_name
command
|
|
|
instance/multi_vpc
command
|
|
|
ipblock
command
|
|
|
machine
command
|
|
|
vpc
command
|
|
|
vpc/manage
command
|