Documentation ¶
Index ¶
- func GenerateBuilderMetadata(o *flags.BuildOptions) map[string]string
- type CloudsProvider
- type ComputeClient
- func (c *ComputeClient) AttachIP(serverID, fip string) error
- func (c *ComputeClient) CreateKeypair(keyNamePrefix string) (*keypairs.KeyPair, error)
- func (c *ComputeClient) CreateServer(keypairName string, flavor, networkID string, attachConfigDrive *bool, ...) (*servers.Server, error)
- func (c *ComputeClient) GetFlavorIDByName(name string) (string, error)
- func (c *ComputeClient) GetServerStatus(sid string) (bool, error)
- func (c *ComputeClient) RemoveKeypair(keyName string) error
- func (c *ComputeClient) RemoveServer(serverID string) error
- type ImageClient
- func (c *ImageClient) FetchAllImages(wildcard string) ([]images.Image, error)
- func (c *ImageClient) FetchImage(imgID string) (*images.Image, error)
- func (c *ImageClient) ModifyImageMetadata(imgID string, key, value string, operation images.UpdateOp) (*images.Image, error)
- func (c *ImageClient) RemoveImage(imgID string) error
- type NetworkClient
- type Provider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBuilderMetadata ¶
func GenerateBuilderMetadata(o *flags.BuildOptions) map[string]string
GenerateBuilderMetadata generates some glance metadata for the image.
Types ¶
type CloudsProvider ¶
type CloudsProvider struct {
// contains filtered or unexported fields
}
CloudsProvider creates a client from clouds.yaml.
func NewCloudsProvider ¶
func NewCloudsProvider(cloud string) *CloudsProvider
NewCloudsProvider creates the initial client for connecting to Openstack.
func (*CloudsProvider) Client ¶
func (c *CloudsProvider) Client() (*gophercloud.ProviderClient, error)
type ComputeClient ¶
type ComputeClient struct {
// contains filtered or unexported fields
}
func NewComputeClient ¶
func NewComputeClient(provider Provider) (*ComputeClient, error)
func (*ComputeClient) AttachIP ¶
func (c *ComputeClient) AttachIP(serverID, fip string) error
AttachIP attaches the provided IP to the provided server.
func (*ComputeClient) CreateKeypair ¶
func (c *ComputeClient) CreateKeypair(keyNamePrefix string) (*keypairs.KeyPair, error)
CreateKeypair creates a new KeyPair in Openstack.
func (*ComputeClient) CreateServer ¶
func (c *ComputeClient) CreateServer(keypairName string, flavor, networkID string, attachConfigDrive *bool, userData []byte, imageID string) (*servers.Server, error)
CreateServer creates a compute instance in Openstack.
func (*ComputeClient) GetFlavorIDByName ¶
func (c *ComputeClient) GetFlavorIDByName(name string) (string, error)
GetFlavorIDByName will take a name of a flavor and attempt to find the ID from Openstack.
func (*ComputeClient) GetServerStatus ¶
func (c *ComputeClient) GetServerStatus(sid string) (bool, error)
GetServerStatus gets the status of a server
func (*ComputeClient) RemoveKeypair ¶
func (c *ComputeClient) RemoveKeypair(keyName string) error
RemoveKeypair will delete a Keypair from Openstack.
func (*ComputeClient) RemoveServer ¶
func (c *ComputeClient) RemoveServer(serverID string) error
RemoveServer will delete a Server from Openstack.
type ImageClient ¶
type ImageClient struct {
// contains filtered or unexported fields
}
func NewImageClient ¶
func NewImageClient(provider Provider) (*ImageClient, error)
func (*ImageClient) FetchAllImages ¶
func (c *ImageClient) FetchAllImages(wildcard string) ([]images.Image, error)
FetchAllImages Fetches all the images from Openstack so that they can parsed after. Because silly GopherCloud - or maybe OpenStack itself doesn't support wildcard search on names and the tag search is limited to an id+tag :facepalm: This probably can be improved though to prevent fetching billions of images.
func (*ImageClient) FetchImage ¶
func (c *ImageClient) FetchImage(imgID string) (*images.Image, error)
FetchImage allows us to fetch a single image by the id.
func (*ImageClient) ModifyImageMetadata ¶
func (c *ImageClient) ModifyImageMetadata(imgID string, key, value string, operation images.UpdateOp) (*images.Image, error)
ModifyImageMetadata allows image metadata to be added, updated or removed.
func (*ImageClient) RemoveImage ¶
func (c *ImageClient) RemoveImage(imgID string) error
RemoveImage will delete an image from Openstack.
type NetworkClient ¶
type NetworkClient struct {
// contains filtered or unexported fields
}
func NewNetworkClient ¶
func NewNetworkClient(provider Provider) (*NetworkClient, error)
func (*NetworkClient) GetFloatingIP ¶
func (n *NetworkClient) GetFloatingIP(networkName string) (*floatingips.FloatingIP, error)
GetFloatingIP will create a new FIP.
func (*NetworkClient) RemoveFIP ¶
func (n *NetworkClient) RemoveFIP(fipID string) error
RemoveFIP will delete a Floating IP from Openstack.
type Provider ¶
type Provider interface {
Client() (*gophercloud.ProviderClient, error)
}