Documentation ¶
Overview ¶
Package client is the main client for the CloudAvenue provider.
Package client is the main client for the CloudAvenue provider.
Index ¶
- Variables
- type AdminOrg
- type CloudAvenue
- func (c *CloudAvenue) DefaultVDCExist() bool
- func (c *CloudAvenue) GetAdminOrg() (*AdminOrg, error)
- func (c *CloudAvenue) GetDefaultVDC() string
- func (c *CloudAvenue) GetOrg() (*Org, error)
- func (c *CloudAvenue) GetOrgAndVDC(orgName, vdcName string) (org *govcd.Org, vdcOrVDCGroup VDCOrVDCGroupHandler, err error)
- func (c *CloudAvenue) GetOrgName() string
- func (c *CloudAvenue) GetURL() string
- func (c *CloudAvenue) GetVDC(opts ...GetVDCOpts) (*VDC, error)
- func (c *CloudAvenue) GetVDCGroup(vdcGroupName string) (*VDCGroup, error)
- func (c *CloudAvenue) GetVDCOrVDCGroup(vdcOrVDCGroupName string) (VDCOrVDCGroupHandler, error)
- func (c *CloudAvenue) New() (*CloudAvenue, error)
- type GetVDCOpts
- type Org
- type VAPP
- type VDC
- type VDCGroup
- type VDCOrVDCGroupHandler
Constants ¶
This section is empty.
Variables ¶
var ( // ErrAuthFailed is returned when the authentication failed. ErrAuthFailed = errors.New("authentication error") // ErrTokenEmpty is returned when the token is empty. ErrTokenEmpty = errors.New("token is empty") // ErrConfigureVmware is returned when the configuration of vmware failed. ErrConfigureVmware = errors.New("error configuring vmware") ErrVCDVersionEmpty = errors.New("empty vcd version") )
var ( ErrEmptyOrgNameProvided = errors.New("empty Org name provided") ErrEmptyVDCNameProvided = errors.New("empty VDC name provided") ErrRetrievingOrg = errors.New("error retrieving Org") ErrRetrievingOrgAdmin = errors.New("error retrieving Org admin") ErrEmptyOrgFound = errors.New("empty Org found") ErrRetrievingVDC = errors.New("error retrieving VDC") ErrRetrievingVDCGroup = errors.New("error retrieving VDC Group") ErrEmptyVDCFound = errors.New("empty VDC found") )
Functions ¶
This section is empty.
Types ¶
type AdminOrg ¶
func (*AdminOrg) ListCatalogs ¶
func (ao *AdminOrg) ListCatalogs() *govcdtypes.CatalogsList
ListCatalogs
Get the catalogs list from the admin org.
type CloudAvenue ¶
type CloudAvenue struct { Org string VDC string User string Password string URL string TerraformVersion string CloudAvenueVersion string // API CLOUDAVENUE APIClient *apiclient.APIClient Auth context.Context // API VMWARE Vmware *govcd.VCDClient VCDVersion string // contains filtered or unexported fields }
CloudAvenue is the main struct for the CloudAvenue client.
func (*CloudAvenue) DefaultVDCExist ¶
func (c *CloudAvenue) DefaultVDCExist() bool
DefaultVDCExist returns true if the default VDC exists.
func (*CloudAvenue) GetAdminOrg ¶
func (c *CloudAvenue) GetAdminOrg() (*AdminOrg, error)
GetAdminOrg return the admin org using the name provided in the provider.
func (*CloudAvenue) GetDefaultVDC ¶
func (c *CloudAvenue) GetDefaultVDC() string
GetDefaultVDC returns the default VDC.
func (*CloudAvenue) GetOrg ¶
func (c *CloudAvenue) GetOrg() (*Org, error)
GetOrg return the org using the name provided in the provider.
func (*CloudAvenue) GetOrgAndVDC ¶
func (c *CloudAvenue) GetOrgAndVDC(orgName, vdcName string) (org *govcd.Org, vdcOrVDCGroup VDCOrVDCGroupHandler, err error)
! Deprecated
GetOrgAndVDC ¶
finds a pair of org and vdc using the names provided in the args. If the names are empty, it will use the default org and vdc names from the provider.
DEPRECATED: use GetOrg, GetVDC, GetVDCGroup or GetVDCOrVDCGroup instead.
func (*CloudAvenue) GetOrgName ¶
func (c *CloudAvenue) GetOrgName() string
GetOrgName() returns the name of the organization. Deprecated: use GetOrg instead.
func (*CloudAvenue) GetURL ¶
func (c *CloudAvenue) GetURL() string
GetURL returns the base path of the API.
func (*CloudAvenue) GetVDC ¶
func (c *CloudAvenue) GetVDC(opts ...GetVDCOpts) (*VDC, error)
GetVDC return the vdc using the name provided in the argument. If the name is empty, it will try to use the default vdc provided in the provider.
func (*CloudAvenue) GetVDCGroup ¶
func (c *CloudAvenue) GetVDCGroup(vdcGroupName string) (*VDCGroup, error)
GetVDCGroup return the vdc group using the name provided in the argument.
func (*CloudAvenue) GetVDCOrVDCGroup ¶
func (c *CloudAvenue) GetVDCOrVDCGroup(vdcOrVDCGroupName string) (VDCOrVDCGroupHandler, error)
GetVDCOrVDCGroup return the vdc or vdc group using the name provided in the argument.
func (*CloudAvenue) New ¶
func (c *CloudAvenue) New() (*CloudAvenue, error)
New creates a new CloudAvenue client.
type GetVDCOpts ¶
type GetVDCOpts func(*VDC)
func WithVDCName ¶
func WithVDCName(name string) GetVDCOpts
type VAPP ¶
func (VAPP) GetDescription ¶
GetDescription give you the status code of the vApp.
func (VAPP) GetStatusCode ¶
GetStatusCode give you the status code of the vApp.
type VDCOrVDCGroupHandler ¶
type VDCOrVDCGroupHandler interface { GetOpenApiOrgVdcNetworkByName(string) (*govcd.OpenApiOrgVdcNetwork, error) GetName() string GetID() string }
VDCOrVDCGroupHandler is an interface to access some common methods on VDC or VDC Group without explicitly handling exact types.