Documentation ¶
Index ¶
- Constants
- type Client
- func (client *Client) CacheGatewayDetails(ctx context.Context) error
- func (client *Client) CreateLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, ...) (string, error)
- func (client *Client) DeleteLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, ...) error
- func (client *Client) FindVMByName(vmName string) (*govcd.VM, error)
- func (client *Client) FindVMByUUID(vcdVmUUID string) (*govcd.VM, error)
- func (client *Client) GetLoadBalancer(ctx context.Context, virtualServiceName string) (string, error)
- func (client *Client) GetRDEVirtualIps(ctx context.Context) ([]string, string, *swaggerClient.DefinedEntity, error)
- func (client *Client) IsNSXTBackedGateway() bool
- func (client *Client) IsVmNotAvailable(err error) bool
- func (client *Client) RefreshBearerToken() error
- func (client *Client) UpdateLoadBalancer(ctx context.Context, lbPoolName string, virtualServiceName string, ...) error
- type GatewayBusyError
- type LoadBalancerPoolBusyError
- type NatRuleRef
- type NoRDEError
- type OneArm
- type PortDetails
- type VCDAuthConfig
- type VirtualServiceBusyError
- type VirtualServicePendingError
Constants ¶
const (
NoRdePrefix = `NO_RDE_`
)
const ( // VCDVMIDPrefix is a prefix added to VM objects by VCD. This needs // to be removed for query operations. VCDVMIDPrefix = "urn:vcloud:vm:" )
const (
VCloudApiVersion = "36.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { VCDAuthConfig *VCDAuthConfig ClusterOrgName string ClusterOVDCName string ClusterVAppName string VCDClient *govcd.VCDClient VDC *govcd.Vdc APIClient *swaggerClient.APIClient IPAMSubnet string ClusterID string OneArm *OneArm HTTPPort int32 HTTPSPort int32 CertificateAlias string RWLock sync.RWMutex // contains filtered or unexported fields }
Client :
func NewVCDClientFromSecrets ¶
func NewVCDClientFromSecrets(host string, orgName string, vdcName string, vAppName string, networkName string, ipamSubnet string, userOrg string, user string, password string, refreshToken string, insecure bool, clusterID string, oneArm *OneArm, httpPort int32, httpsPort int32, certAlias string, getVdcClient bool) (*Client, error)
NewVCDClientFromSecrets :
func (*Client) CacheGatewayDetails ¶
CacheGatewayDetails : get gateway reference and cache some details in client object
func (*Client) CreateLoadBalancer ¶
func (client *Client) CreateLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, ips []string, portDetailsList []PortDetails) (string, error)
CreateLoadBalancer : create a new load balancer pool and virtual service pointing to it
func (*Client) DeleteLoadBalancer ¶
func (client *Client) DeleteLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, portDetailsList []PortDetails) error
DeleteLoadBalancer : create a new load balancer pool and virtual service pointing to it
func (*Client) FindVMByName ¶
FindVMByName finds a VM in a vApp using the name. The client is expected to have a valid bearer token when this function is called.
func (*Client) FindVMByUUID ¶
FindVMByUUID finds a VM in a vApp using the UUID. The client is expected to have a valid bearer token when this function is called.
func (*Client) GetLoadBalancer ¶
func (client *Client) GetLoadBalancer(ctx context.Context, virtualServiceName string) (string, error)
GetLoadBalancer :
func (*Client) GetRDEVirtualIps ¶
func (client *Client) GetRDEVirtualIps(ctx context.Context) ([]string, string, *swaggerClient.DefinedEntity, error)
func (*Client) IsNSXTBackedGateway ¶
IsNSXTBackedGateway : return true if gateway is backed by NSX-T
func (*Client) IsVmNotAvailable ¶
IsVmNotAvailable : In VCD, if the VM is not available, it can be an access error or the VM may not be present. Hence we sometimes get an error different from govcd.ErrorEntityNotFound
func (*Client) RefreshBearerToken ¶
type GatewayBusyError ¶
type GatewayBusyError struct {
GatewayName string
}
func NewGatewayBusyError ¶
func NewGatewayBusyError(gatewayName string) *GatewayBusyError
func (*GatewayBusyError) Error ¶
func (gatewayBusyError *GatewayBusyError) Error() string
type LoadBalancerPoolBusyError ¶
type LoadBalancerPoolBusyError struct {
LBPoolName string
}
func NewLBPoolBusyError ¶
func NewLBPoolBusyError(lbPoolName string) *LoadBalancerPoolBusyError
func (*LoadBalancerPoolBusyError) Error ¶
func (lbPoolError *LoadBalancerPoolBusyError) Error() string
type NatRuleRef ¶
type NoRDEError ¶
type NoRDEError struct {
// contains filtered or unexported fields
}
NoRDEError is an error used when the InfraID value in the VCDCluster object does not point to a valid RDE in VCD
func NewNoRDEError ¶
func NewNoRDEError(message string) *NoRDEError
func (*NoRDEError) Error ¶
func (nre *NoRDEError) Error() string
type PortDetails ¶
type VCDAuthConfig ¶
type VCDAuthConfig struct { User string `json:"user"` Password string `json:"password"` RefreshToken string `json:"refreshToken"` UserOrg string `json:"org"` Host string `json:"host"` CloudAPIHref string `json:"cloudapihref"` VDC string `json:"vdc"` Insecure bool `json:"insecure"` Token string `json:"token"` IsSysAdmin bool // will be set by GetBearerToken() }
VCDAuthConfig : contains config related to vcd auth
func (*VCDAuthConfig) GetBearerToken ¶
func (*VCDAuthConfig) GetPlainClientFromSecrets ¶
func (config *VCDAuthConfig) GetPlainClientFromSecrets() (*govcd.VCDClient, error)
func (*VCDAuthConfig) GetSwaggerClientFromSecrets ¶
func (config *VCDAuthConfig) GetSwaggerClientFromSecrets() (*govcd.VCDClient, *swaggerClient.APIClient, error)
type VirtualServiceBusyError ¶
type VirtualServiceBusyError struct {
VirtualServiceName string
}
func NewVirtualServiceBusyError ¶
func NewVirtualServiceBusyError(virtualServiceName string) *VirtualServiceBusyError
func (*VirtualServiceBusyError) Error ¶
func (vsError *VirtualServiceBusyError) Error() string
type VirtualServicePendingError ¶
type VirtualServicePendingError struct {
VirtualServiceName string
}
func NewVirtualServicePendingError ¶
func NewVirtualServicePendingError(virtualServiceName string) *VirtualServicePendingError
func (*VirtualServicePendingError) Error ¶
func (vsError *VirtualServicePendingError) Error() string