clients

package
v1.0.20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package clients contains functions for creating OpenStack service clients for use in acceptance tests. It also manages the required environment variables to run the tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBlockStorageV1Client

func NewBlockStorageV1Client() (*gophercloud.ServiceClient, error)

NewBlockStorageV1Client returns a *ServiceClient for making calls to the OpenStack Block Storage v1 API. An error will be returned if authentication or client creation was not possible.

func NewBlockStorageV2Client

func NewBlockStorageV2Client() (*gophercloud.ServiceClient, error)

NewBlockStorageV2Client returns a *ServiceClient for making calls to the OpenStack Block Storage v2 API. An error will be returned if authentication or client creation was not possible.

func NewBlockStorageV2NoAuthClient

func NewBlockStorageV2NoAuthClient() (*gophercloud.ServiceClient, error)

NewBlockStorageV2NoAuthClient returns a noauth *ServiceClient for making calls to the OpenStack Block Storage v2 API. An error will be returned if client creation was not possible.

func NewBlockStorageV3Client

func NewBlockStorageV3Client() (*gophercloud.ServiceClient, error)

NewBlockStorageV3Client returns a *ServiceClient for making calls to the OpenStack Block Storage v3 API. An error will be returned if authentication or client creation was not possible.

func NewBlockStorageV3NoAuthClient

func NewBlockStorageV3NoAuthClient() (*gophercloud.ServiceClient, error)

NewBlockStorageV3NoAuthClient returns a noauth *ServiceClient for making calls to the OpenStack Block Storage v2 API. An error will be returned if client creation was not possible.

func NewComputeV2Client

func NewComputeV2Client() (*gophercloud.ServiceClient, error)

NewComputeV2Client returns a *ServiceClient for making calls to the OpenStack Compute v2 API. An error will be returned if authentication or client creation was not possible.

func NewDBV1Client

func NewDBV1Client() (*gophercloud.ServiceClient, error)

NewDBV1Client returns a *ServiceClient for making calls to the OpenStack Database v1 API. An error will be returned if authentication or client creation was not possible.

func NewDNSV2Client

func NewDNSV2Client() (*gophercloud.ServiceClient, error)

NewDNSV2Client returns a *ServiceClient for making calls to the OpenStack Compute v2 API. An error will be returned if authentication or client creation was not possible.

func NewIdentityV2AdminClient

func NewIdentityV2AdminClient() (*gophercloud.ServiceClient, error)

NewIdentityV2AdminClient returns a *ServiceClient for making calls to the Admin Endpoint of the OpenStack Identity v2 API. An error will be returned if authentication or client creation was not possible.

func NewIdentityV2Client

func NewIdentityV2Client() (*gophercloud.ServiceClient, error)

NewIdentityV2Client returns a *ServiceClient for making calls to the OpenStack Identity v2 API. An error will be returned if authentication or client creation was not possible.

func NewIdentityV2UnauthenticatedClient

func NewIdentityV2UnauthenticatedClient() (*gophercloud.ServiceClient, error)

NewIdentityV2UnauthenticatedClient returns an unauthenticated *ServiceClient for the OpenStack Identity v2 API. An error will be returned if authentication or client creation was not possible.

func NewIdentityV3Client

func NewIdentityV3Client() (*gophercloud.ServiceClient, error)

NewIdentityV3Client returns a *ServiceClient for making calls to the OpenStack Identity v3 API. An error will be returned if authentication or client creation was not possible.

func NewIdentityV3UnauthenticatedClient

func NewIdentityV3UnauthenticatedClient() (*gophercloud.ServiceClient, error)

NewIdentityV3UnauthenticatedClient returns an unauthenticated *ServiceClient for the OpenStack Identity v3 API. An error will be returned if authentication or client creation was not possible.

func NewImageServiceV2Client

func NewImageServiceV2Client() (*gophercloud.ServiceClient, error)

NewImageServiceV2Client returns a *ServiceClient for making calls to the OpenStack Image v2 API. An error will be returned if authentication or client creation was not possible.

func NewNetworkV2Client

func NewNetworkV2Client() (*gophercloud.ServiceClient, error)

NewNetworkV2Client returns a *ServiceClient for making calls to the OpenStack Networking v2 API. An error will be returned if authentication or client creation was not possible.

func NewObjectStorageV1Client

func NewObjectStorageV1Client() (*gophercloud.ServiceClient, error)

NewObjectStorageV1Client returns a *ServiceClient for making calls to the OpenStack Object Storage v1 API. An error will be returned if authentication or client creation was not possible.

func NewSharedFileSystemV2Client

func NewSharedFileSystemV2Client() (*gophercloud.ServiceClient, error)

NewSharedFileSystemV2Client returns a *ServiceClient for making calls to the OpenStack Shared File System v2 API. An error will be returned if authentication or client creation was not possible.

Types

type AcceptanceTestChoices

type AcceptanceTestChoices struct {
	// ImageID contains the ID of a valid image.
	ImageID string

	// FlavorID contains the ID of a valid flavor.
	FlavorID string

	// FlavorIDResize contains the ID of a different flavor available on the same OpenStack installation, that is distinct
	// from FlavorID.
	FlavorIDResize string

	// FloatingIPPool contains the name of the pool from where to obtain floating IPs.
	FloatingIPPoolName string

	// NetworkName is the name of a network to launch the instance on.
	NetworkName string

	// ExternalNetworkID is the network ID of the external network.
	ExternalNetworkID string

	// ShareNetworkID is the Manila Share network ID
	ShareNetworkID string

	// DBDatastoreType is the datastore type for DB tests.
	DBDatastoreType string

	// DBDatastoreTypeID is the datastore type version for DB tests.
	DBDatastoreVersion string

	// LiveMigrate indicates ability to run multi-node migration tests
	LiveMigrate bool
}

AcceptanceTestChoices contains image and flavor selections for use by the acceptance tests.

func AcceptanceTestChoicesFromEnv

func AcceptanceTestChoicesFromEnv() (*AcceptanceTestChoices, error)

AcceptanceTestChoicesFromEnv populates a ComputeChoices struct from environment variables. If any required state is missing, an `error` will be returned that enumerates the missing properties.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL