Versions in this module Expand all Collapse all v1 v1.0.2 Mar 7, 2023 Changes in this version + const CAPVCDEntityTypeNss + const CAPVCDEntityTypePrefix + const CAPVCDEntityTypeVendor + const ComponentCAPVCD + const ComponentCPI + const ComponentCSI + const ComponentStatusFieldErrorSet + const ComponentStatusFieldEventSet + const ComponentStatusFieldVCDResourceSet + const DefaultRollingWindowSize + const MaxRDEUpdateRetries + const NativeClusterEntityTypeNss + const NativeClusterEntityTypeVendor + const NoRdePrefix + const VCDVMIDPrefix + const VCloudApiVersion + const VcdResourceAppPortProfile + const VcdResourceDNATRule + const VcdResourceLoadBalancerPool + const VcdResourceVirtualService + func AddVCDResourceToStatusMap(component string, componentName string, componentVersion string, ...) (map[string]interface{}, bool, error) + func GetAppPortProfileName(dnatRuleName string) string + func GetDNATRuleName(virtualServiceName string) string + func GetUserAndOrg(fullUserName string, clusterOrg string, currentUserOrg string) (userOrg string, userName string, err error) + func GetVirtualIPsFromRDE(rde *swaggerClient.DefinedEntity) ([]string, error) + func IsCAPVCDEntityType(entityTypeID string) bool + func IsNativeClusterEntityType(entityTypeID string) bool + func IsValidEntityId(entityTypeID string) bool + func RemoveVCDResourceSetFromStatusMap(component string, componentName string, componentVersion string, ...) (map[string]interface{}, error) + func ReplaceVirtualIPsInRDE(rde *swaggerClient.DefinedEntity, updatedIps []string) (*swaggerClient.DefinedEntity, error) + type BackendError struct + AdditionalDetails map[string]interface{} + Name string + OccurredAt time.Time + VcdResourceId string + VcdResourceName string + type BackendEvent struct + AdditionalDetails map[string]interface{} + Name string + OccurredAt time.Time + VcdResourceId string + VcdResourceName string + type CPIStatus struct + Errors []BackendError + Events []BackendEvent + Name string + VCDResourceSet []VCDResource + Version string + VirtualIPs []string + type CapvcdRdeFoundError struct + EntityType string + func (e CapvcdRdeFoundError) Error() string + type Client struct + APIClient *swaggerClient.APIClient + ClusterOVDCName string + ClusterOrgName string + RWLock sync.RWMutex + VCDAuthConfig *VCDAuthConfig + VCDClient *govcd.VCDClient + VDC *govcd.Vdc + func NewVCDClientFromSecrets(host string, orgName string, vdcName string, userOrg string, user string, ...) (*Client, error) + func (client *Client) RefreshBearerToken() error + type ComponentStatus struct + ErrorSet []BackendError + EventSet []BackendEvent + VCDResourceSet []VCDResource + type ComposeVAppWithVMs struct + AllEULAsAccepted bool + Deploy bool + Description string + InstantiationParams *types.InstantiationParams + LinkedClone bool + Name string + Ovf string + PowerOn bool + SourcedItemList []*types.SourcedCompositionItemParam + VAppParent *types.Reference + XMLName xml.Name + Xmlns string + Xsi string + type CoresPerSocket struct + OvfRequired string + Value string + type CoresPerSocketMarshal struct + OvfRequired string + Value string + type Disk struct + BusSubType string + BusType string + Description string + Encrypted bool + Files *types.FilesList + HREF string + Id string + Iops int64 + Link []*types.Link + Name string + OperationKey string + Owner *types.Owner + Shareable bool + SizeMb int64 + Status int + StorageProfile *types.Reference + Tasks *types.TasksInProgress + Type string + VCloudExtension *types.VCloudExtension + type DiskCreateParams struct + Disk *Disk + Locality *types.Reference + VCloudExtension *types.VCloudExtension + XMLName xml.Name + Xmlns string + type DiskRecordType struct + AttachedVmCount int32 + BusSubType string + BusType string + BusTypeDesc string + DataStore string + DataStoreName string + Description string + Encrypted bool + HREF string + Id string + Iops int64 + IsAttached bool + IsShareable bool + Link []*types.Link + Metadata *types.Metadata + Name string + OwnerName string + SizeMB int64 + Status string + StorageProfile string + StorageProfileName string + Task string + Type string + Vdc string + VdcName string + type DiskSection struct + DiskSettings []*DiskSettings + type DiskSettings struct + AdapterType string + BusNumber int + Disk *types.Reference + DiskId string + Iops *int64 + OverrideVmDefault bool + Resizable bool + Shareable bool + SharingType string + SizeMb int64 + StorageProfile *types.Reference + ThinProvisioned *bool + UnitNumber int + VirtualQuantity *int64 + VirtualQuantityUnit string + type EntityType struct + ID string + Name string + Nss string + Schema map[string]interface{} + Version string + type ExtraConfig struct + Key string + Required bool + Value string + type ExtraConfigMarshal struct + Key string + Required bool + Value string + type ExtraConfigVirtualHardwareSection struct + ExtraConfigs []*ExtraConfig + HREF string + Info string + Items []*VirtualHardwareItem + Links types.LinkList + NS10 string + Type string + XMLName xml.Name + Xmlns string + type ExtraConfigVirtualHardwareSectionMarshal struct + ExtraConfigs []*ExtraConfigMarshal + Info string + Items []*VirtualHardwareItemMarshal + NS10 string + type GatewayBusyError struct + GatewayName string + func NewGatewayBusyError(gatewayName string) *GatewayBusyError + func (gatewayBusyError *GatewayBusyError) Error() string + type GatewayManager struct + Client *Client + GatewayRef *swaggerClient.EntityReference + IPAMSubnet string + NetworkBackingType swaggerClient.BackingNetworkType + NetworkName string + func NewGatewayManager(ctx context.Context, client *Client, networkName string, ipamSubnet string, ...) (*GatewayManager, error) + func (gatewayManager *GatewayManager) CheckIfVirtualServiceIsPending(ctx context.Context, virtualServiceName string) error + func (gatewayManager *GatewayManager) CreateAppPortProfile(appPortProfileName string, externalPort int32) (*govcd.NsxtAppPortProfile, error) + func (gatewayManager *GatewayManager) CreateDNATRule(ctx context.Context, dnatRuleName string, externalIP string, internalIP string, ...) error + func (gatewayManager *GatewayManager) CreateLoadBalancerPool(ctx context.Context, lbPoolName string, lbPoolIPList []string, ...) (*swaggerClient.EntityReference, error) + func (gatewayManager *GatewayManager) CreateVirtualService(ctx context.Context, virtualServiceName string, ...) (*swaggerClient.EntityReference, error) + func (gatewayManager *GatewayManager) DeleteAppPortProfile(appPortProfileName string, failIfAbsent bool) error + func (gatewayManager *GatewayManager) DeleteDNATRule(ctx context.Context, dnatRuleName string, failIfAbsent bool) error + func (gatewayManager *GatewayManager) DeleteLoadBalancerPool(ctx context.Context, lbPoolName string, failIfAbsent bool) error + func (gatewayManager *GatewayManager) DeleteVirtualService(ctx context.Context, virtualServiceName string, failIfAbsent bool) error + func (gatewayManager *GatewayManager) GetLoadBalancer(ctx context.Context, virtualServiceName string, lbPoolName string, ...) (string, *util.AllocatedResourcesMap, error) + func (gatewayManager *GatewayManager) GetLoadBalancerPool(ctx context.Context, lbPoolName string) (*swaggerClient.EntityReference, error) + func (gatewayManager *GatewayManager) GetLoadBalancerPoolMemberIPs(ctx context.Context, lbPoolRef *swaggerClient.EntityReference) ([]string, error) + func (gatewayManager *GatewayManager) GetLoadBalancerSEG(ctx context.Context) (*swaggerClient.EntityReference, error) + func (gatewayManager *GatewayManager) GetNATRuleRef(ctx context.Context, natRuleName string) (*NatRuleRef, error) + func (gatewayManager *GatewayManager) GetVirtualService(ctx context.Context, virtualServiceName string) (*swaggerClient.EdgeLoadBalancerVirtualServiceSummary, error) + func (gatewayManager *GatewayManager) IsNSXTBackedGateway() bool + func (gatewayManager *GatewayManager) UpdateAppPortProfile(appPortProfileName string, externalPort int32) (*govcd.NsxtAppPortProfile, error) + func (gatewayManager *GatewayManager) UpdateDNATRule(ctx context.Context, dnatRuleName string, externalIP string, internalIP string, ...) (*NatRuleRef, error) + func (gatewayManager *GatewayManager) UpdateLoadBalancerPool(ctx context.Context, lbPoolName string, lbPoolIPList []string, ...) (*swaggerClient.EntityReference, error) + func (gatewayManager *GatewayManager) UpdateVirtualService(ctx context.Context, virtualServiceName string, virtualServiceIP string, ...) (*swaggerClient.EntityReference, error) + func (gm *GatewayManager) CreateLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, ...) (string, error) + func (gm *GatewayManager) DeleteLoadBalancer(ctx context.Context, virtualServiceNamePrefix string, lbPoolNamePrefix string, ...) (string, error) + func (gm *GatewayManager) GetUnusedExternalIPAddress(ctx context.Context, allowedIPAMSubnetStr string) (string, error) + func (gm *GatewayManager) GetUnusedInternalIPAddress(ctx context.Context, oneArm *OneArm) (string, error) + func (gm *GatewayManager) UpdateLoadBalancer(ctx context.Context, lbPoolName string, virtualServiceName string, ...) (string, error) + type IPRange struct + EndIP string + StartIP string + type LoadBalancerPoolBusyError struct + LBPoolName string + func NewLBPoolBusyError(lbPoolName string) *LoadBalancerPoolBusyError + func (lbPoolError *LoadBalancerPoolBusyError) Error() string + type NatRuleRef struct + AppPortProfileRef *swaggerClient.EntityReference + ExternalIP string + ExternalPort int + ID string + InternalIP string + InternalPort int + Name string + type NetworkConnection struct + ExternalIPAddress string + IPAddress string + IPAddressAllocationMode string + IpType string + IsConnected bool + MACAddress string + NeedsCustomization bool + Network string + NetworkAdapterType string + NetworkConnectionIndex int + SecondaryIpAddressAllocationMode string + type NetworkConnectionSection struct + HREF string + Info string + Link []*types.Link + NetworkConnection []*NetworkConnection + OvfRequired string + PrimaryNetworkConnectionIndex int + Type string + XMLName xml.Name + Xmlns string + type NetworkConnectionSectionMarshal struct + HREF string + Info string + Link []*types.Link + NetworkConnection []*NetworkConnection + OvfRequired string + PrimaryNetworkConnectionIndex int + Type string + XMLName xml.Name + Xmlns string + type NillableElement struct + Value string + XmlnsXsi string + XsiNil bool + type NillableElementMarshal struct + Value string + XmlnsXsi string + XsiNil string + type NoRDEError struct + func NewNoRDEError(message string) *NoRDEError + func (nre *NoRDEError) Error() string + type NonCAPVCDEntityError struct + EntityTypeID string + func (e NonCAPVCDEntityError) Error() string + type OneArm struct + EndIP string + StartIP string + type OrgManager struct + Client *Client + OrgName string + func NewOrgManager(client *Client, orgName string) (*OrgManager, error) + func (orgManager *OrgManager) GetCatalogByName(catalogName string) (*govcd.Catalog, error) + func (orgManager *OrgManager) GetComputePolicyDetailsFromName(computePolicyName string) (*types.VdcComputePolicy, error) + type PortDetails struct + CertAlias string + ExternalPort int32 + InternalPort int32 + PortSuffix string + Protocol string + UseSSL bool + type QueryResultCatalogRecordType struct + CreationDate time.Time + HREF string + ID string + IsPublished string + IsShared bool + Name string + NumberOfMedia int32 + NumberOfVAppTemplates int32 + OrgName string + Owner string + OwnerName string + Type string + Xmlns string + type QueryResultOrgVdcRecordType struct + ComputeProviderScope string + CpuAllocationMhz int64 + CpuLimitMhz int64 + CpuReservedMhz int64 + CpuUsedMhz int64 + Description string + HREF string + ID string + IsBusy bool + IsEnabled bool + IsFastProvisioned bool + IsThinProvisioned bool + MemoryAllocationMB int64 + MemoryLimitMB int64 + MemoryReservedMB int64 + MemoryUsedMB int64 + Name string + NetworkPoolUniversalId string + NetworkProviderScope string + NumberOfDatastores int32 + NumberOfDeployedUnmanagedVApps int32 + NumberOfDeployedVApps int32 + NumberOfDisks int32 + NumberOfMedia int32 + NumberOfRunningVMs int32 + NumberOfStorageProfiles int32 + NumberOfUnmanagedVApps int32 + NumberOfVAppTemplates int32 + NumberOfVApps int32 + NumberOfVMs int32 + OrgName string + ProviderVdc string + ProviderVdcName string + Status string + StorageLimitMB int64 + StorageUsedMB int64 + Type string + Xmlns string + type QueryResultRecordsType struct + CatalogRecord []*QueryResultCatalogRecordType + HREF string + Link []*types.Link + Name string + OrgVdcRecord []*QueryResultOrgVdcRecordType + Page int32 + PageSize int32 + Total float64 + Type string + Xmlns string + type RDEManager struct + Client *Client + ClusterID string + StatusComponentName string + StatusComponentVersion string + func NewRDEManager(client *Client, clusterID string, statusComponentName string, ...) *RDEManager + func (rdeManager *RDEManager) AddToErrorSet(ctx context.Context, componentSectionName string, newError BackendError, ...) error + func (rdeManager *RDEManager) AddToEventSet(ctx context.Context, componentSectionName string, newEvent BackendEvent, ...) error + func (rdeManager *RDEManager) AddToVCDResourceSet(ctx context.Context, component string, resourceType string, ...) error + func (rdeManager *RDEManager) IsCapvcdEntityTypeRegistered(version string) bool + func (rdeManager *RDEManager) RemoveErrorByNameOrIdFromErrorSet(ctx context.Context, componentSectionName string, errorName string, ...) error + func (rdeManager *RDEManager) RemoveFromVCDResourceSet(ctx context.Context, component, resourceType, resourceName string) error + type VCDAuthConfig struct + CloudAPIHref string + Host string + Insecure bool + IsSysAdmin bool + Password string + RefreshToken string + User string + UserOrg string + VDC string + func NewVCDAuthConfigFromSecrets(host string, user string, secret string, refreshToken string, userOrg string, ...) *VCDAuthConfig + func (config *VCDAuthConfig) GetBearerToken() (*govcd.VCDClient, *http.Response, error) + func (config *VCDAuthConfig) GetPlainClientFromSecrets() (*govcd.VCDClient, error) + func (config *VCDAuthConfig) GetSwaggerClientFromSecrets() (*govcd.VCDClient, *swaggerClient.APIClient, error) + type VCDResource struct + AdditionalDetails map[string]interface{} + ID string + Name string + Type string + type VdcManager struct + Client *Client + OrgName string + Vdc *govcd.Vdc + VdcName string + func NewVDCManager(client *Client, orgName string, vdcName string) (*VdcManager, error) + func (vdc *VdcManager) AddMetadataToVApp(VAppName string, paramMap map[string]string) error + func (vdc *VdcManager) AddNewMultipleVM(vapp *govcd.VApp, vmNamePrefix string, vmNum int, catalogName string, ...) (govcd.Task, error) + func (vdc *VdcManager) AddNewTkgVM(vmNamePrefix string, VAppName string, vmNum int, catalogName string, ...) error + func (vdc *VdcManager) AddNewVM(vmNamePrefix string, VAppName string, vmNum int, catalogName string, ...) error + func (vdc *VdcManager) DeleteVApp(VAppName string) error + func (vdc *VdcManager) DeleteVM(VAppName, vmName string) error + func (vdc *VdcManager) FindAllVMsInVapp(VAppName string) ([]*types.Vm, error) + func (vdc *VdcManager) FindVMByName(VAppName string, vmName string) (*govcd.VM, error) + func (vdc *VdcManager) FindVMByUUID(VAppName string, vcdVmUUID string) (*govcd.VM, error) + func (vdc *VdcManager) GetExtraConfigValue(vm *govcd.VM, key string) (string, error) + func (vdc *VdcManager) GetMetadataByKey(vApp *govcd.VApp, key string) (value string, err error) + func (vdc *VdcManager) GetOrCreateVApp(VAppName string, ovdcNetworkName string) (*govcd.VApp, error) + func (vdc *VdcManager) GetVAppNameFromVMName(VAppName string, vmName string) (string, error) + func (vdc *VdcManager) IsVmNotAvailable(err error) bool + func (vdc *VdcManager) RebootVm(vm *govcd.VM) error + func (vdc *VdcManager) SetVmExtraConfigKeyValue(vm *govcd.VM, key string, value string, required bool) error + func (vdc *VdcManager) WaitForGuestScriptCompletion(VAppName, vmName string) error + type VirtualHardwareConnectionMarshal struct + IPAddress string + IpAddressingMode string + PrimaryConnection bool + Value string + type VirtualHardwareHostResource struct + BusSubType string + BusType int + Capacity int + Disk string + Iops string + OverrideVmDefault string + StorageProfile string + type VirtualHardwareHostResourceMarshal struct + BusSubType string + BusType int + Capacity int + Iops string + OverrideVmDefault string + StorageProfile string + type VirtualHardwareItem struct + Address *NillableElement + AddressOnParent *NillableElement + AllocationUnits *NillableElement + AutomaticAllocation *NillableElement + AutomaticDeallocation *NillableElement + ConfigurationName *NillableElement + Connection []*types.VirtualHardwareConnection + ConsumerVisibility *NillableElement + CoresPerSocket *CoresPerSocket + Description *NillableElement + ElementName *NillableElement + Generation *NillableElement + HostResource []*VirtualHardwareHostResource + Href string + InstanceID int + Limit *NillableElement + Link []*types.Link + MappingBehavior *NillableElement + OtherResourceType *NillableElement + Parent *NillableElement + PoolID *NillableElement + Reservation *NillableElement + ResourceSubType *NillableElement + ResourceType *NillableElementMarshal + Type string + VirtualQuantity *NillableElement + VirtualQuantityUnits *NillableElement + Weight *NillableElement + XMLName xml.Name + type VirtualHardwareItemMarshal struct + Address *NillableElementMarshal + AddressOnParent *NillableElementMarshal + AllocationUnits *NillableElementMarshal + AutomaticAllocation *NillableElementMarshal + AutomaticDeallocation *NillableElementMarshal + ConfigurationName *NillableElementMarshal + Connection []*VirtualHardwareConnectionMarshal + ConsumerVisibility *NillableElementMarshal + CoresPerSocket *CoresPerSocketMarshal + Description *NillableElementMarshal + ElementName *NillableElementMarshal + Generation *NillableElementMarshal + HostResource []*VirtualHardwareHostResourceMarshal + Href string + InstanceID int + Limit *NillableElementMarshal + Link []*types.Link + MappingBehavior *NillableElementMarshal + OtherResourceType *NillableElementMarshal + Parent *NillableElementMarshal + PoolID *NillableElementMarshal + Reservation *NillableElementMarshal + ResourceSubType *NillableElementMarshal + ResourceType *NillableElementMarshal + Type string + VirtualQuantity *NillableElementMarshal + VirtualQuantityUnits *NillableElementMarshal + Weight *NillableElementMarshal + XMLName xml.Name + type VirtualServiceBusyError struct + VirtualServiceName string + func NewVirtualServiceBusyError(virtualServiceName string) *VirtualServiceBusyError + func (vsError *VirtualServiceBusyError) Error() string + type VirtualServicePendingError struct + VirtualServiceName string + func NewVirtualServicePendingError(virtualServiceName string) *VirtualServicePendingError + func (vsError *VirtualServicePendingError) Error() string + type Vm struct + Common string + Deployed string + Description string + ExtraConfigVirtualHardwareSection *ExtraConfigVirtualHardwareSection + Href string + Id string + Name string + NeedsCustomization string + NestedHypervisorEnabled string + NetworkConnectionSection *NetworkConnectionSection + Ns9 string + Ovf string + Ovfenv string + Rasd string + Status string + Type string + VmSpecSection *VmSpecSection + Vmext string + Vmw string + Vssd string + Xmlns string + type VmMarshal struct + Common string + Deployed string + Description string + Href string + Id string + Name string + NeedsCustomization string + NestedHypervisorEnabled string + NetworkConnectionSection *NetworkConnectionSectionMarshal + Ns9 string + Ovf string + Ovfenv string + Rasd string + Status string + Type string + VirtualHardwareSection *ExtraConfigVirtualHardwareSectionMarshal + VmSpecSection *VmSpecSectionMarshal + Vmext string + Vmw string + Vssd string + XMLName xml.Name + Xmlns string + type VmSpecSection struct + CpuResourceMhz *types.CpuResourceMhz + DiskSection *DiskSection + HardwareVersion *types.HardwareVersion + Info string + MediaSection *types.MediaSection + MemoryResourceMb *types.MemoryResourceMb + Modified *bool + NumCoresPerSocket *int + NumCpus *int + OsType string + TimeSyncWithHost *bool + VirtualCpuType string + VmToolsVersion string + type VmSpecSectionMarshal struct + CpuResourceMhz *types.CpuResourceMhz + DiskSection *DiskSection + HardwareVersion *types.HardwareVersion + Info string + MediaSection *types.MediaSection + MemoryResourceMb *types.MemoryResourceMb + Modified *bool + NumCoresPerSocket *int + NumCpus *int + OsType string + TimeSyncWithHost *bool + VirtualCpuType string + VmToolsVersion string + type Vms struct + HREF string + Link []*types.Link + Type string + VCloudExtension *types.VCloudExtension + VmReference []*types.Reference + XMLName xml.Name + Xmlns string