openstackservice

package
v3.0.0-...-1c69814 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Identity = "identity"
	Neutron  = "neutron"
	Nova     = "nova"
	Swift    = "swift"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Openstack

type Openstack struct {
	Identity identityservice.IdentityService
	// Keystone v3 supports serving both V2 and V3 at the same time
	// this will intend to emulate that behavior.
	FallbackIdentity identityservice.IdentityService
	Nova             *novaservice.Nova
	Neutron          *neutronservice.Neutron
	Swift            *swiftservice.Swift

	// base url of openstack endpoints, might be required to
	// simmulate response contents such as the ones from
	// identity discovery.
	URLs map[string]string
	// contains filtered or unexported fields
}

Openstack provides an Openstack service double implementation.

func New

func New(cred *identity.Credentials, authMode identity.AuthMode, useTLS bool) (*Openstack, []string)

New creates an instance of a full Openstack service double. An initial user with the specified credentials is registered with the identity service. This service double manages the httpServers necessary for Neturon, Nova, Swift and Identity services

func NewNoSwift

func NewNoSwift(cred *identity.Credentials, authMode identity.AuthMode, useTLS bool) (*Openstack, []string)

NewNoSwift creates an instance of a partial Openstack service double. An initial user with the specified credentials is registered with the identity service. This service double manages the httpServers necessary for Nova and Identity services

func (*Openstack) AddUser

func (openstack *Openstack) AddUser(user, secret, project, authDomain string) *identityservice.UserInfo

func (*Openstack) Certificate

func (openstack *Openstack) Certificate(serviceName string) (*x509.Certificate, error)

Certificate returns the x509 certificate of the specified service.

func (*Openstack) ServeHTTP

func (openstack *Openstack) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Openstack) SetupHTTP

func (openstack *Openstack) SetupHTTP(mux *http.ServeMux)

SetupHTTP attaches all the needed handlers to provide the HTTP API for the Openstack service..

func (*Openstack) Stop

func (openstack *Openstack) Stop()

Stop closes the Openstack service double http Servers and clears the related http handling

func (*Openstack) UseNeutronNetworking

func (openstack *Openstack) UseNeutronNetworking()

UseNeutronNetworking sets up the openstack service to use neutron networking.

Jump to

Keyboard shortcuts

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