{"modulePath":"github.com/bumblebeeK/gophercloud","version":"v0.0.0-20240626085050-f1be5ca9a0a0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package openstack\n\nPackage openstack contains resources for the individual OpenStack projects supported in Gophercloud. It also includes functions to authenticate to an OpenStack cloud and for provisioning various service-level clients.\n\nExample of Creating a Service Client\n\n\tao, err := openstack.AuthOptionsFromEnv()\n\tprovider, err := openstack.AuthenticatedClient(ao)\n\tclient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{\n\t\tRegion: os.Getenv(\"OS_REGION_NAME\"),\n\t})\n\n## Functions\n\n```go\nfunc AuthOptionsFromEnv() (gophercloud.AuthOptions, error)\n```\nAuthOptionsFromEnv fills out an identity.AuthOptions structure with the settings found on the various OpenStack OS\\_\\* environment variables.\n\nThe following variables provide sources of truth: OS\\_AUTH\\_URL, OS\\_USERNAME, OS\\_PASSWORD and OS\\_PROJECT\\_ID.\n\nOf these, OS\\_USERNAME, OS\\_PASSWORD, and OS\\_AUTH\\_URL must have settings, or an error will result.  OS\\_PROJECT\\_ID, is optional.\n\nOS\\_TENANT\\_ID and OS\\_TENANT\\_NAME are deprecated forms of OS\\_PROJECT\\_ID and OS\\_PROJECT\\_NAME and the latter are expected against a v3 auth api.\n\nIf OS\\_PROJECT\\_ID and OS\\_PROJECT\\_NAME are set, they will still be referred as \"tenant\" in Gophercloud.\n\nIf OS\\_PROJECT\\_NAME is set, it requires OS\\_PROJECT\\_ID to be set as well to handle projects not on the default domain.\n\nTo use this function, first set the OS\\_\\* environment variables (for example, by sourcing an \\`openrc\\` file), then:\n\n\topts, err := openstack.AuthOptionsFromEnv()\n\tprovider, err := openstack.AuthenticatedClient(opts)\n\n```go\nfunc Authenticate(client *gophercloud.ProviderClient, options gophercloud.AuthOptions) error\n```\nAuthenticate or re-authenticate against the most recent identity service supported at the provided endpoint.\n\n```go\nfunc AuthenticateV2(client *gophercloud.ProviderClient, options gophercloud.AuthOptions, eo gophercloud.EndpointOpts) error\n```\nAuthenticateV2 explicitly authenticates against the identity v2 endpoint.\n\n```go\nfunc AuthenticateV3(client *gophercloud.ProviderClient, options tokens3.AuthOptionsBuilder, eo gophercloud.EndpointOpts) error\n```\nAuthenticateV3 explicitly authenticates against the identity v3 service.\n\n```go\nfunc AuthenticatedClient(options gophercloud.AuthOptions) (*gophercloud.ProviderClient, error)\n```\nAuthenticatedClient logs in to an OpenStack cloud found at the identity endpoint specified by the options, acquires a token, and returns a Provider Client instance that's ready to operate.\n\nIf the full path to a versioned identity endpoint was specified  (example: [http://example.com:5000/v3](http://example.com:5000/v3)), that path will be used as the endpoint to query.\n\nIf a versionless endpoint was specified (example: [http://example.com:5000/](http://example.com:5000/)), the endpoint will be queried to determine which versions of the identity service are available, then chooses the most recent or most supported version.\n\nExample:\n\n\tao, err := openstack.AuthOptionsFromEnv()\n\tprovider, err := openstack.AuthenticatedClient(ao)\n\tclient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{\n\t\tRegion: os.Getenv(\"OS_REGION_NAME\"),\n\t})\n\n```go\nfunc NewBareMetalIntrospectionV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBareMetalIntrospectionV1 creates a ServiceClient that may be used with the v1 bare metal introspection package.\n\n```go\nfunc NewBareMetalV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBareMetalV1 creates a ServiceClient that may be used with the v1 bare metal package.\n\n```go\nfunc NewBlockStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBlockStorageV1 creates a ServiceClient that may be used to access the v1 block storage service.\n\n```go\nfunc NewBlockStorageV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBlockStorageV2 creates a ServiceClient that may be used to access the v2 block storage service.\n\n```go\nfunc NewBlockStorageV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewBlockStorageV3 creates a ServiceClient that may be used to access the v3 block storage service.\n\n```go\nfunc NewCDNV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewCDNV1 creates a ServiceClient that may be used to access the OpenStack v1 CDN service.\n\n```go\nfunc NewClient(endpoint string) (*gophercloud.ProviderClient, error)\n```\nNewClient prepares an unauthenticated ProviderClient instance. Most users will probably prefer using the AuthenticatedClient function instead.\n\nThis is useful if you wish to explicitly control the version of the identity service that's used for authentication explicitly, for example.\n\nA basic example of using this would be:\n\n\tao, err := openstack.AuthOptionsFromEnv()\n\tprovider, err := openstack.NewClient(ao.IdentityEndpoint)\n\tclient, err := openstack.NewIdentityV3(provider, gophercloud.EndpointOpts{})\n\n```go\nfunc NewClusteringV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewClusteringV1 creates a ServiceClient that may be used with the v1 clustering package.\n\n```go\nfunc NewComputeV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewComputeV2 creates a ServiceClient that may be used with the v2 compute package.\n\n```go\nfunc NewContainerInfraV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewContainerInfraV1 creates a ServiceClient that may be used with the v1 container infra management package.\n\n```go\nfunc NewContainerV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewContainerV1 creates a ServiceClient that may be used with v1 container package\n\n```go\nfunc NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewDBV1 creates a ServiceClient that may be used to access the v1 DB service.\n\n```go\nfunc NewDNSV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewDNSV2 creates a ServiceClient that may be used to access the v2 DNS service.\n\n```go\nfunc NewIdentityV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewIdentityV2 creates a ServiceClient that may be used to interact with the v2 identity service.\n\n```go\nfunc NewIdentityV3(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewIdentityV3 creates a ServiceClient that may be used to access the v3 identity service.\n\n```go\nfunc NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewImageServiceV2 creates a ServiceClient that may be used to access the v2 image service.\n\n```go\nfunc NewKeyManagerV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewKeyManagerV1 creates a ServiceClient that may be used with the v1 key manager service.\n\n```go\nfunc NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewLoadBalancerV2 creates a ServiceClient that may be used to access the v2 load balancer service.\n\n```go\nfunc NewMessagingV2(client *gophercloud.ProviderClient, clientID string, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewMessagingV2 creates a ServiceClient that may be used with the v2 messaging service.\n\n```go\nfunc NewNetworkV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewNetworkV2 creates a ServiceClient that may be used with the v2 network package.\n\n```go\nfunc NewObjectStorageV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewObjectStorageV1 creates a ServiceClient that may be used with the v1 object storage package.\n\n```go\nfunc NewOrchestrationV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewOrchestrationV1 creates a ServiceClient that may be used to access the v1 orchestration service.\n\n```go\nfunc NewPlacementV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewPlacementV1 creates a ServiceClient that may be used with the placement package.\n\n```go\nfunc NewSharedFileSystemV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewSharedFileSystemV2 creates a ServiceClient that may be used to access the v2 shared file system service.\n\n```go\nfunc NewWorkflowV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error)\n```\nNewWorkflowV2 creates a ServiceClient that may be used with the v2 workflow management package.\n\n```go\nfunc V2EndpointURL(catalog *tokens2.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error)\n```\nV2EndpointURL discovers the endpoint URL for a specific service from a ServiceCatalog acquired during the v2 identity service.\n\nThe 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.\n\n```go\nfunc V3EndpointURL(catalog *tokens3.ServiceCatalog, opts gophercloud.EndpointOpts) (string, error)\n```\nV3EndpointURL discovers the endpoint URL for a specific service from a Catalog acquired during the v3 identity service.\n\nThe 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.\n\n## Types\n\n```go\ntype ErrEndpointNotFound struct{ gophercloud.BaseError }\n```\nErrEndpointNotFound is the error when no suitable endpoint can be found in the user's catalog\n\n```go\nfunc (e ErrEndpointNotFound) Error() string\n```\n\n```go\ntype ErrInvalidAvailabilityProvided struct{ gophercloud.ErrInvalidInput }\n```\nErrInvalidAvailabilityProvided is the error when an invalid endpoint availability is provided\n\n```go\nfunc (e ErrInvalidAvailabilityProvided) Error() string\n```\n\n```go\ntype ErrNoAuthURL struct{ gophercloud.ErrInvalidInput }\n```\nErrNoAuthURL is the error when the OS\\_AUTH\\_URL environment variable is not found\n\n```go\nfunc (e ErrNoAuthURL) Error() string\n```\n\n```go\ntype ErrNoPassword struct{ gophercloud.ErrInvalidInput }\n```\nErrNoPassword is the error when the OS\\_PASSWORD environment variable is not found\n\n```go\nfunc (e ErrNoPassword) Error() string\n```\n\n```go\ntype ErrNoUsername struct{ gophercloud.ErrInvalidInput }\n```\nErrNoUsername is the error when the OS\\_USERNAME environment variable is not found\n\n```go\nfunc (e ErrNoUsername) Error() string\n```\n\n","path":"github.com/bumblebeeK/gophercloud/openstack","name":"openstack","synopsis":"Package openstack contains resources for the individual OpenStack projects supported in Gophercloud.","isRedistributable":true}
