gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/extensions/servergroups Index | Files

package servergroups

import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/servergroups"

Package servergroups provides the ability to manage server groups

Index

Package Files

doc.go requests.go results.go urls.go

func ExtractServerGroups Uses

func ExtractServerGroups(page pagination.Page) ([]ServerGroup, error)

ExtractServerGroups interprets a page of results as a slice of ServerGroups.

func List Uses

func List(client *gophercloud.ServiceClient) pagination.Pager

List returns a Pager that allows you to iterate over a collection of ServerGroups.

type CreateOpts Uses

type CreateOpts struct {
    // Name is the name of the server group
    Name string

    // Policies are the server group policies
    Policies []string
}

CreateOpts specifies a Server Group allocation request

func (CreateOpts) ToServerGroupCreateMap Uses

func (opts CreateOpts) ToServerGroupCreateMap() (map[string]interface{}, error)

ToServerGroupCreateMap constructs a request body from CreateOpts.

type CreateOptsBuilder Uses

type CreateOptsBuilder interface {
    ToServerGroupCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder describes struct types that can be accepted by the Create call. Notably, the CreateOpts struct in this package does.

type CreateResult Uses

type CreateResult struct {
    ServerGroupResult
}

CreateResult is the response from a Create operation. Call its Extract method to interpret it as a ServerGroup.

func Create Uses

func Create(client *gophercloud.ServiceClient, opts CreateOptsBuilder) CreateResult

Create requests the creation of a new Server Group

type DeleteResult Uses

type DeleteResult struct {
    gophercloud.ErrResult
}

DeleteResult is the response from a Delete operation. Call its Extract method to determine if the call succeeded or failed.

func Delete Uses

func Delete(client *gophercloud.ServiceClient, id string) DeleteResult

Delete requests the deletion of a previously allocated ServerGroup.

type GetResult Uses

type GetResult struct {
    ServerGroupResult
}

GetResult is the response from a Get operation. Call its Extract method to interpret it as a ServerGroup.

func Get Uses

func Get(client *gophercloud.ServiceClient, id string) GetResult

Get returns data about a previously created ServerGroup.

type ServerGroup Uses

type ServerGroup struct {
    // ID is the unique ID of the Server Group.
    ID  string `mapstructure:"id"`

    // Name is the common name of the server group.
    Name string `mapstructure:"name"`

    // Polices are the group policies.
    Policies []string `mapstructure:"policies"`

    // Members are the members of the server group.
    Members []string `mapstructure:"members"`

    // Metadata includes a list of all user-specified key-value pairs attached to the Server Group.
    Metadata map[string]interface{}
}

A ServerGroup creates a policy for instance placement in the cloud

type ServerGroupResult Uses

type ServerGroupResult struct {
    gophercloud.Result
}

func (ServerGroupResult) Extract Uses

func (r ServerGroupResult) Extract() (*ServerGroup, error)

Extract is a method that attempts to interpret any Server Group resource response as a ServerGroup struct.

type ServerGroupsPage Uses

type ServerGroupsPage struct {
    pagination.SinglePageBase
}

ServerGroupsPage stores a single, only page of ServerGroups results from a List call.

func (ServerGroupsPage) IsEmpty Uses

func (page ServerGroupsPage) IsEmpty() (bool, error)

IsEmpty determines whether or not a ServerGroupsPage is empty.

Package servergroups imports 4 packages (graph) and is imported by 33 packages. Updated 2016-07-23. Refresh now. Tools for package owners.