Documentation
¶
Index ¶
- Variables
- func GenAuthOpts(opts *Options) (gophercloud.AuthOptions, error)
- func NewGlobalHelper(opts ...Option) error
- func ParseAuthFile(opts *Options)
- type Auth
- type Domain
- type Helper
- func (h *Helper) AddRole(roleId string, opts roles.AssignOpts) error
- func (h *Helper) AttachNetworkToRouter(id string, opts routers.AddInterfaceOpts) (*routers.InterfaceInfo, error)
- func (h *Helper) CreateEc2Credential(userId, projectId, accessKey, secretKey string) (*credentials.Credential, error)
- func (h *Helper) CreateNetwork(opts networks.CreateOpts) (*networks.Network, error)
- func (h *Helper) CreateProject(name string) (*projects.Project, error)
- func (h *Helper) CreateRouter(opts routers.CreateOpts) (*routers.Router, error)
- func (h *Helper) CreateSecurityGroup(opts groups.CreateOpts) (*groups.SecGroup, error)
- func (h *Helper) CreateSecurityGroupRule(opts rules.CreateOpts) (*rules.SecGroupRule, error)
- func (h *Helper) CreateShareNetwork(client *gophercloud.ServiceClient, opts sharenetworks.CreateOpts) (*sharenetworks.ShareNetwork, error)
- func (h *Helper) CreateSubnet(opts subnets.CreateOpts) (*subnets.Subnet, error)
- func (h *Helper) CreateUser(opts users.CreateOpts) (*users.User, error)
- func (h *Helper) DeleteSecurityGroupRule(id string) error
- func (h *Helper) GetHypervisorByHostname(hostname string) (*hypervisors.Hypervisor, error)
- func (h *Helper) GetHypervisorStatistics() (*hypervisors.Statistics, error)
- func (h *Helper) GetHypervisorUpTime(id string) (*hypervisors.Uptime, error)
- func (h *Helper) GetNetworkByName(opts networks.ListOpts) (*networks.Network, error)
- func (h *Helper) GetPortByIp(ip string) (*ports.Port, error)
- func (h *Helper) GetProjectIdByName(name string) (string, error)
- func (h *Helper) GetRoleByName(name string) (*roles.Role, error)
- func (h *Helper) GetSecurityGroup(id string) (*groups.SecGroup, error)
- func (h *Helper) GetSecurityGroupByName(opts groups.ListOpts) (*groups.SecGroup, error)
- func (h *Helper) GetShareNetworkByName(opts sharenetworks.ListOpts) (*sharenetworks.ShareNetwork, error)
- func (h *Helper) GetSubnetByName(opts subnets.ListOpts) (*subnets.Subnet, error)
- func (h *Helper) GetUserByName(name string) (*users.User, error)
- func (h *Helper) GetUserIdByName(name string) (string, error)
- func (h *Helper) GetVolume(volumeId string) (*volumes.Volume, error)
- func (h *Helper) IsDomainExists(name string) (bool, error)
- func (h *Helper) IsFlavorExist(name string) (bool, error)
- func (h *Helper) IsImageExist(name string) (bool, error)
- func (h *Helper) IsProjectExists(name string) (bool, error)
- func (h *Helper) ListDomains(opts *domains.ListOpts) ([]domains.Domain, error)
- func (h *Helper) ListFloatingIPs(opts floatingips.ListOpts) ([]floatingips.FloatingIP, error)
- func (h *Helper) ListHypervisors(opts hypervisors.ListOpts) ([]hypervisors.Hypervisor, error)
- func (h *Helper) ListLoadBalancers(opts loadbalancers.ListOpts) ([]loadbalancers.LoadBalancer, error)
- func (h *Helper) ListNetworks(opts networks.ListOpts) ([]networks.Network, error)
- func (h *Helper) ListProjects(opts *projects.ListOpts) ([]projects.Project, error)
- func (h *Helper) ListSecurityGroups(opts groups.ListOpts) ([]groups.SecGroup, error)
- func (h *Helper) ListServers(opts servers.ListOpts) ([]servers.Server, error)
- func (h *Helper) ListShares(opts shares.ListOpts) ([]shares.Share, error)
- func (h *Helper) ListUsers(opts *users.ListOpts) ([]users.User, error)
- func (h *Helper) ListVolumes(opts volumes.ListOpts) ([]volumes.Volume, error)
- func (h *Helper) UpdateComputeQuotas(projectId string, opts quotasets.UpdateOpts) error
- func (h *Helper) UpdateNetworkQuotas(projectId string, opts quotas.UpdateOpts) error
- func (h *Helper) UpdateStorageQuotas(projectId string, opts quotasets.UpdateOpts) error
- func (h *Helper) ValidToken(token string) error
- type Option
- func AuthFile(authFile string) Option
- func AuthSource(authSource string) Option
- func AuthType(authType string) Option
- func AuthUrl(AuthUrl string) Option
- func ConfFile(confFile string) Option
- func DomainID(domainID string) Option
- func DomainName(domainName string) Option
- func EnableAutoRenew(enableAutoRenew bool) Option
- func IdentityAPIVersion(identityAPIVersion string) Option
- func ImageAPIVersion(imageAPIVersion string) Option
- func Passcode(passcode string) Option
- func Password(password string) Option
- func ProjectDomainName(projectDomainName string) Option
- func ProjectName(projectName string) Option
- func Scope(scope *gophercloud.AuthScope) Option
- func TenantID(tenantID string) Option
- func TenantName(tenantName string) Option
- func UserDomainName(userDomainName string) Option
- func UserID(userID string) Option
- func Username(username string) Option
- type Options
- type Project
- type Tenant
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultEndpointOpts = gophercloud.EndpointOpts{ Region: os.Getenv("OS_REGION_NAME"), } )
Functions ¶
func GenAuthOpts ¶
func NewGlobalHelper ¶
func ParseAuthFile ¶
func ParseAuthFile(opts *Options)
Types ¶
type Auth ¶
type Auth struct { Source string `json:"source" yaml:"source"` Type string `json:"type" yaml:"type"` Url string `json:"url" yaml:"url"` Username string `json:"username" yaml:"username"` Password string `json:"password" yaml:"password"` Token string `json:"token" yaml:"token"` Project `json:"project" yaml:"project"` EnableAutoRenew bool `json:"enableAutoRenew" yaml:"enableAutoRenew"` File string `json:"file" yaml:"file"` }
type Helper ¶
type Helper struct { Provider *gophercloud.ProviderClient Identity *gophercloud.ServiceClient Compute *gophercloud.ServiceClient Image *gophercloud.ServiceClient Network *gophercloud.ServiceClient Loadbalancer *gophercloud.ServiceClient Storage *gophercloud.ServiceClient *Options }
func GetGlobalHelper ¶
func GetGlobalHelper() *Helper
func (*Helper) AttachNetworkToRouter ¶
func (h *Helper) AttachNetworkToRouter(id string, opts routers.AddInterfaceOpts) (*routers.InterfaceInfo, error)
func (*Helper) CreateEc2Credential ¶
func (h *Helper) CreateEc2Credential(userId, projectId, accessKey, secretKey string) (*credentials.Credential, error)
func (*Helper) CreateNetwork ¶
func (*Helper) CreateProject ¶
func (*Helper) CreateRouter ¶
func (*Helper) CreateSecurityGroup ¶
func (*Helper) CreateSecurityGroupRule ¶
func (h *Helper) CreateSecurityGroupRule(opts rules.CreateOpts) (*rules.SecGroupRule, error)
func (*Helper) CreateShareNetwork ¶
func (h *Helper) CreateShareNetwork(client *gophercloud.ServiceClient, opts sharenetworks.CreateOpts) (*sharenetworks.ShareNetwork, error)
func (*Helper) CreateSubnet ¶
func (*Helper) CreateUser ¶
func (*Helper) DeleteSecurityGroupRule ¶
func (*Helper) GetHypervisorByHostname ¶
func (h *Helper) GetHypervisorByHostname(hostname string) (*hypervisors.Hypervisor, error)
func (*Helper) GetHypervisorStatistics ¶
func (h *Helper) GetHypervisorStatistics() (*hypervisors.Statistics, error)
func (*Helper) GetHypervisorUpTime ¶
func (h *Helper) GetHypervisorUpTime(id string) (*hypervisors.Uptime, error)
func (*Helper) GetNetworkByName ¶
func (*Helper) GetProjectIdByName ¶
func (*Helper) GetSecurityGroup ¶
func (*Helper) GetSecurityGroupByName ¶
func (*Helper) GetShareNetworkByName ¶
func (h *Helper) GetShareNetworkByName(opts sharenetworks.ListOpts) (*sharenetworks.ShareNetwork, error)
func (*Helper) GetSubnetByName ¶
func (*Helper) ListDomains ¶
func (*Helper) ListFloatingIPs ¶
func (h *Helper) ListFloatingIPs(opts floatingips.ListOpts) ([]floatingips.FloatingIP, error)
func (*Helper) ListHypervisors ¶
func (h *Helper) ListHypervisors(opts hypervisors.ListOpts) ([]hypervisors.Hypervisor, error)
func (*Helper) ListLoadBalancers ¶
func (h *Helper) ListLoadBalancers(opts loadbalancers.ListOpts) ([]loadbalancers.LoadBalancer, error)
func (*Helper) ListNetworks ¶
func (*Helper) ListProjects ¶
func (*Helper) ListSecurityGroups ¶
func (*Helper) ListServers ¶
func (*Helper) ListShares ¶
func (*Helper) ListVolumes ¶
func (*Helper) UpdateComputeQuotas ¶
func (h *Helper) UpdateComputeQuotas(projectId string, opts quotasets.UpdateOpts) error
func (*Helper) UpdateNetworkQuotas ¶
func (h *Helper) UpdateNetworkQuotas(projectId string, opts quotas.UpdateOpts) error
func (*Helper) UpdateStorageQuotas ¶
func (h *Helper) UpdateStorageQuotas(projectId string, opts quotasets.UpdateOpts) error
func (*Helper) ValidToken ¶
type Option ¶
type Option func(*Options)
func AuthSource ¶
func DomainName ¶
func EnableAutoRenew ¶
func IdentityAPIVersion ¶
func ImageAPIVersion ¶
func ProjectDomainName ¶
func ProjectName ¶
func TenantName ¶
func UserDomainName ¶
type Options ¶
type Options struct { ConfFile string `json:"confFile" yaml:"confFile"` IdentityEndpoint string `json:"identityEndpoint" yaml:"identityEndpoint"` Auth `json:"auth" yaml:"auth"` Domain `json:"domain" yaml:"domain"` Tenant `json:"tenant" yaml:"tenant"` Project `json:"project" yaml:"project"` User `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` Passcode string `json:"passcode" yaml:"passcode"` IdentityAPIVersion string `json:"identityAPIVersion" yaml:"identityAPIVersion"` ImageAPIVersion string `json:"imageAPIVersion" yaml:"imageAPIVersion"` Scope *gophercloud.AuthScope `json:"scope" yaml:"scope"` }
var (
Opts *Options
)
Click to show internal directories.
Click to hide internal directories.