Back to godoc.org

Package openstack

v1.0.0
Latest Go to latest

The latest major version is .

Published: Oct 28, 2014 | License: Apache-2.0 | Module: github.com/rackspace/gophercloud

Index

Variables

var (
	ErrNoAuthURL  = fmt.Errorf("Environment variable OS_AUTH_URL needs to be set.")
	ErrNoUsername = fmt.Errorf("Environment variable OS_USERNAME needs to be set.")
	ErrNoPassword = fmt.Errorf("Environment variable OS_PASSWORD needs to be set.")
)

ErrNoAuthUrl, ErrNoUsername, and ErrNoPassword errors indicate of the required OS_AUTH_URL, OS_USERNAME, or OS_PASSWORD environment variables, respectively, remain undefined. See the AuthOptions() function for more details.

func AuthOptionsFromEnv

func AuthOptionsFromEnv() (gophercloud.AuthOptions, error)

AuthOptions fills out an identity.AuthOptions structure with the settings found on the various OpenStack OS_* environment variables. The following variables provide sources of truth: OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, OS_TENANT_ID, and OS_TENANT_NAME. Of these, OS_USERNAME, OS_PASSWORD, and OS_AUTH_URL must have settings, or an error will result. OS_TENANT_ID and OS_TENANT_NAME are optional.

func Authenticate

func Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error

Authenticate or re-authenticate against the most recent identity service supported at the provided endpoint.

func AuthenticateV2

func AuthenticateV2(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error

AuthenticateV2 explicitly authenticates against the identity v2 endpoint.

func AuthenticateV3

func AuthenticateV3(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error

AuthenticateV3 explicitly authenticates against the identity v3 service.

func AuthenticatedClient

func AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)

AuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint specified by options, acquires a token, and returns a Client instance that's ready to operate. It first queries the root identity endpoint to determine which versions of the identity service are supported, then chooses the most recent identity service available to proceed.

func NewBlockStorageV1

func NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)

NewBlockStorageV1 creates a ServiceClient that may be used to access the v1 block storage service.

func NewClient

func NewClient(endpoint string) (*gophercloud.ProviderClient, error)

NewClient prepares an unauthenticated ProviderClient instance. Most users will probably prefer using the AuthenticatedClient function instead. This is useful if you wish to explicitly control the version of the identity service that's used for authentication explicitly, for example.

func NewComputeV2

func NewComputeV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)

NewComputeV2 creates a ServiceClient that may be used with the v2 compute package.

func NewIdentityV2

func NewIdentityV2(client *gophercloud.ProviderClient) *gophercloud.ServiceClient

NewIdentityV2 creates a ServiceClient that may be used to interact with the v2 identity service.

func NewIdentityV3

func NewIdentityV3(client *gophercloud.ProviderClient) *gophercloud.ServiceClient

NewIdentityV3 creates a ServiceClient that may be used to access the v3 identity service.

func NewNetworkV2

func NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)

NewNetworkV2 creates a ServiceClient that may be used with the v2 network package.

func NewObjectStorageV1

func NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)

NewObjectStorageV1 creates a ServiceClient that may be used with the v1 object storage package.

func V2EndpointURL

func V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error)

V2EndpointURL discovers the endpoint URL for a specific service from a ServiceCatalog acquired during the v2 identity service. The specified EndpointOpts are used to identify a unique, unambiguous endpoint to return. It's an error both when multiple endpoints match the provided criteria and when none do. The minimum that can be specified is a Type, but you will also often need to specify a Name and/or a Region depending on what's available on your OpenStack deployment.

func V3EndpointURL

func V3EndpointURL(v3Client *gophercloud.ServiceClient, opts gophercloud.EndpointOpts) (string, error)

V3EndpointURL discovers the endpoint URL for a specific service using multiple calls against an identity v3 service endpoint. The specified EndpointOpts are used to identify a unique, unambiguous endpoint to return. It's an error both when multiple endpoints match the provided criteria and when none do. The minimum that can be specified is a Type, but you will also often need to specify a Name and/or a Region depending on what's available on your OpenStack deployment.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier