Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// defaults currently referring to Train
	DefaultComputeV2Microversion      = "2.79"
	DefaultIdentityV3Microversion     = "3.13"
	DefaultBlockStorageV3Microversion = "3.59"
	DefaultImageServiceV2Microversion = "2.9"
)
View Source
const (
	// IdentityV3 identifies the OpenStack Identity V3 service (Keystone).
	IdentityV3 ServiceType = "openstack_identity_v3"
	// Compute identifies the penStack Compute V2 service (Nova).
	ComputeV2 = "openstack_compute_v2"
	// NetworkV2 identifies the OpenStack Network V2 service (Neutron).
	NetworkV2 = "openstack_network_v2"
	// BlockStorageV3 identifies the OpenStack Block Storage V3 service (Cinder).
	BlockStorageV3 = "openstack_blockstorage_v3"
	// ImageServiceV2 identifies the OpenStack Image Service V2 service (Glance).
	ImageServiceV2 = "openstack_imageservice_v2"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *gophercloud.ProviderClient
	Spec   Spec
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger zerolog.Logger, spec *Spec) (*Client, error)

func (*Client) GetServiceClient

func (c *Client) GetServiceClient(key ServiceType) (*gophercloud.ServiceClient, error)

func (*Client) ID

func (c *Client) ID() string

func (*Client) Logger

func (c *Client) Logger() *zerolog.Logger

type ServiceType

type ServiceType string

type Spec

type Spec struct {
	EndpointUrl                *string `json:"endpoint_url,omitempty" yaml:"endpoint_url,omitempty"`
	UserID                     *string `json:"userid,omitempty" yaml:"userid,omitempty"`
	Username                   *string `json:"username,omitempty" yaml:"username,omitempty"`
	Password                   *string `json:"password,omitempty" yaml:"password,omitempty"`
	Region                     *string `json:"region,omitempty" yaml:"region,omitempty"`
	ProjectID                  *string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
	ProjectName                *string `json:"project_name,omitempty" yaml:"project_name,omitempty"`
	DomainID                   *string `json:"domain_id,omitempty" yaml:"domain_id,omitempty"`
	DomainName                 *string `json:"domain_name,omitempty" yaml:"domain_name,omitempty"`
	AccessToken                *string `json:"access_token,omitempty" yaml:"access_token,omitempty"`
	AppCredentialID            *string `json:"app_credential_id,omitempty" yaml:"app_credential_id,omitempty"`
	AppCredentialSecret        *string `json:"app_credential_secret,omitempty" yaml:"app_credential_secret,omitempty"`
	AllowReauth                *bool   `json:"allow_reauth,omitempty" yaml:"allow_reauth,omitempty"`
	IdentityV3Microversion     *string `json:"identity_v3_microversion,omitempty" yaml:"identity_v3_microversion,omitempty"`
	ComputeV2Microversion      *string `json:"compute_v2_microversion,omitempty" yaml:"compute_v2_microversion,omitempty"`
	NetworkV2Microversion      *string `json:"network_v2_microversion,omitempty" yaml:"network_v2_microversion,omitempty"`
	BlockStorageV3Microversion *string `json:"blockstorage_v3_microversion,omitempty" yaml:"blockstorage_v3_microversion,omitempty"`
	ImageServiceV2Microversion *string `json:"imageservice_v2_microversion,omitempty" yaml:"imageservice_v2_microversion,omitempty"`
}

func (*Spec) SetDefaults

func (s *Spec) SetDefaults()

func (*Spec) Validate

func (s *Spec) Validate() error

Jump to

Keyboard shortcuts

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