Documentation ¶
Index ¶
- func Create(client *edgecloud.ServiceClient, opts CreateOptsBuilder) (r tasks.Result)
- func List(client *edgecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListAll(client *edgecloud.ServiceClient, opts ListOptsBuilder) ([]instances.Instance, error)
- func Rebuild(client *edgecloud.ServiceClient, instanceID string, ...) (r tasks.Result)
- type CreateNewInterfaceFloatingIPOpts
- type CreateOpts
- type CreateOptsBuilder
- type InterfaceOpts
- type ListOpts
- type ListOptsBuilder
- type RebuildInstanceOpts
- type RebuildInstanceOptsBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(client *edgecloud.ServiceClient, opts CreateOptsBuilder) (r tasks.Result)
Create creates an baremetal instance.
func List ¶
func List(client *edgecloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
func ListAll ¶
func ListAll(client *edgecloud.ServiceClient, opts ListOptsBuilder) ([]instances.Instance, error)
ListAll is a convenience function that returns all instances.
func Rebuild ¶
func Rebuild(client *edgecloud.ServiceClient, instanceID string, opts RebuildInstanceOptsBuilder) (r tasks.Result)
Rebuild an baremetal instance with new image_id.
Types ¶
type CreateNewInterfaceFloatingIPOpts ¶
type CreateNewInterfaceFloatingIPOpts struct { Source types.FloatingIPSource `json:"source" validate:"required,enum"` ExistingFloatingID string `json:"existing_floating_id" validate:"rfe=Source:existing,sfe=Source:new,omitempty,uuid4"` }
func (CreateNewInterfaceFloatingIPOpts) Validate ¶
func (opts CreateNewInterfaceFloatingIPOpts) Validate() error
Validate CreateNewInterfaceFloatingIPOpts.
type CreateOpts ¶
type CreateOpts struct { Flavor string `json:"flavor" required:"true"` Names []string `json:"names,omitempty" validate:"required_without=NameTemplates"` NameTemplates []string `json:"name_templates,omitempty" validate:"required_without=Names"` ImageID string `json:"image_id,omitempty" validate:"required_without=AppTemplateID"` AppTemplateID string `json:"apptemplate_id,omitempty" validate:"required_without=ImageID"` Interfaces []InterfaceOpts `json:"interfaces" required:"true" validate:"required,dive"` Keypair string `json:"keypair_name,omitempty"` Password string `json:"password" validate:"omitempty,required_with=Username"` Username string `json:"username" validate:"omitempty,required_with=Password"` UserData string `json:"user_data,omitempty" validate:"omitempty,base64"` AppConfig map[string]interface{} `json:"app_config,omitempty" validate:"omitempty"` Metadata *instances.MetadataSetOpts `json:"metadata,omitempty" validate:"omitempty,dive"` }
CreateOpts represents options used to create a instance.
func (CreateOpts) ToInstanceCreateMap ¶
func (opts CreateOpts) ToInstanceCreateMap() (map[string]interface{}, error)
ToInstanceCreateMap builds a request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type InterfaceOpts ¶
type InterfaceOpts struct { Type types.InterfaceType `json:"type" validate:"omitempty,enum"` NetworkID string `json:"network_id,omitempty" validate:"rfe=Type:subnet,omitempty,uuid4"` SubnetID string `json:"subnet_id,omitempty" validate:"rfe=Type:subnet,omitempty,uuid4"` PortID string `json:"port_id,omitempty" validate:"rfe=Type:reserved_fixed_ip,allowed_without_all=NetworkID SubnetID,omitempty,uuid4"` FloatingIP *CreateNewInterfaceFloatingIPOpts `json:"floating_ip,omitempty" validate:"omitempty,dive"` }
type ListOpts ¶
type ListOpts struct { Name string `q:"name"` FlavorID string `q:"flavor_id"` Metadata map[string]string `q:"metadata_kv" validate:"omitempty"` }
ListOpts allows the filtering and sorting of paginated collections through the API.
func (ListOpts) ToInstanceListQuery ¶
ToInstanceListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type RebuildInstanceOpts ¶
type RebuildInstanceOpts struct {
ImageID string `json:"image_id" required:"true" validate:"required"`
}
RebuildInstanceOpts allows rebuild a baremetal instance with new image_id.
func (RebuildInstanceOpts) ToRebuildInstanceCreateMap ¶
func (opts RebuildInstanceOpts) ToRebuildInstanceCreateMap() (map[string]interface{}, error)
ToRebuildInstanceCreateMap formats a RebuildInstanceOpts into a query string.
type RebuildInstanceOptsBuilder ¶
type RebuildInstanceOptsBuilder interface {
ToRebuildInstanceCreateMap() (map[string]interface{}, error)
}
RebuildInstanceOptsBuilder allows extensions to add additional parameters to the Rebuild request.