Documentation ¶
Index ¶
- Constants
- type Openstack
- func (openstack *Openstack) AddUser(user, secret, project, authDomain string) *identityservice.UserInfo
- func (openstack *Openstack) Certificate(serviceName string) (*x509.Certificate, error)
- func (openstack *Openstack) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (openstack *Openstack) SetupHTTP(mux *http.ServeMux)
- func (openstack *Openstack) Stop()
- func (openstack *Openstack) UseNeutronNetworking()
Constants ¶
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 Neutron, 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 ¶
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.