openstack

package
v0.0.0-...-eebe1bb Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(endpoint, user, password, tenant, domain_name, domain_id string) (*gophercloud.ProviderClient, error)

Authenticate is used to authenticate user for given tenant. Request is send to provided Keystone endpoint Returns authenticated provider client, which is used as a base for service clients.

func ChooseVersion

func ChooseVersion(recognized []string) (string, error)

ChooseVersion returns chosen Cinder API version based on defined priority

Types

type Common

type Common struct{}

Common is a receiver for Commoner interface

func (Common) GetApiVersions

func (c Common) GetApiVersions(provider *gophercloud.ProviderClient) ([]string, error)

GetApiVersions is used to retrieve list of available Cinder API versions List of api version is then used to dispatch calls to proper API version based on defined priority

func (Common) GetTenants

func (c Common) GetTenants(endpoint, user, password, domain_name, domain_id string) (map[string]string, error)

GetTenants is used to retrieve list of available tenant for authenticated user List of tenants can then be used to authenticate user for each given tenant

type Commoner

type Commoner interface {
	GetTenants(endpoint, user, password, domain_name, domain_id string) (map[string]string, error)
	GetApiVersions(provider *gophercloud.ProviderClient) ([]string, error)
}

Commoner provides abstraction for shared functions mainly for mocking

Directories

Path Synopsis
v1
cinder
Cinder package contains wrapper functions designed to collect required metrics All functions are dependant on OpenStack BlockStorage API Version 1
Cinder package contains wrapper functions designed to collect required metrics All functions are dependant on OpenStack BlockStorage API Version 1
v2
snapshots
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - structure ListOpts:
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - structure ListOpts:
volumes
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud)
Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud)

Jump to

Keyboard shortcuts

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