Documentation ¶
Overview ¶
Copyright 2021 VMware, Inc. SPDX-License-Identifier: Apache-2.0
Index ¶
- Variables
- func GetUUIDFromRef(ref string) string
- func IsAviRoleNonExistentError(err error) bool
- func IsAviUserAlreadyExistsError(err error) bool
- func IsAviUserNonExistentError(err error) bool
- func NewAviClient(config *AviClientConfig, version string) (*realAviClient, error)
- func NewAviClientFromSecrets(c client.Client, ctx context.Context, log logr.Logger, ...) (*realAviClient, error)
- type AviClientConfig
- type Client
- type CloudClient
- type CreateRoleFunc
- type CreateUserFunc
- type DeleteByNameUserFunc
- type FakeAviClient
- func (r *FakeAviClient) AviCertificateConfig() (string, error)
- func (r *FakeAviClient) CloudCreate(obj *models.Cloud, options ...session.ApiOptionsParams) (*models.Cloud, error)
- func (r *FakeAviClient) CloudGetByName(name string, options ...session.ApiOptionsParams) (*models.Cloud, error)
- func (r *FakeAviClient) GetControllerVersion() (string, error)
- func (r *FakeAviClient) IPAMDNSProviderProfileGet(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
- func (r *FakeAviClient) IPAMDNSProviderProfileUpdate(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
- func (r *FakeAviClient) NetworkCreate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
- func (r *FakeAviClient) NetworkGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.Network, error)
- func (r *FakeAviClient) NetworkUpdate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
- func (r *FakeAviClient) PoolGetByName(name string, options ...session.ApiOptionsParams) (*models.Pool, error)
- func (r *FakeAviClient) RoleCreate(obj *models.Role, options ...session.ApiOptionsParams) (*models.Role, error)
- func (r *FakeAviClient) RoleGetByName(name string, options ...session.ApiOptionsParams) (*models.Role, error)
- func (r *FakeAviClient) ServiceEngineGroupCreate(obj *models.ServiceEngineGroup, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
- func (r *FakeAviClient) ServiceEngineGroupGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
- func (r *FakeAviClient) TenantGet(uuid string, options ...session.ApiOptionsParams) (*models.Tenant, error)
- func (r *FakeAviClient) UserCreate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
- func (r *FakeAviClient) UserDeleteByName(name string, options ...session.ApiOptionsParams) error
- func (r *FakeAviClient) UserGetByName(name string, options ...session.ApiOptionsParams) (*models.User, error)
- func (r *FakeAviClient) UserUpdate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
- func (r *FakeAviClient) VirtualServiceGetByName(name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
- type GetByNameCloudFunc
- type GetByNameFunc
- type GetByNamePoolFunc
- type GetByNameRoleFunc
- type GetByNameSEGFunc
- type GetByNameUserFunc
- type GetByNameVSFunc
- type GetIPAMFunc
- type GetTenantFunc
- type IPAMDNSProviderProfileClient
- func (client *IPAMDNSProviderProfileClient) Get(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
- func (client *IPAMDNSProviderProfileClient) SetGetIPAMFunc(fn GetIPAMFunc)
- func (client *IPAMDNSProviderProfileClient) SetUpdateIPAMFn(fn UpdateIPAMFn)
- func (client *IPAMDNSProviderProfileClient) Update(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
- type NetworkClient
- func (client *NetworkClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Network, error)
- func (client *NetworkClient) SetGetByNameFn(fn GetByNameFunc)
- func (client *NetworkClient) SetUpdateFn(fn UpdateFn)
- func (client *NetworkClient) Update(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
- type PoolClient
- type RoleClient
- func (client *RoleClient) Create(obj *models.Role, options ...session.ApiOptionsParams) (*models.Role, error)
- func (client *RoleClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Role, error)
- func (client *RoleClient) SetCreateRoleFunc(fn CreateRoleFunc)
- func (client *RoleClient) SetGetByNameRoleFunc(fn GetByNameRoleFunc)
- type ServiceEngineGroupClient
- type TenantClient
- type UpdateFn
- type UpdateIPAMFn
- type UpdateUserFunc
- type UserClient
- func (client *UserClient) Create(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
- func (client *UserClient) DeleteByName(name string, options ...session.ApiOptionsParams) error
- func (client *UserClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.User, error)
- func (client *UserClient) SetCreateUserFunc(fn CreateUserFunc)
- func (client *UserClient) SetDeleteByNameUserFunc(fn DeleteByNameUserFunc)
- func (client *UserClient) SetGetByNameUserFunc(fn GetByNameUserFunc)
- func (client *UserClient) SetUpdateUserFunc(fn UpdateUserFunc)
- func (client *UserClient) Update(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
- type VirtualServiceClient
Constants ¶
This section is empty.
Variables ¶
var ErrEmptyInput = errors.New("input is empty")
Functions ¶
func GetUUIDFromRef ¶
GetUUIDFromRef takes a AVI Ref, parses it as a classic URL and returns the last part
func IsAviRoleNonExistentError ¶
IsAviRoleNonExistentError returns if an error is User role doesn't exist error by matching error message
func IsAviUserAlreadyExistsError ¶
IsAviUserAlreadyExistsError returns if an error is User Already Exists error by matching error message
func IsAviUserNonExistentError ¶
IsAviUserAlreadyExistsError returns if an error is User doesn't exist error by matching error message
func NewAviClient ¶
func NewAviClient(config *AviClientConfig, version string) (*realAviClient, error)
NewAviClient creates an Client
Types ¶
type AviClientConfig ¶
type AviClientConfig struct { ServerIP string Username string Password string CA string Insecure bool // Should only be used for tests Transport *http.Transport // ServerName is used to verify the hostname on the returned // certificates unless Insecure is true. It is also included // in the client's handshake to support virtual hosting unless it is // an IP address. ServerName string }
type Client ¶
type Client interface { ServiceEngineGroupGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error) ServiceEngineGroupCreate(obj *models.ServiceEngineGroup, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error) NetworkGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.Network, error) NetworkCreate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error) NetworkUpdate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error) CloudGetByName(name string, options ...session.ApiOptionsParams) (*models.Cloud, error) CloudCreate(obj *models.Cloud, options ...session.ApiOptionsParams) (*models.Cloud, error) UserGetByName(name string, options ...session.ApiOptionsParams) (*models.User, error) UserDeleteByName(name string, options ...session.ApiOptionsParams) error UserCreate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error) UserUpdate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error) TenantGet(uuid string, options ...session.ApiOptionsParams) (*models.Tenant, error) RoleGetByName(name string, options ...session.ApiOptionsParams) (*models.Role, error) RoleCreate(obj *models.Role, options ...session.ApiOptionsParams) (*models.Role, error) IPAMDNSProviderProfileGet(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error) IPAMDNSProviderProfileUpdate(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error) VirtualServiceGetByName(name string, options ...session.ApiOptionsParams) (*models.VirtualService, error) PoolGetByName(name string, options ...session.ApiOptionsParams) (*models.Pool, error) AviCertificateConfig() (string, error) GetControllerVersion() (string, error) }
type CloudClient ¶
type CloudClient struct {
// contains filtered or unexported fields
}
Cloud Client
func (*CloudClient) GetByName ¶
func (client *CloudClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Cloud, error)
func (*CloudClient) SetGetByNameCloudFunc ¶
func (client *CloudClient) SetGetByNameCloudFunc(fn GetByNameCloudFunc)
type CreateRoleFunc ¶
type CreateUserFunc ¶
type DeleteByNameUserFunc ¶
type DeleteByNameUserFunc func(name string, options ...session.ApiOptionsParams) error
type FakeAviClient ¶
type FakeAviClient struct { ServiceEngineGroup *ServiceEngineGroupClient Network *NetworkClient Cloud *CloudClient IPAMDNSProviderProfile *IPAMDNSProviderProfileClient User *UserClient Tenant *TenantClient Role *RoleClient VirtualService *VirtualServiceClient Pool *PoolClient }
FakeAviClient -- an API Client for Avi Controller for intg test of AkoDeploymentConfig
func NewFakeAviClient ¶
func NewFakeAviClient() *FakeAviClient
func (*FakeAviClient) AviCertificateConfig ¶
func (r *FakeAviClient) AviCertificateConfig() (string, error)
func (*FakeAviClient) CloudCreate ¶
func (r *FakeAviClient) CloudCreate(obj *models.Cloud, options ...session.ApiOptionsParams) (*models.Cloud, error)
func (*FakeAviClient) CloudGetByName ¶
func (r *FakeAviClient) CloudGetByName(name string, options ...session.ApiOptionsParams) (*models.Cloud, error)
func (*FakeAviClient) GetControllerVersion ¶
func (r *FakeAviClient) GetControllerVersion() (string, error)
func (*FakeAviClient) IPAMDNSProviderProfileGet ¶
func (r *FakeAviClient) IPAMDNSProviderProfileGet(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
func (*FakeAviClient) IPAMDNSProviderProfileUpdate ¶
func (r *FakeAviClient) IPAMDNSProviderProfileUpdate(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
func (*FakeAviClient) NetworkCreate ¶
func (r *FakeAviClient) NetworkCreate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
func (*FakeAviClient) NetworkGetByName ¶
func (r *FakeAviClient) NetworkGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.Network, error)
func (*FakeAviClient) NetworkUpdate ¶
func (r *FakeAviClient) NetworkUpdate(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
func (*FakeAviClient) PoolGetByName ¶
func (r *FakeAviClient) PoolGetByName(name string, options ...session.ApiOptionsParams) (*models.Pool, error)
func (*FakeAviClient) RoleCreate ¶
func (r *FakeAviClient) RoleCreate(obj *models.Role, options ...session.ApiOptionsParams) (*models.Role, error)
func (*FakeAviClient) RoleGetByName ¶
func (r *FakeAviClient) RoleGetByName(name string, options ...session.ApiOptionsParams) (*models.Role, error)
func (*FakeAviClient) ServiceEngineGroupCreate ¶
func (r *FakeAviClient) ServiceEngineGroupCreate(obj *models.ServiceEngineGroup, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
func (*FakeAviClient) ServiceEngineGroupGetByName ¶
func (r *FakeAviClient) ServiceEngineGroupGetByName(name, cloudName string, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
func (*FakeAviClient) TenantGet ¶
func (r *FakeAviClient) TenantGet(uuid string, options ...session.ApiOptionsParams) (*models.Tenant, error)
func (*FakeAviClient) UserCreate ¶
func (r *FakeAviClient) UserCreate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
func (*FakeAviClient) UserDeleteByName ¶
func (r *FakeAviClient) UserDeleteByName(name string, options ...session.ApiOptionsParams) error
func (*FakeAviClient) UserGetByName ¶
func (r *FakeAviClient) UserGetByName(name string, options ...session.ApiOptionsParams) (*models.User, error)
func (*FakeAviClient) UserUpdate ¶
func (r *FakeAviClient) UserUpdate(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
func (*FakeAviClient) VirtualServiceGetByName ¶
func (r *FakeAviClient) VirtualServiceGetByName(name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
type GetByNameCloudFunc ¶
type GetByNameFunc ¶
type GetByNamePoolFunc ¶
type GetByNameRoleFunc ¶
type GetByNameSEGFunc ¶
type GetByNameSEGFunc func(name string, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
type GetByNameUserFunc ¶
type GetByNameVSFunc ¶
type GetByNameVSFunc func(name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
type GetIPAMFunc ¶
type GetIPAMFunc func(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
type GetTenantFunc ¶
type IPAMDNSProviderProfileClient ¶
type IPAMDNSProviderProfileClient struct {
// contains filtered or unexported fields
}
IPAMDNSProviderProfile
func (*IPAMDNSProviderProfileClient) Get ¶
func (client *IPAMDNSProviderProfileClient) Get(uuid string, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
func (*IPAMDNSProviderProfileClient) SetGetIPAMFunc ¶
func (client *IPAMDNSProviderProfileClient) SetGetIPAMFunc(fn GetIPAMFunc)
func (*IPAMDNSProviderProfileClient) SetUpdateIPAMFn ¶
func (client *IPAMDNSProviderProfileClient) SetUpdateIPAMFn(fn UpdateIPAMFn)
func (*IPAMDNSProviderProfileClient) Update ¶
func (client *IPAMDNSProviderProfileClient) Update(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
type NetworkClient ¶
type NetworkClient struct {
// contains filtered or unexported fields
}
Network Client
func (*NetworkClient) GetByName ¶
func (client *NetworkClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Network, error)
func (*NetworkClient) SetGetByNameFn ¶
func (client *NetworkClient) SetGetByNameFn(fn GetByNameFunc)
func (*NetworkClient) SetUpdateFn ¶
func (client *NetworkClient) SetUpdateFn(fn UpdateFn)
func (*NetworkClient) Update ¶
func (client *NetworkClient) Update(obj *models.Network, options ...session.ApiOptionsParams) (*models.Network, error)
type PoolClient ¶
type PoolClient struct {
// contains filtered or unexported fields
}
Pool Client
func (*PoolClient) GetByName ¶
func (client *PoolClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Pool, error)
func (*PoolClient) SetGetByNameFn ¶
func (client *PoolClient) SetGetByNameFn(fn GetByNamePoolFunc)
type RoleClient ¶
type RoleClient struct {
// contains filtered or unexported fields
}
Role Client
func (*RoleClient) Create ¶
func (client *RoleClient) Create(obj *models.Role, options ...session.ApiOptionsParams) (*models.Role, error)
func (*RoleClient) GetByName ¶
func (client *RoleClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.Role, error)
func (*RoleClient) SetCreateRoleFunc ¶
func (client *RoleClient) SetCreateRoleFunc(fn CreateRoleFunc)
func (*RoleClient) SetGetByNameRoleFunc ¶
func (client *RoleClient) SetGetByNameRoleFunc(fn GetByNameRoleFunc)
type ServiceEngineGroupClient ¶
type ServiceEngineGroupClient struct {
// contains filtered or unexported fields
}
ServiceEngineGroup Client
func (*ServiceEngineGroupClient) GetByName ¶
func (client *ServiceEngineGroupClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.ServiceEngineGroup, error)
func (*ServiceEngineGroupClient) SetGetByNameFn ¶
func (client *ServiceEngineGroupClient) SetGetByNameFn(fn GetByNameSEGFunc)
type TenantClient ¶
type TenantClient struct {
// contains filtered or unexported fields
}
Tenant Client
func (*TenantClient) Get ¶
func (client *TenantClient) Get(uuid string, options ...session.ApiOptionsParams) (*models.Tenant, error)
func (*TenantClient) SetGetTenantFunc ¶
func (client *TenantClient) SetGetTenantFunc(fn GetTenantFunc)
type UpdateIPAMFn ¶
type UpdateIPAMFn func(obj *models.IPAMDNSProviderProfile, options ...session.ApiOptionsParams) (*models.IPAMDNSProviderProfile, error)
type UpdateUserFunc ¶
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
User Client
func (*UserClient) Create ¶
func (client *UserClient) Create(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
func (*UserClient) DeleteByName ¶
func (client *UserClient) DeleteByName(name string, options ...session.ApiOptionsParams) error
func (*UserClient) GetByName ¶
func (client *UserClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.User, error)
func (*UserClient) SetCreateUserFunc ¶
func (client *UserClient) SetCreateUserFunc(fn CreateUserFunc)
func (*UserClient) SetDeleteByNameUserFunc ¶
func (client *UserClient) SetDeleteByNameUserFunc(fn DeleteByNameUserFunc)
func (*UserClient) SetGetByNameUserFunc ¶
func (client *UserClient) SetGetByNameUserFunc(fn GetByNameUserFunc)
func (*UserClient) SetUpdateUserFunc ¶
func (client *UserClient) SetUpdateUserFunc(fn UpdateUserFunc)
func (*UserClient) Update ¶
func (client *UserClient) Update(obj *models.User, options ...session.ApiOptionsParams) (*models.User, error)
type VirtualServiceClient ¶
type VirtualServiceClient struct {
// contains filtered or unexported fields
}
VirtualService Client
func (*VirtualServiceClient) GetByName ¶
func (client *VirtualServiceClient) GetByName(name string, options ...session.ApiOptionsParams) (*models.VirtualService, error)
func (*VirtualServiceClient) SetGetByNameFn ¶
func (client *VirtualServiceClient) SetGetByNameFn(fn GetByNameVSFunc)