v1

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2024 License: MPL-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyVDCNameProvided    = fmt.Errorf("empty VDC name provided")
	ErrRetrievingOrg           = fmt.Errorf("error retrieving org")
	ErrRetrievingOrgAdmin      = fmt.Errorf("error retrieving org admin")
	ErrRetrievingVDC           = fmt.Errorf("error retrieving VDC")
	ErrRetrievingVDCOrVDCGroup = fmt.Errorf("error retrieving VDC or VDC Group")
)

! Errors

Functions

This section is empty.

Types

type AdminOrg added in v0.12.7

type AdminOrg struct {
	*govcd.AdminOrg
}

func (*AdminOrg) GetOrgVAppLeaseSettings added in v0.12.7

func (ao *AdminOrg) GetOrgVAppLeaseSettings() *govcdtypes.VAppLeaseSettings

GetOrgVAppLeaseSettings retrieves the lease settings for a vApp in the specified organization.

func (*AdminOrg) ListCatalogs added in v0.12.7

func (ao *AdminOrg) ListCatalogs() *govcdtypes.CatalogsList

ListCatalogs

Get the catalogs list from the admin org.

type AdminVDC added in v0.12.7

type AdminVDC struct {
	*govcd.AdminVdc
}

type BMS added in v0.12.0

type BMS struct {
	BMSNetworks []BMSNetwork `json:"network"`
	BMSDetails  []BMSDetail  `json:"bms"`
}

func (*BMS) GetBMS added in v0.12.0

func (v *BMS) GetBMS() []BMSDetail

func (*BMS) GetBMSByHostname added in v0.12.1

func (v *BMS) GetBMSByHostname(hostname string) (response *BMSDetail, err error)

func (*BMS) GetNetworks added in v0.12.0

func (v *BMS) GetNetworks() []BMSNetwork

func (*BMS) List added in v0.12.0

func (v *BMS) List() (response *[]BMS, err error)

! BMS Return a Slice of BMS struct

type BMSDetail added in v0.12.0

type BMSDetail struct {
	BMSType           string     `json:"bmsType"`
	Hostname          string     `json:"hostname"`
	OS                string     `json:"os"`
	BiosConfiguration string     `json:"biosConfiguration"`
	Storages          BMSStorage `json:"storage"`
}

func (*BMSDetail) GetStorages added in v0.12.0

func (v *BMSDetail) GetStorages() BMSStorage

type BMSNetwork added in v0.12.0

type BMSNetwork struct {
	VLANID string `json:"vlanid"`
	Subnet string `json:"subnet"`
	Prefix string `json:"prefix"`
}

func (*BMSNetwork) GetPrefix added in v0.12.0

func (v *BMSNetwork) GetPrefix() string

func (*BMSNetwork) GetSubnet added in v0.12.0

func (v *BMSNetwork) GetSubnet() string

func (*BMSNetwork) GetVLANID added in v0.12.0

func (v *BMSNetwork) GetVLANID() string

type BMSStorage added in v0.12.0

type BMSStorage struct {
	Local  []BMSStorageDetail `json:"local,omitempty"`
	Shared []BMSStorageDetail `json:"shared,omitempty"`
	System []BMSStorageDetail `json:"system,omitempty"`
	Data   []BMSStorageDetail `json:"data,omitempty"`
}

func (*BMSStorage) GetData added in v0.12.0

func (v *BMSStorage) GetData() []BMSStorageDetail

func (*BMSStorage) GetLocal added in v0.12.0

func (v *BMSStorage) GetLocal() []BMSStorageDetail

func (*BMSStorage) GetShared added in v0.12.0

func (v *BMSStorage) GetShared() []BMSStorageDetail

func (*BMSStorage) GetSystem added in v0.12.0

func (v *BMSStorage) GetSystem() []BMSStorageDetail

type BMSStorageDetail added in v0.12.0

type BMSStorageDetail struct {
	StorageClass string `json:"storageClass"`
	Size         string `json:"size"`
}

func (*BMSStorageDetail) GetSize added in v0.12.0

func (v *BMSStorageDetail) GetSize() string

func (*BMSStorageDetail) GetStorageClass added in v0.12.0

func (v *BMSStorageDetail) GetStorageClass() string

type Bandwidth

type Bandwidth int

type CAVAdminVDC added in v0.12.7

type CAVAdminVDC struct{}

func (CAVAdminVDC) Get added in v0.12.7

func (v CAVAdminVDC) Get(vdcName string) (*AdminVDC, error)

GetAdminVdc return the admin vdc using the name provided in the provider.

type CAVVdc added in v0.6.0

type CAVVdc struct{}

func (*CAVVdc) GetVDC added in v0.6.0

func (v *CAVVdc) GetVDC(vdcName string) (*VDC, error)

Get retrieves the VDC (Virtual Data Center) by its name. It returns a pointer to the VDC and an error if any. The function performs concurrent requests to retrieve the VDC from both the VMware and the infrapi. It uses goroutines and channels to handle the concurrent requests and waits for all goroutines to finish using a WaitGroup. The function returns the VDC that was successfully retrieved from either the VMware or the infrapi.

func (*CAVVdc) GetVDCGroup added in v0.6.0

func (v *CAVVdc) GetVDCGroup(vdcGroupName string) (*VDCGroup, error)

GetVDCGroup retrieves the VDC Group by its name. It returns a pointer to the VDC Group and an error if any.

func (*CAVVdc) GetVDCOrVDCGroup added in v0.6.0

func (v *CAVVdc) GetVDCOrVDCGroup(vdcOrVDCGroupName string) (VDCOrVDCGroupInterface, error)

GetVDCOrVDCGroup returns the VDC or VDC Group by its name. It returns a pointer to the VDC or VDC Group and an error if any.

func (*CAVVdc) List added in v0.6.0

func (v *CAVVdc) List() (*infrapi.VDCs, error)

List returns the list of VDCs. TODO - refacto to return a slice of VDC

func (*CAVVdc) New added in v0.6.0

func (v *CAVVdc) New(ctx context.Context, object *infrapi.CAVVirtualDataCenter) (*VDC, error)

New creates a new VDC. For the context use contet.withTimeout to set a timeout.

type ClassService

type ClassService string
const (
	// ClassServiceVRFStandard - VRF Standard
	ClassServiceVRFStandard ClassService = "VRF_STANDARD"
	// ClassServiceVRFPremium - VRF Premium
	ClassServiceVRFPremium ClassService = "VRF_PREMIUM"
	// ClassServiceVRFDedicatedMedium - VRF Dedicated Medium
	ClassServiceVRFDedicatedMedium ClassService = "VRF_DEDICATED_MEDIUM"
	// ClassServiceVRFDedicatedLarge - VRF Dedicated Large
	ClassServiceVRFDedicatedLarge ClassService = "VRF_DEDICATED_LARGE"
)

func (ClassService) IsVRFDedicatedLarge added in v0.10.0

func (c ClassService) IsVRFDedicatedLarge() bool

IsVRFDedicatedLarge - Returns true if the ClassService is VRFDedicatedLarge

func (ClassService) IsVRFDedicatedMedium added in v0.10.0

func (c ClassService) IsVRFDedicatedMedium() bool

IsVRFDedicatedMedium - Returns true if the ClassService is VRFDedicatedMedium

func (ClassService) IsVRFPremium

func (c ClassService) IsVRFPremium() bool

IsVRFPremium - Returns true if the ClassService is VRFPremium

func (ClassService) IsVRFStandard

func (c ClassService) IsVRFStandard() bool

IsVRFStandard - Returns true if the ClassService is VRFStandard

type EdgeClient added in v0.13.0

type EdgeClient struct {
	EdgeVCDInterface
	*EdgeGatewayType
}

func (*EdgeClient) GetFirewall added in v0.13.0

func (e *EdgeClient) GetFirewall() (*EdgeGatewayFirewall, error)

GetFirewall retrieves the firewall configuration for the Edge Gateway. It first fetches the VMware Edge Gateway associated with the EdgeGw instance, and then retrieves the firewall configuration from the Edge Gateway. Returns an EdgeGatewayFirewall instance containing the firewall configuration, or an error if any step in the process fails.

func (*EdgeClient) GetVmwareEdgeGateway added in v0.13.0

func (e *EdgeClient) GetVmwareEdgeGateway() (*govcd.NsxtEdgeGateway, error)

GetVmwareEdgeGateway - Returns the VMware Edge Gateway

type EdgeGateway

type EdgeGateway struct{}

func (*EdgeGateway) Get added in v0.13.0

func (v *EdgeGateway) Get(edgeGatewayNameOrID string) (edgeClient *EdgeClient, err error)

func (*EdgeGateway) GetAllowedBandwidthValues

func (v *EdgeGateway) GetAllowedBandwidthValues(t0VrfName string) (allowedValues []int, err error)

GetAllowedBandwidthValues - Returns the allowed rate limit value

func (*EdgeGateway) GetByID deprecated

func (v *EdgeGateway) GetByID(edgeGatewayID string) (edgeClient *EdgeClient, err error)

GetByID - Returns the edge gateway ID ID format is UUID

Deprecated: Use Get instead

func (*EdgeGateway) GetByName deprecated

func (v *EdgeGateway) GetByName(edgeGatewayName string) (edgeClient *EdgeClient, err error)

Get - Returns the edge gateway

Deprecated: Use Get instead

func (*EdgeGateway) List

func (v *EdgeGateway) List() (response *EdgeGateways, err error)

List - Returns the list of edge gateways

func (*EdgeGateway) New

func (v *EdgeGateway) New(vdcName, tier0VrfName string) (job *commoncloudavenue.JobStatus, err error)

New - Creates a new edge gateway

func (*EdgeGateway) NewFromVDCGroup

func (v *EdgeGateway) NewFromVDCGroup(vdcGroupName, tier0VrfName string) (job *commoncloudavenue.JobStatus, err error)

NewFromVDCGroup - Creates a new edge gateway from a VDC Group

type EdgeGatewayFirewall added in v0.13.0

type EdgeGatewayFirewall struct {
	*govcd.NsxtFirewall
	// contains filtered or unexported fields
}

func (*EdgeGatewayFirewall) DeleteFirewall added in v0.13.0

func (e *EdgeGatewayFirewall) DeleteFirewall() error

DeleteFirewall deletes the firewall configuration for the Edge Gateway.

func (*EdgeGatewayFirewall) UpdateFirewall added in v0.13.0

func (e *EdgeGatewayFirewall) UpdateFirewall(fwRules []*govcdtypes.NsxtFirewallRule) (err error)

UpdateFirewall updates the firewall configuration for the Edge Gateway. It first fetches the VMware Edge Gateway associated with the EdgeGw instance, and then updates the firewall configuration on the Edge Gateway. Returns an error if any step in the process fails.

type EdgeGatewayType added in v0.13.0

type EdgeGatewayType struct {
	Tier0VrfName string    `json:"tier0VrfId"`
	EdgeID       string    `json:"edgeId"`
	EdgeName     string    `json:"edgeName"`
	OwnerType    OwnerType `json:"ownerType"`
	OwnerName    string    `json:"ownerName"`
	Description  string    `json:"description"`
	Bandwidth    Bandwidth `json:"rateLimit"`
}

func (*EdgeGatewayType) Delete added in v0.13.0

func (e *EdgeGatewayType) Delete() (job *commoncloudavenue.JobStatus, err error)

Delete - Deletes the edge gateway

func (*EdgeGatewayType) GetBandwidth added in v0.13.0

func (e *EdgeGatewayType) GetBandwidth() Bandwidth

GetBandwidth - Returns the rate limit

func (*EdgeGatewayType) GetDescription added in v0.13.0

func (e *EdgeGatewayType) GetDescription() string

GetDescription - Returns the Description

func (*EdgeGatewayType) GetID added in v0.13.0

func (e *EdgeGatewayType) GetID() string

GetID - Returns the EdgeID

func (*EdgeGatewayType) GetName added in v0.13.0

func (e *EdgeGatewayType) GetName() string

GetName - Returns the EdgeName

func (*EdgeGatewayType) GetOwnerName added in v0.13.0

func (e *EdgeGatewayType) GetOwnerName() string

GetOwnerName - Returns the OwnerName

func (*EdgeGatewayType) GetOwnerType added in v0.13.0

func (e *EdgeGatewayType) GetOwnerType() OwnerType

GetOwnerType - Returns the OwnerType

func (*EdgeGatewayType) GetT0 added in v0.13.0

func (e *EdgeGatewayType) GetT0() string

GetT0 - Returns the Tier0VrfID (alias)

func (*EdgeGatewayType) GetTier0VrfID added in v0.13.0

func (e *EdgeGatewayType) GetTier0VrfID() string

GetTier0VrfID - Returns the Tier0VrfID

func (*EdgeGatewayType) ListNetworksType added in v0.13.0

func (e *EdgeGatewayType) ListNetworksType() (response *NetworkTypes, err error)

ListNetworksType - Returns the list of networks by type configured on the edge gateway

func (*EdgeGatewayType) UpdateBandwidth added in v0.13.0

func (e *EdgeGatewayType) UpdateBandwidth(rateLimit int) (job *commoncloudavenue.JobStatus, err error)

UpdateBandwidth - Updates the bandwidth

type EdgeGateways

type EdgeGateways []EdgeGatewayType

func (*EdgeGateways) GetBandwidthCapacityRemaining

func (e *EdgeGateways) GetBandwidthCapacityRemaining(t0VrfName string) (response int, err error)

GetBandwidthCapacityRemaining - Returns the bandwidth capacity remaining in Mbps

type EdgeVCDInterface added in v0.13.0

type EdgeVCDInterface interface {
	GetNsxtFirewall() (*govcd.NsxtFirewall, error)
	UpdateNsxtFirewall(firewallRules *govcdtypes.NsxtFirewallRuleContainer) (*govcd.NsxtFirewall, error)
}

This interface contains all methods for the edge gateway in the CloudAvenue environment.

type Get added in v0.7.0

type Get struct{}

func (*Get) EdgeGW added in v0.7.0

func (q *Get) EdgeGW(edgeGWName string) (*types.QueryResultEdgeGatewayRecordType, error)

EdgeGW get a edgegw informations by name

func (*Get) VAPP added in v0.7.0

func (q *Get) VAPP(vappName string) (*types.QueryResultVAppRecordType, error)

VAPP get a vapp informations by name

func (*Get) VDC added in v0.7.0

func (q *Get) VDC(vdcName string) (*types.QueryResultOrgVdcRecordType, error)

VDC get a vdc informations by name

func (*Get) VM added in v0.7.0

func (q *Get) VM(vmName, vAppName string) (*types.QueryResultVMRecordType, error)

VM get a vm informations by name

type IP

type IP struct {
	UplinkIP        string `json:"uplinkIp"`
	TranslatedIP    string `json:"translatedIp"`
	EdgeGatewayName string `json:"edgeGatewayName"`
}

func (*IP) Delete

func (i *IP) Delete() (job *commoncloudavenue.JobStatus, err error)

Delete - Deletes a public IP

func (*IP) GetIP

func (i *IP) GetIP() string

GetIP - Returns the public IP

type IPs

type IPs struct {
	InternalIP    string `json:"internalIp"`
	NetworkConfig []IP   `json:"networkConfig"`
}

type List added in v0.7.0

type List struct{}

func (*List) EdgeGW added in v0.7.0

func (q *List) EdgeGW() ([]*types.QueryResultEdgeGatewayRecordType, error)

EdgeGW list all edgegw informations

func (*List) VAPP added in v0.7.0

func (q *List) VAPP() ([]*types.QueryResultVAppRecordType, error)

VAPP list all vapp informations

func (*List) VDC added in v0.7.0

func (q *List) VDC() ([]*types.QueryResultOrgVdcRecordType, error)

VDC list all vdc informations

func (*List) VM added in v0.7.0

func (q *List) VM(vAppName string) ([]*types.QueryResultVMRecordType, error)

VM list all vm informations

type NetworkType

type NetworkType struct {
	Type         TypeOfNetwork `json:"networkType"`
	PrefixLength int           `json:"prefixLength"`
	StartAddress string        `json:"startAddress"`
}

func (NetworkType) GetEndAddress

func (n NetworkType) GetEndAddress() string

GetEndAddress - Returns the EndAddress

func (NetworkType) GetPrefixLength

func (n NetworkType) GetPrefixLength() int

GetPrefixLength - Returns the PrefixLength

func (NetworkType) GetStartAddress

func (n NetworkType) GetStartAddress() string

GetStartAddress - Returns the StartAddress

func (NetworkType) IsServiceZone

func (n NetworkType) IsServiceZone() bool

IsServiceZone - Returns true if the network type is ServiceZone

type NetworkTypes

type NetworkTypes []NetworkType

type OSEError added in v0.5.1

type OSEError struct {
	Status  OSEErrorStatus `json:"status"`
	Code    string         `json:"code"`
	Message string         `json:"message"`
}

func (*OSEError) Error added in v0.5.1

func (e *OSEError) Error() string

func (*OSEError) GetCode added in v0.5.1

func (e *OSEError) GetCode() string

func (*OSEError) GetMessage added in v0.5.1

func (e *OSEError) GetMessage() string

func (*OSEError) GetStatus added in v0.5.1

func (e *OSEError) GetStatus() OSEErrorStatus

func (*OSEError) IsNotFountError added in v0.5.1

func (e *OSEError) IsNotFountError() bool

IsNotFountError returns true if the error is a 404 error

type OSEErrorStatus added in v0.5.1

type OSEErrorStatus int

type Org

type Org struct {
	*govcd.Org
}

func (*Org) DeleteNetworkDHCP added in v0.12.7

func (o *Org) DeleteNetworkDHCP(orgNetworkID string) error

DeleteNetworkDHCP deletes the DHCP object for the org network provided in parameter.

func (*Org) GetID

func (o *Org) GetID() string

Returns the ID of the organization.

func (*Org) GetName

func (o *Org) GetName() string

Returns the name of the organization.

func (*Org) GetNetworkDHCP added in v0.12.7

func (o *Org) GetNetworkDHCP(orgNetworkID string) (*govcd.OpenApiOrgVdcNetworkDhcp, error)

TODO refacto GetNetworkDHCP returns the DHCP object for the org network provided in parameter.

func (*Org) UpdateNetworkDHCP added in v0.12.7

func (o *Org) UpdateNetworkDHCP(orgNetworkID string, dhcpParameters *govcdtypes.OpenApiOrgVdcNetworkDhcp) error

UpdateNetworkDHCP updates the DHCP object for the org network provided in parameter.

type OwnerType

type OwnerType string
const (
	OwnerVDC OwnerType = "vdc"
)

func (OwnerType) IsVDC

func (o OwnerType) IsVDC() bool

IsOwnerVDC - Returns true if the owner type is VDC

func (OwnerType) IsVDCGROUP

func (o OwnerType) IsVDCGROUP() bool

IsVDCGROUP - Returns true if the owner type is VDCGROUP

type PublicIP

type PublicIP struct{}

func (*PublicIP) GetIP

func (v *PublicIP) GetIP(publicIP string) (response *IP, err error)

GetIP - Returns the public IP by edge gateway

func (*PublicIP) GetIPByJob added in v0.7.1

func (v *PublicIP) GetIPByJob(job *commoncloudavenue.JobStatus) (response *IP, err error)

GetIPByJob - Returns the public IP by job

func (*PublicIP) GetIPs

func (v *PublicIP) GetIPs() (response *IPs, err error)

GetIPs - Returns the list of public IPs

func (*PublicIP) GetIPsByEdgeGateway

func (v *PublicIP) GetIPsByEdgeGateway(edgeGatewayName string) (response *IPs, err error)

GetIPsByEdgeGateway - Returns the list of public IPs by edge gateway

func (*PublicIP) New added in v0.5.6

func (v *PublicIP) New(edgeGatewayName string) (job *commoncloudavenue.JobStatus, err error)

New - Returns a new PublicIP

type Query added in v0.7.0

type Query struct{}

func (*Query) Get added in v0.7.0

func (v *Query) Get() *Get

func (*Query) List added in v0.7.0

func (v *Query) List() *List

type S3Client added in v0.4.0

type S3Client struct {
	*s3.S3
}

func (S3Client) GetUser added in v0.4.0

func (s S3Client) GetUser(username string) (resp *S3User, err *OSEError)

GetUser - Get a S3 user by username

func (S3Client) GetUsers added in v0.4.0

func (s S3Client) GetUsers() (resp *S3Users, err error)

GetUsers - Get all S3 users

func (S3Client) SyncBucket added in v0.4.1

func (s S3Client) SyncBucket(bucketName string) (err error)

SyncBucket - Syncs a bucket

type S3Credential added in v0.4.0

type S3Credential struct {
	TenantID        string    `json:"tenantId"`
	StorageTenantID string    `json:"storageTenantId"`
	Owner           string    `json:"owner"`
	OwnerID         string    `json:"ownerId"`
	StorageUserID   string    `json:"storageUserId"`
	Type            string    `json:"type"`
	Immutable       bool      `json:"immutable"`
	AccessKey       string    `json:"accessKey"`
	SecretKey       string    `json:"secretKey"`
	Active          bool      `json:"active"`
	CreatedDate     time.Time `json:"createdDate"`
	LastAccessDate  time.Time `json:"lastAccessDate"`
	AppName         string    `json:"appName"`
	AllowedBuckets  []string  `json:"allowedBuckets"`
	UsedK8SClusters []string  `json:"usedK8sClusters"`
	ProviderOwner   bool      `json:"providerOwner"`
}

func (*S3Credential) Delete added in v0.4.0

func (c *S3Credential) Delete() (err error)

DeleteCredential - Delete a credential

func (*S3Credential) GetAccessKey added in v0.4.0

func (c *S3Credential) GetAccessKey() string

func (*S3Credential) GetAllowedBuckets added in v0.4.0

func (c *S3Credential) GetAllowedBuckets() []string

func (*S3Credential) GetAppName added in v0.4.0

func (c *S3Credential) GetAppName() string

func (*S3Credential) GetCreatedDate added in v0.4.0

func (c *S3Credential) GetCreatedDate() time.Time

func (*S3Credential) GetLastAccessDate added in v0.4.0

func (c *S3Credential) GetLastAccessDate() time.Time

func (*S3Credential) GetOwner added in v0.4.0

func (c *S3Credential) GetOwner() string

func (*S3Credential) GetOwnerID added in v0.4.0

func (c *S3Credential) GetOwnerID() string

func (*S3Credential) GetSecretKey added in v0.4.0

func (c *S3Credential) GetSecretKey() string

func (*S3Credential) GetStorageTenantID added in v0.4.0

func (c *S3Credential) GetStorageTenantID() string

func (*S3Credential) GetStorageUserID added in v0.4.0

func (c *S3Credential) GetStorageUserID() string

func (*S3Credential) GetTenantID added in v0.4.0

func (c *S3Credential) GetTenantID() string

func (*S3Credential) GetType added in v0.4.0

func (c *S3Credential) GetType() string

func (*S3Credential) GetUsedK8SClusters added in v0.4.0

func (c *S3Credential) GetUsedK8SClusters() []string

func (*S3Credential) IsActive added in v0.4.0

func (c *S3Credential) IsActive() bool

func (*S3Credential) IsImmutable added in v0.4.0

func (c *S3Credential) IsImmutable() bool

func (*S3Credential) IsProviderOwner added in v0.4.0

func (c *S3Credential) IsProviderOwner() bool

type S3Credentials added in v0.4.0

type S3Credentials []S3Credential

type S3User added in v0.4.0

type S3User struct {
	Name             string   `json:"name"`
	ID               string   `json:"id"`
	FullName         string   `json:"fullName"`
	Role             string   `json:"role"`
	SubordinateRoles []string `json:"subordinateRoles"`
	Active           bool     `json:"active"`
	CurrentRegion    string   `json:"currentRegion"`
	Site             struct {
		ID           string `json:"id"`
		Name         string `json:"name"`
		RestEndpoint string `json:"restEndpoint"`
	} `json:"site"`
	Usage struct {
		Scope          string `json:"scope"`
		TotalBytes     int    `json:"totalBytes"`
		UsedBytes      int    `json:"usedBytes"`
		AvailableBytes int    `json:"availableBytes"`
		ObjectCount    int    `json:"objectCount"`
		BucketCount    int    `json:"bucketCount"`
	} `json:"usage"`
	ExistedOnStorage bool     `json:"existedOnStorage"`
	CanoncialID      string   `json:"storageCanonicalId"`
	PolicyArns       []string `json:"policyArns"`
	Remote           bool     `json:"remote"`
	PoseAsUser       bool     `json:"poseAsUser"`
	SourceTenant     string   `json:"sourceTenant"`
}

func (*S3User) GetAvailableBytes added in v0.4.0

func (s *S3User) GetAvailableBytes() int

func (*S3User) GetBucketCount added in v0.4.0

func (s *S3User) GetBucketCount() int

func (*S3User) GetCanonicalID added in v0.4.0

func (s *S3User) GetCanonicalID() (resp string, err error)

GetCanonicalID - Get a S3 user canonical ID by username

func (*S3User) GetCredential added in v0.4.0

func (s *S3User) GetCredential(accessKey string) (resp *S3Credential, err error)

GetCredential - Get a credential by access key

func (*S3User) GetCredentials added in v0.4.0

func (s *S3User) GetCredentials() (resp *S3Credentials, err error)

GetCredentials - Get a list of credentials

func (*S3User) GetCurrentRegion added in v0.4.0

func (s *S3User) GetCurrentRegion() string

func (*S3User) GetExistedOnStorage added in v0.4.0

func (s *S3User) GetExistedOnStorage() bool

func (*S3User) GetFullName added in v0.4.0

func (s *S3User) GetFullName() string

func (*S3User) GetID added in v0.4.0

func (s *S3User) GetID() string

func (*S3User) GetName added in v0.4.0

func (s *S3User) GetName() string

func (*S3User) GetObjectCount added in v0.4.0

func (s *S3User) GetObjectCount() int

func (*S3User) GetPolicyArns added in v0.4.0

func (s *S3User) GetPolicyArns() []string

func (*S3User) GetRole added in v0.4.0

func (s *S3User) GetRole() string

func (*S3User) GetSiteID added in v0.4.0

func (s *S3User) GetSiteID() string

func (*S3User) GetSiteName added in v0.4.0

func (s *S3User) GetSiteName() string

func (*S3User) GetSiteRestEndpoint added in v0.4.0

func (s *S3User) GetSiteRestEndpoint() string

func (*S3User) GetSourceTenant added in v0.4.0

func (s *S3User) GetSourceTenant() string

func (*S3User) GetSubordinateRoles added in v0.4.0

func (s *S3User) GetSubordinateRoles() []string

func (*S3User) GetTotalBytes added in v0.4.0

func (s *S3User) GetTotalBytes() int

func (*S3User) GetUsageScope added in v0.4.0

func (s *S3User) GetUsageScope() string

func (*S3User) GetUsedBytes added in v0.4.0

func (s *S3User) GetUsedBytes() int

func (*S3User) IsActive added in v0.4.0

func (s *S3User) IsActive() bool

func (*S3User) IsPoseAsUser added in v0.4.0

func (s *S3User) IsPoseAsUser() bool

func (*S3User) IsRemote added in v0.4.0

func (s *S3User) IsRemote() bool

func (*S3User) NewCredential added in v0.4.0

func (s *S3User) NewCredential() (resp *S3Credential, err error)

NewCredential - Create a new credential

type S3Users added in v0.4.0

type S3Users []S3User

func (*S3Users) UserExists added in v0.4.0

func (s *S3Users) UserExists(username string) (exist bool, user *S3User)

UserExists - Check if a user exists

type SyncBucketResponse added in v0.4.1

type SyncBucketResponse struct {
	ID               string    `json:"id"`
	VcdID            string    `json:"vcdId"`
	VcdAssociationID string    `json:"vcdAssociationId"`
	Description      string    `json:"description"`
	Status           string    `json:"status"`
	ResourceType     string    `json:"resourceType"`
	ResourceKey      string    `json:"resourceKey"`
	Progress         int       `json:"progress"`
	Tenant           string    `json:"tenant"`
	Owner            string    `json:"owner"`
	StartDate        time.Time `json:"startDate"`
	EndDate          time.Time `json:"endDate"`
	Reason           string    `json:"reason"`
	Metadata         struct {
		AdditionalProp1 string `json:"additionalProp1"`
		AdditionalProp2 string `json:"additionalProp2"`
		AdditionalProp3 string `json:"additionalProp3"`
	} `json:"metadata"`
}

type T0

type T0 struct {
	Tier0Vrf          string       `json:"tier0_vrf"`
	Tier0Provider     string       `json:"tier0_provider"`
	Tier0ClassService string       `json:"tier0_class_service"`
	ClassService      ClassService `json:"class_service"`
	Services          T0Services   `json:"services"`
}

func (*T0) GetBandwidthCapacity

func (t *T0) GetBandwidthCapacity() (bandwidthCapacity int, err error)

GetBandwidthCapacity - Returns the Bandwidth Capacity of the T0 in Mbps

func (*T0) GetClassService

func (t *T0) GetClassService() ClassService

GetClassService - Returns the ClassService

func (*T0) GetName

func (t *T0) GetName() string

GetName - Returns the Tier0Vrf

func (*T0) GetServices

func (t *T0) GetServices() T0Services

GetServices - Returns the Services

func (*T0) GetTier0ClassService

func (t *T0) GetTier0ClassService() string

GetTier0ClassService - Returns the Tier0ClassService

func (*T0) GetTier0Provider

func (t *T0) GetTier0Provider() string

GetTier0Provider - Returns the Tier0Provider

func (*T0) GetTier0Vrf

func (t *T0) GetTier0Vrf() string

GetTier0Vrf - Returns the Tier0Vrf

type T0Service

type T0Service struct {
	Service string `json:"service"`
	VLANID  any    `json:"vlanId"`
}

func (*T0Service) GetService

func (t *T0Service) GetService() string

GetService - Returns the Service

func (*T0Service) GetVLANID added in v0.6.0

func (t *T0Service) GetVLANID() any

GetVLANID - Returns the VLANID

type T0Services

type T0Services []T0Service

type T0s

type T0s []T0

type Tier0

type Tier0 struct{}

func (*Tier0) GetT0

func (t *Tier0) GetT0(t0 string) (response *T0, err error)

GetT0 - Returns the T0

func (*Tier0) GetT0s

func (t *Tier0) GetT0s() (listOfT0s *T0s, err error)

GetT0s - Returns the list of T0s

type TypeOfNetwork

type TypeOfNetwork string
const (
	NetworkTypeServiceZone TypeOfNetwork = "sv"
)

type V1

type V1 struct {
	Netbackup   netbackup.Netbackup
	PublicIP    PublicIP
	EdgeGateway EdgeGateway
	T0          Tier0
	VCDA        VCDA
	BMS         BMS
}

func (*V1) AdminOrg added in v0.12.7

func (v *V1) AdminOrg() (*AdminOrg, error)

func (*V1) AdminVDC added in v0.12.7

func (v *V1) AdminVDC() *CAVAdminVDC

func (*V1) Org added in v0.12.7

func (v *V1) Org() (*Org, error)

func (*V1) Querier added in v0.7.0

func (v *V1) Querier() *Query

func (*V1) S3 added in v0.3.0

func (v *V1) S3() S3Client

func (*V1) VDC

func (v *V1) VDC() *CAVVdc

func (*V1) Vmware added in v0.8.0

func (v *V1) Vmware() (*govcd.VCDClient, error)

type VAPP added in v0.12.6

type VAPP struct {
	*govcd.VApp
}

func (VAPP) GetDeploymentLeaseInSeconds added in v0.12.6

func (v VAPP) GetDeploymentLeaseInSeconds() int

GetDeploymentLeaseInSeconds retrieves the lease duration in seconds for a deployment.

func (VAPP) GetDescription added in v0.12.6

func (v VAPP) GetDescription() string

GetDescription give you the status code of the vApp.

func (VAPP) GetHREF added in v0.12.6

func (v VAPP) GetHREF() string

GetHREF give you the HREF of the vApp.

func (VAPP) GetID added in v0.12.6

func (v VAPP) GetID() string

GetID give you the ID of the vApp.

func (VAPP) GetName added in v0.12.6

func (v VAPP) GetName() string

GetName give you the name of the vApp.

func (VAPP) GetStatusCode added in v0.12.6

func (v VAPP) GetStatusCode() int

GetStatusCode give you the status code of the vApp.

func (VAPP) GetStorageLeaseInSeconds added in v0.12.6

func (v VAPP) GetStorageLeaseInSeconds() int

GetStorageLeaseInSeconds retrieves the lease duration in seconds for a storage resource.

func (VAPP) IsVAPPNetwork added in v0.12.6

func (v VAPP) IsVAPPNetwork(networkName string) (bool, error)

IsVAPPNetwork check if it is a vApp network (not vApp Org Network).

func (VAPP) IsVAPPOrgNetwork added in v0.12.6

func (v VAPP) IsVAPPOrgNetwork(networkName string) (bool, error)

IsVAPPOrgNetwork check if it is a vApp Org Network (not vApp network).

type VCDA

type VCDA struct{}

func (*VCDA) List

func (v *VCDA) List() (VDCAIps, error)

List of on premise IP addresses allowed for this organization's draas offer

func (*VCDA) RegisterIP added in v0.5.0

func (v *VCDA) RegisterIP(ip string) error

RegisterIP - Registers a new IP to the list

type VDC

type VDC struct {
	*govcd.Vdc
	// contains filtered or unexported fields
}

func (*VDC) AddStorageProfile added in v0.6.0

func (v *VDC) AddStorageProfile(storageProfile infrapi.StorageProfile)

AddStorageProfile add a storage profile to the VDC.

func (VDC) CreateVAPP added in v0.12.6

func (v VDC) CreateVAPP(name, description string) (*VAPP, error)

CreateVAPP create new vApp.

func (*VDC) Delete added in v0.6.0

func (v *VDC) Delete(ctx context.Context) (err error)

Delete deletes the VDC.

func (*VDC) GetBillingModel added in v0.6.0

func (v *VDC) GetBillingModel() infrapi.BillingModel

GetBillingModel returns the billing model of the VDC.

func (*VDC) GetCPUAllocated added in v0.6.0

func (v *VDC) GetCPUAllocated() int

GetCPUAllocated returns the CPU allocated of the VDC.

func (VDC) GetDefaultPlacementPolicyID added in v0.12.6

func (v VDC) GetDefaultPlacementPolicyID() string

GetDefaultPlacementPolicyID give you the ID of the default placement policy.

func (*VDC) GetDescription added in v0.6.0

func (v *VDC) GetDescription() string

GetDescription returns the description of the VDC.

func (*VDC) GetDisponibilityClass added in v0.6.0

func (v *VDC) GetDisponibilityClass() infrapi.DisponibilityClass

GetDisponibilityClass returns the disponibility class of the VDC.

func (*VDC) GetID

func (v *VDC) GetID() string

GetID returns the ID of the VDC.

func (VDC) GetIPSetByID added in v0.12.6

func (v VDC) GetIPSetByID(id string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByID return the NSX-T firewall group using the ID provided in the argument.

func (VDC) GetIPSetByName added in v0.12.6

func (v VDC) GetIPSetByName(name string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByName return the NSX-T firewall group using the name provided in the argument.

func (VDC) GetIPSetByNameOrID added in v0.12.6

func (v VDC) GetIPSetByNameOrID(nameOrID string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByNameOrId return the NSX-T firewall group using the name or ID provided in the argument.

func (*VDC) GetMemoryAllocated added in v0.6.0

func (v *VDC) GetMemoryAllocated() int

GetMemoryAllocated returns the memory allocated of the VDC.

func (*VDC) GetName

func (v *VDC) GetName() string

GetName returns the name of the VDC.

func (VDC) GetSecurityGroupByID added in v0.12.6

func (v VDC) GetSecurityGroupByID(nsxtFirewallGroupID string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByID return the NSX-T security group using the ID provided in the argument.

func (VDC) GetSecurityGroupByName added in v0.12.6

func (v VDC) GetSecurityGroupByName(nsxtFirewallGroupName string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByName return the NSX-T security group using the name provided in the argument.

func (VDC) GetSecurityGroupByNameOrID added in v0.12.6

func (v VDC) GetSecurityGroupByNameOrID(nsxtFirewallGroupNameOrID string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByNameOrID return the NSX-T security group using the name or ID provided in the argument.

func (*VDC) GetServiceClass added in v0.6.0

func (v *VDC) GetServiceClass() infrapi.ServiceClass

GetServiceClass returns the service class of the VDC.

func (*VDC) GetStorageBillingModel added in v0.6.0

func (v *VDC) GetStorageBillingModel() infrapi.BillingModel

GetStorageBillingModel returns the storage billing model of the VDC.

func (*VDC) GetStorageProfiles added in v0.6.0

func (v *VDC) GetStorageProfiles() []infrapi.StorageProfile

GetStorageProfiles returns the storage profiles of the VDC.

func (VDC) GetVAPP added in v0.12.6

func (v VDC) GetVAPP(nameOrID string, refresh bool) (*VAPP, error)

GetVAPP give you the vApp using the name provided in the argument.

func (*VDC) GetVCPUInMhz added in v0.6.0

func (v *VDC) GetVCPUInMhz() int

GetVCPUInMhz returns the VCPU in MHz of the VDC.

func (VDC) IsVDCGroup added in v0.12.6

func (v VDC) IsVDCGroup() bool

IsVDCGroup return true if the object is a VDC Group.

func (*VDC) IsValid added in v0.6.0

func (v *VDC) IsValid(isUpdate bool) error

IsValid returns true if the VDC is valid.

func (*VDC) RemoveStorageProfile added in v0.6.0

func (v *VDC) RemoveStorageProfile(storageProfileName infrapi.StorageProfile)

RemoveStorageProfile remove a storage profile from the VDC.

func (*VDC) Set added in v0.6.0

func (v *VDC) Set(vdc *infrapi.CAVVirtualDataCenter)

Set set the VDC.

func (*VDC) SetCPUAllocated added in v0.6.0

func (v *VDC) SetCPUAllocated(cpuAllocated int)

SetCPUAllocated set the CPU allocated of the VDC.

func (*VDC) SetDescription added in v0.6.0

func (v *VDC) SetDescription(description string)

SetDescription set the description of the VDC.

func (VDC) SetIPSet added in v0.12.6

func (v VDC) SetIPSet(ipSetConfig *govcdtypes.NsxtFirewallGroup) (*govcd.NsxtFirewallGroup, error)

SetIPSet set the NSX-T firewall group using the name provided in the argument.

func (*VDC) SetMemoryAllocated added in v0.6.0

func (v *VDC) SetMemoryAllocated(memoryAllocated int)

SetMemoryAllocated set the memory allocated of the VDC.

func (*VDC) SetName added in v0.6.0

func (v *VDC) SetName(name string) error

SetName set the name of the VDC. Name respects the following regex: ^[a-zA-Z0-9-_]{1,64}$

func (*VDC) SetStorageProfiles added in v0.6.0

func (v *VDC) SetStorageProfiles(storageProfiles []infrapi.StorageProfile)

SetStorageProfiles set the storage profiles of the VDC.

func (*VDC) SetVCPUInMhz added in v0.6.0

func (v *VDC) SetVCPUInMhz(vcpuInMhz int)

SetVCPUInMhz set the VCPU in MHz of the VDC.

func (*VDC) Update added in v0.6.0

func (v *VDC) Update(ctx context.Context) (err error)

Update updates the VDC.

func (*VDC) Vmware added in v0.6.0

func (v *VDC) Vmware() *govcd.Vdc

type VDCAIP

type VDCAIP string

type VDCAIps

type VDCAIps []string

func (*VDCAIps) DeleteAllIPs

func (v *VDCAIps) DeleteAllIPs() error

DeleteAllIPs - Deletes all IPs from the list

func (*VDCAIps) DeleteIP

func (v *VDCAIps) DeleteIP(ip string) error

DeleteIP - Deletes an IP from the list

func (*VDCAIps) IsIPExists

func (v *VDCAIps) IsIPExists(ip string) bool

IsIPExists - Returns true if the IP exists

type VDCGroup added in v0.6.0

type VDCGroup struct {
	*govcd.VdcGroup
}

func (VDCGroup) GetDescription added in v0.6.0

func (g VDCGroup) GetDescription() string

GetDescription returns the description of the VDC Group.

func (VDCGroup) GetID added in v0.6.0

func (g VDCGroup) GetID() string

GetID returns the ID of the VDC Group.

func (VDCGroup) GetIPSetByID added in v0.12.6

func (g VDCGroup) GetIPSetByID(id string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByID return the NSX-T firewall group using the ID provided in the argument.

func (VDCGroup) GetIPSetByName added in v0.12.6

func (g VDCGroup) GetIPSetByName(name string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByName return the NSX-T firewall group using the name provided in the argument.

func (VDCGroup) GetIPSetByNameOrID added in v0.12.6

func (g VDCGroup) GetIPSetByNameOrID(nameOrID string) (*govcd.NsxtFirewallGroup, error)

GetIPSetByNameOrID return the NSX-T firewall group using the name or ID provided in the argument.

func (VDCGroup) GetName added in v0.6.0

func (g VDCGroup) GetName() string

GetName returns the name of the VDC Group.

func (VDCGroup) GetSecurityGroupByID added in v0.12.6

func (g VDCGroup) GetSecurityGroupByID(nsxtFirewallGroupID string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByID return the NSX-T security group using the ID provided in the argument.

func (VDCGroup) GetSecurityGroupByName added in v0.12.6

func (g VDCGroup) GetSecurityGroupByName(nsxtFirewallGroupName string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByName return the NSX-T security group using the name provided in the argument.

func (VDCGroup) GetSecurityGroupByNameOrID added in v0.12.6

func (g VDCGroup) GetSecurityGroupByNameOrID(nsxtFirewallGroupNameOrID string) (*govcd.NsxtFirewallGroup, error)

GetSecurityGroupByNameOrID return the NSX-T security group using the name or ID provided in the argument.

func (VDCGroup) IsVDCGroup added in v0.12.6

func (g VDCGroup) IsVDCGroup() bool

IsVDCGroup return true if the object is a VDC Group.

func (VDCGroup) SetIPSet added in v0.12.6

func (g VDCGroup) SetIPSet(ipSetConfig *govcdtypes.NsxtFirewallGroup) (*govcd.NsxtFirewallGroup, error)

SetIPSet set the NSX-T firewall group using the name provided in the argument.

type VDCOrVDCGroupInterface added in v0.12.6

type VDCOrVDCGroupInterface interface {
	// * Global Get
	// GetName returns the name of the VDC or VDC Group
	GetName() string
	// GetID returns the ID of the VDC or VDC Group
	GetID() string
	// GetDescription returns the description of the VDC or VDC Group
	GetDescription() string

	// * Global Is
	// IsVDCGroup returns true if the object is a VDC Group
	IsVDCGroup() bool

	// * Network
	GetOpenApiOrgVdcNetworkByName(string) (*govcd.OpenApiOrgVdcNetwork, error)

	// * Security Group
	GetSecurityGroupByID(nsxtFirewallGroupID string) (*govcd.NsxtFirewallGroup, error)
	GetSecurityGroupByName(nsxtFirewallGroupName string) (*govcd.NsxtFirewallGroup, error)
	GetSecurityGroupByNameOrID(nsxtFirewallGroupNameOrID string) (*govcd.NsxtFirewallGroup, error)

	// * IP Set
	GetIPSetByID(id string) (*govcd.NsxtFirewallGroup, error)
	GetIPSetByName(name string) (*govcd.NsxtFirewallGroup, error)
	GetIPSetByNameOrID(nameOrID string) (*govcd.NsxtFirewallGroup, error)
	SetIPSet(ipSetConfig *govcdtypes.NsxtFirewallGroup) (*govcd.NsxtFirewallGroup, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL