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 ¶
- Variables
- func NewBareMetalIntrospectionV1Client() (*gophercloud.ServiceClient, error)
- func NewBareMetalV1Client() (*gophercloud.ServiceClient, error)
- func NewBareMetalV1HTTPBasic() (*gophercloud.ServiceClient, error)
- func NewBareMetalV1NoAuthClient() (*gophercloud.ServiceClient, error)
- func NewBlockStorageV1Client() (*gophercloud.ServiceClient, error)
- func NewBlockStorageV2Client() (*gophercloud.ServiceClient, error)
- func NewBlockStorageV2NoAuthClient() (*gophercloud.ServiceClient, error)
- func NewBlockStorageV3Client() (*gophercloud.ServiceClient, error)
- func NewBlockStorageV3NoAuthClient() (*gophercloud.ServiceClient, error)
- func NewClusteringV1Client() (*gophercloud.ServiceClient, error)
- func NewComputeV2Client() (*gophercloud.ServiceClient, error)
- func NewContainerInfraV1Client() (*gophercloud.ServiceClient, error)
- func NewContainerV1Client() (*gophercloud.ServiceClient, error)
- func NewDBV1Client() (*gophercloud.ServiceClient, error)
- func NewDNSV2Client() (*gophercloud.ServiceClient, error)
- func NewIdentityV2AdminClient() (*gophercloud.ServiceClient, error)
- func NewIdentityV2Client() (*gophercloud.ServiceClient, error)
- func NewIdentityV2UnauthenticatedClient() (*gophercloud.ServiceClient, error)
- func NewIdentityV3Client() (*gophercloud.ServiceClient, error)
- func NewIdentityV3UnauthenticatedClient() (*gophercloud.ServiceClient, error)
- func NewImageServiceV2Client() (*gophercloud.ServiceClient, error)
- func NewKeyManagerV1Client() (*gophercloud.ServiceClient, error)
- func NewLoadBalancerV2Client() (*gophercloud.ServiceClient, error)
- func NewMessagingV2Client(clientID string) (*gophercloud.ServiceClient, error)
- func NewNetworkV2Client() (*gophercloud.ServiceClient, error)
- func NewObjectStorageV1Client() (*gophercloud.ServiceClient, error)
- func NewOrchestrationV1Client() (*gophercloud.ServiceClient, error)
- func NewPlacementV1Client() (*gophercloud.ServiceClient, error)
- func NewSharedFileSystemV2Client() (*gophercloud.ServiceClient, error)
- func NewWorkflowV2Client() (*gophercloud.ServiceClient, error)
- func RequireAdmin(t *testing.T)
- func RequireDNS(t *testing.T)
- func RequireGuestAgent(t *testing.T)
- func RequireIdentityV2(t *testing.T)
- func RequireIronicHTTPBasic(t *testing.T)
- func RequireLiveMigration(t *testing.T)
- func RequireLong(t *testing.T)
- func RequireNonAdmin(t *testing.T)
- func RequireNovaNetwork(t *testing.T)
- func RequirePortForwarding(t *testing.T)
- func SkipRelease(t *testing.T, release string)
- type AcceptanceTestChoices
- type LogRoundTripper
Constants ¶
This section is empty.
Variables ¶
var REDACT_HEADERS = []string{"x-auth-token", "x-auth-key", "x-service-token",
"x-storage-token", "x-account-meta-temp-url-key", "x-account-meta-temp-url-key-2",
"x-container-meta-temp-url-key", "x-container-meta-temp-url-key-2", "set-cookie",
"x-subject-token"}
List of headers that need to be redacted
Functions ¶
func NewBareMetalIntrospectionV1Client ¶
func NewBareMetalIntrospectionV1Client() (*gophercloud.ServiceClient, error)
NewBareMetalIntrospectionV1Client returns a *ServiceClient for making calls to the OpenStack Bare Metal Introspection v1 API. An error will be returned if authentication or client creation was not possible.
func NewBareMetalV1Client ¶
func NewBareMetalV1Client() (*gophercloud.ServiceClient, error)
NewBareMetalV1Client returns a *ServiceClient for making calls to the OpenStack Bare Metal v1 API. An error will be returned if authentication or client creation was not possible.
func NewBareMetalV1HTTPBasic ¶
func NewBareMetalV1HTTPBasic() (*gophercloud.ServiceClient, error)
NewBareMetalV1HTTPBasic returns a *ServiceClient for making calls to the OpenStack Bare Metal v1 API. An error will be returned if authentication or client creation was not possible.
func NewBareMetalV1NoAuthClient ¶
func NewBareMetalV1NoAuthClient() (*gophercloud.ServiceClient, error)
NewBareMetalV1NoAuthClient returns a *ServiceClient for making calls to the OpenStack Bare Metal v1 API. An error will be returned if authentication or client creation was not possible.
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 NewClusteringV1Client ¶
func NewClusteringV1Client() (*gophercloud.ServiceClient, error)
NewClusteringV1Client returns a *ServiceClient for making calls to the OpenStack Clustering v1 API. An error will be returned if authentication or 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 NewContainerInfraV1Client ¶
func NewContainerInfraV1Client() (*gophercloud.ServiceClient, error)
NewContainerInfraV1Client returns a *ServiceClient for making calls to the OpenStack Container Infra Management v1 API. An error will be returned if authentication or client creation was not possible.
func NewContainerV1Client ¶
func NewContainerV1Client() (*gophercloud.ServiceClient, error)
NewContainerV1Client returns a *ServiceClient for making calls to the OpenStack Container V1 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 NewKeyManagerV1Client ¶
func NewKeyManagerV1Client() (*gophercloud.ServiceClient, error)
NewKeyManagerV1Client returns a *ServiceClient for making calls to the OpenStack Key Manager (Barbican) v1 API. An error will be returned if authentication or client creation was not possible.
func NewLoadBalancerV2Client ¶
func NewLoadBalancerV2Client() (*gophercloud.ServiceClient, error)
NewLoadBalancerV2Client returns a *ServiceClient for making calls to the OpenStack Octavia v2 API. An error will be returned if authentication or client creation was not possible.
func NewMessagingV2Client ¶
func NewMessagingV2Client(clientID string) (*gophercloud.ServiceClient, error)
NewMessagingV2Client returns a *ServiceClient for making calls to the OpenStack Messaging (Zaqar) 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 NewOrchestrationV1Client ¶
func NewOrchestrationV1Client() (*gophercloud.ServiceClient, error)
NewOrchestrationV1Client returns a *ServiceClient for making calls to the OpenStack Orchestration v1 API. An error will be returned if authentication or client creation was not possible.
func NewPlacementV1Client ¶
func NewPlacementV1Client() (*gophercloud.ServiceClient, error)
NewPlacementV1Client returns a *ServiceClient for making calls to the OpenStack Placement 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.
func NewWorkflowV2Client ¶
func NewWorkflowV2Client() (*gophercloud.ServiceClient, error)
NewWorkflowV2Client returns a *ServiceClient for making calls to the OpenStack Workflow v2 API (Mistral). An error will be returned if authentication or client creation failed.
func RequireAdmin ¶
RequireAdmin will restrict a test to only be run by admin users.
func RequireDNS ¶
RequireDNS will restrict a test to only be run in environments that support DNSaaS.
func RequireGuestAgent ¶
RequireGuestAgent will restrict a test to only be run in environments that support the QEMU guest agent.
func RequireIdentityV2 ¶
RequireIdentityV2 will restrict a test to only be run in environments that support the Identity V2 API.
func RequireIronicHTTPBasic ¶
RequireIronicHTTPBasic will restric a test to be only run in environments that have Ironic using http_basic.
func RequireLiveMigration ¶
RequireLiveMigration will restrict a test to only be run in environments that support live migration.
func RequireLong ¶
RequireLong will ensure long-running tests can run.
func RequireNonAdmin ¶
RequireNonAdmin will restrict a test to only be run by non-admin users.
func RequireNovaNetwork ¶
RequireNovaNetwork will restrict a test to only be run in environments that support nova-network.
func RequirePortForwarding ¶
RequirePortForwarding will restrict a test to only be run in environments that support port forwarding
func SkipRelease ¶
SkipRelease will have the test be skipped on a certain release. Releases are named such as 'stable/mitaka', master, etc.
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 // MagnumKeypair contains the ID of a valid key pair. MagnumKeypair string // MagnumImageID contains the ID of a valid magnum image. MagnumImageID string // NetworkName is the name of a network to launch the instance on. NetworkName string // NetworkID is the ID of a network to launch the instance on. NetworkID string // SubnetID is the ID of a subnet to launch the instance on. SubnetID string // ExternalNetworkID is the network ID of the external network. ExternalNetworkID string // DBDatastoreType is the datastore type for DB tests. DBDatastoreType string // DBDatastoreTypeID is the datastore type version for DB tests. DBDatastoreVersion string }
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.
type LogRoundTripper ¶
type LogRoundTripper struct {
Rt http.RoundTripper
}
LogRoundTripper satisfies the http.RoundTripper interface and is used to customize the default http client RoundTripper to allow logging.