Documentation
¶
Overview ¶
OpenStack Client with Golang
Index ¶
- Constants
- Variables
- func CloudName() string
- func LoadConfig(file ...string) (err error)
- func SetCloudName(name string)
- func SetOpenstackConfig(c Config)
- type Api
- type Auth
- type Cloud
- type Compute
- type Config
- type Identity
- type NeutronConf
- type Openstack
- func (o *Openstack) CinderV2() *internal.CinderV2
- func (o *Openstack) GlanceV2() *internal.GlanceV2
- func (o *Openstack) IsAdmin() bool
- func (o *Openstack) KeystoneV3() *internal.KeystoneV3
- func (o *Openstack) NeutronV2() *internal.NeutronV2
- func (o *Openstack) NovaV2(microVersion ...string) *internal.NovaV2
- func (o Openstack) ProjectId() (string, error)
- func (o Openstack) PrunePorts(ports []neutron.Port)
- func (o Openstack) PruneServers(query url.Values, yes bool, waitDeleted bool)
- func (o Openstack) PruneVolumes(query url.Values, matchName string, volumeType string, yes bool)
- func (o Openstack) Region() string
- func (o *Openstack) ResetAllClients()
- func (o *Openstack) SetComputeApiVersion(version string)
- func (o *Openstack) SetHttpTimeout(timeout time.Duration)
- func (o *Openstack) SetNeutronEndpoint(endpoint string)
- func (o *Openstack) SetRegion(region string) *Openstack
- func (o *Openstack) SetRetryCount(count int)
- func (o *Openstack) SetRetryWaitMaxTime(timeout time.Duration)
- func (o *Openstack) SetRetryWaitTime(timeout time.Duration)
- func (o *Openstack) WithRegion(region string) *Openstack
Constants ¶
View Source
const ( V2 = "v2" V2_0 = "v2.0" V2_1 = "v2.1" V3 = "v3" IDENTITY = "identity" NETWORK = "network" VOLUME = "volume" VOLUME_V2 = "volumev2" VOLUME_V3 = "volumev3" STORAGE = "storage" COMPUTE = "compute" IMAGE = "image" KEYSTONE = "keystone" NOVA = "nova" CINDER = "cinder" CINDER_V2 = "cinderv2" CINDER_V3 = "cinderv3" GLANCE = "glance" NEUTRON = "neutron" PUBLIC = "public" INTERNAL = "internal" ADMIN = "admin" )
Variables ¶
View Source
var COMPUTE_API_VERSION string
Functions ¶
func LoadConfig ¶
func SetCloudName ¶
func SetCloudName(name string)
func SetOpenstackConfig ¶
func SetOpenstackConfig(c Config)
Types ¶
type Auth ¶
type Auth struct { AuthUrl string `yaml:"auth_url" mapstructure:"auth_url"` ProjectDomainId string `yaml:"project_domain_id" mapstructure:"project_domain_id"` UserDomainId string `yaml:"user_domain_id" mapstructure:"user_domain_id"` ProjectName string `yaml:"project_name" mapstructure:"project_name"` Username string `yaml:"username" mapstructure:"username"` Password string `yaml:"password" mapstructure:"password"` }
type Cloud ¶
type Cloud struct { TokenExpireTime int `yaml:"tokenExpireTime"` Identity Identity `yaml:"identity"` Neutron NeutronConf `yaml:"neutron"` Compute Compute `yaml:"compute"` RegionName string `yaml:"region_name" mapstructure:"region_name"` Auth Auth `yaml:"auth"` }
func CloudConfig ¶
func CloudConfig() Cloud
type Config ¶
type Config struct { HttpTimeoutSecond int `yaml:"httpTimeoutSecond"` RetryWaitTimeSecond int `yaml:"retryWaitTimeSecond"` RetryCount int `yaml:"retryCount"` Clouds map[string]Cloud `yaml:"clouds"` }
var CONF Config
type NeutronConf ¶
type NeutronConf struct {
Endpoint string `yaml:"endpoint"`
}
type Openstack ¶
type Openstack struct { AuthPlugin auth_plugin.AuthPlugin ComputeApiVersion string // contains filtered or unexported fields }
func (*Openstack) KeystoneV3 ¶
func (o *Openstack) KeystoneV3() *internal.KeystoneV3
func (Openstack) PrunePorts ¶
func (Openstack) PruneServers ¶
func (Openstack) PruneVolumes ¶
func (*Openstack) ResetAllClients ¶
func (o *Openstack) ResetAllClients()
func (*Openstack) SetComputeApiVersion ¶
func (*Openstack) SetHttpTimeout ¶
func (*Openstack) SetNeutronEndpoint ¶
func (*Openstack) SetRetryCount ¶
func (*Openstack) SetRetryWaitMaxTime ¶
func (*Openstack) SetRetryWaitTime ¶
func (*Openstack) WithRegion ¶
Click to show internal directories.
Click to hide internal directories.