Documentation ¶
Index ¶
- Constants
- Variables
- func CreateFolder(client *vim25.Client, folderName string) error
- func CreateLibrary(libraryName string, rc *rest.Client, client *vim25.Client)
- func CreateResourcePool(client *vim25.Client, ResourcePool string) error
- func DeleteFolder(client *vim25.Client, folderName string) error
- func DeleteLibrary(libraryName *library.Library, rc *rest.Client)
- func DeleteResourcePool(client *vim25.Client, ResourcePool string) error
- func DeleteVM(client *vim25.Client, vmName string) error
- func DeployVmFromLibrary(rc *rest.Client, client *vim25.Client, lib *library.Library) (*object.VirtualMachine, error)
- func GetGovmomiClient() *vim25.Client
- func GetLibrary(libraryName string, rc *rest.Client) *library.Library
- func GetLibraryItem(rc *rest.Client) ([]string, error)
- func GetOvaFileNameFromTanzuFramework() []string
- func GetRestClient(client *vim25.Client) *rest.Client
- func GetTanzuBomConfigPath() (string, error)
- func GetTanzuConfigPath() (string, error)
- func ImportOVAFromLibrary(rc *rest.Client, client *vim25.Client, item *library.Library, file string) error
- func ListVms(client *vim25.Client) []string
- func ListVmsTemplates(client *vim25.Client) []string
- func MarkAsTemplate(client *vim25.Client, vmName string) error
- func RetrieveAndDownload(version, dir, fileName string)
- func RetriveVersion(version string) []string
- type Cc
- type Files
- type Provider
- func (provider *Provider) CleanupCluster(ctx context.Context, clusterName string) error
- func (provider *Provider) GetTanzuConfig(clusterName string) tanzu.TanzuConfig
- func (provider *Provider) Init() error
- func (provider *Provider) Name() string
- func (provider *Provider) PreClusterCreationTasks(clusterName string, clusterType utils.ClusterType) error
- func (provider *Provider) RequiredEnvVars() []string
- type TestSecrets
- type Tkr
Constants ¶
View Source
const Datacenter = "VSPHERE_DATACENTER"
View Source
const Datastore = "VSPHERE_DATASTORE"
View Source
const ManagementApiServerEndpoint = "VSPHERE_MANAGEMENT_CLUSTER_ENDPOINT"
View Source
const Network = "VSPHERE_NETWORK"
View Source
const Password = "VSPHERE_PASSWORD"
View Source
const ResourcePool = "VSPHERE_RESOURCE_POOL"
View Source
const SshKeys = "VSPHERE_SSH_AUTHORIZED_KEY"
View Source
const Url = "VSPHERE_SERVER"
View Source
const Username = "VSPHERE_USERNAME"
View Source
const VmFolder = "VSPHERE_FOLDER"
View Source
const WorkloadApiServerEndpoint = "VSPHERE_WORKLOAD_CLUSTER_ENDPOINT"
Variables ¶
View Source
var PROVIDER utils.Provider = &Provider{}
TODO: Change name?
Functions ¶
func CreateFolder ¶
Can be used for dynamic folder creation To be tested
func CreateResourcePool ¶
Can be used for dynamic resource pool creation To be tested
func DeleteFolder ¶
Can be used for dynamic folder Deletion To be tested
func DeleteLibrary ¶
To Delete Libary after create OVF templates
func DeleteResourcePool ¶
Can be used for dynamic resource pool deletion To be tested
func DeployVmFromLibrary ¶
func GetLibrary ¶
To Get Library as Library Struct
func GetOvaFileNameFromTanzuFramework ¶
func GetOvaFileNameFromTanzuFramework() []string
func GetRestClient ¶
Rest Client this is being used by library module
func GetTanzuBomConfigPath ¶
Todo: to be moved to common utils file
func GetTanzuConfigPath ¶
Todo: to be moved to common utils file
func ImportOVAFromLibrary ¶
func ImportOVAFromLibrary(rc *rest.Client, client *vim25.Client, item *library.Library, file string) error
To Upload OVA to Library
func ListVmsTemplates ¶
func RetrieveAndDownload ¶
func RetrieveAndDownload(version, dir, fileName string)
Rename to RetrieveAndDownload
func RetriveVersion ¶
Types ¶
type Files ¶
type Files struct { // TODO: Extract out this struct into a type for brevity and clarity DownloadFiles []struct { FileName string `json:"fileName"` Sha1Checksum string `json:"sha1checksum"` Sha256Checksum string `json:"sha256checksum"` Md5Checksum string `json:"md5checksum"` Build string `json:"build"` ReleaseDate string `json:"releaseDate"` FileType string `json:"fileType"` Description string `json:"description"` FileSize string `json:"fileSize"` Title string `json:"title"` Version string `json:"version"` Status string `json:"status"` Uuid string `json:"uuid"` Header bool `json:"header"` DisplayOrder int `json:"displayOrder"` Relink bool `json:"relink"` Rsync bool `json:"rsync"` } `json:"downloadFiles"` }
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
TODO: Change name?
func (*Provider) CleanupCluster ¶
func (*Provider) GetTanzuConfig ¶
func (provider *Provider) GetTanzuConfig(clusterName string) tanzu.TanzuConfig
TODO: Maybe make use of https://github.com/spf13/viper to set env vars and make some values as default and parameterised.
func (*Provider) PreClusterCreationTasks ¶
func (provider *Provider) PreClusterCreationTasks(clusterName string, clusterType utils.ClusterType) error
func (*Provider) RequiredEnvVars ¶
type TestSecrets ¶
type TestSecrets struct { ManagementApiServerEndpoint string WorkloadApiServerEndpoint string SshKeys string Url string Username string Password string Datastore string Datacenter string VmFolder string Network string ResourcePool string }
func ExtractVsphereTestSecretsFromEnvVars ¶
func ExtractVsphereTestSecretsFromEnvVars() TestSecrets
type Tkr ¶
type Tkr struct { // TODO: Extract out this struct into a type for brevity and clarity Ova []struct { Name string `yaml:"name"` Osinfo struct { Name string `yaml:"name"` Version string `yaml:"version"` Arch string `yaml:"arch"` } `json:"osinfo"` Version string `yaml:"version"` } `yaml:"ova"` // TODO: Extract out this struct into a type for brevity and clarity Azure []struct { Sku string `yaml:"sku"` Publisher string `yaml:"publisher"` Offer string `yaml:"offer"` Version string `yaml:"version"` ThirdPartyImage bool `yaml:"thirdPartyImage"` // TODO: Extract out this struct into a type for brevity and clarity Osinfo struct { Name string `yaml:"name"` Version string `yaml:"version"` Arch string `yaml:"arch"` } `yaml:"osinfo"` } `yaml:"azure"` }
Click to show internal directories.
Click to hide internal directories.