Documentation ¶
Index ¶
- Constants
- Variables
- func DecrIP(ctx context.Context, a string, delta int) (string, error)
- func DecryptToken(ctx context.Context, encTokenB64 string, cloudletKey *edgeproto.CloudletKey) (string, error)
- func EncryptToken(ctx context.Context, token string, cloudletKey *edgeproto.CloudletKey) (string, error)
- func GetNextAvailConIdx(ctx context.Context, ncs *types.NetworkConnectionSection) (int, error)
- func IncrIP(ctx context.Context, a string, delta int) (string, error)
- func MaskToCidr(addr string) (string, error)
- func NewPlatform() platform.Platform
- func Octet(ctx context.Context, a string, n int) (int, error)
- func ReplaceLastOctet(ctx context.Context, addr string, o uint32) (string, error)
- func TakeBoolPointer(value bool) *bool
- func TakeFloatAddress(x float64) *float64
- func TakeIntAddress(x int) *int
- func TakeIntPointer(x int) *int
- func TakeStringPointer(x string) *string
- func TakeUint64Pointer(x uint64) *uint64
- type GovcdMetric
- type GovcdMetricList
- type GovcdMetricsResponse
- type NetMap
- type NetworkMetadataType
- type OvfParams
- type Refresh
- type TokenResponse
- type VAppMap
- type VMMap
- type VappNetIpAllocationType
- type VcdConfigParams
- type VcdPlatform
- func (v *VcdPlatform) ActiveChanged(ctx context.Context, platformActive bool) error
- func (v *VcdPlatform) AddCommonSharedNetToVapp(ctx context.Context, vapp *govcd.VApp, vcdClient *govcd.VCDClient, ...) error
- func (v *VcdPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, ...) error
- func (v *VcdPlatform) AddMetadataToVM(ctx context.Context, vm *govcd.VM, vmparams *vmlayer.VMOrchestrationParams) error
- func (v *VcdPlatform) AddPortsToVapp(ctx context.Context, vapp *govcd.VApp, ...) error
- func (v *VcdPlatform) AddVMsToExistingVApp(ctx context.Context, vapp *govcd.VApp, ...) (VMMap, error)
- func (v *VcdPlatform) AddVMsToVApp(ctx context.Context, vapp *govcd.VApp, ...) (VMMap, error)
- func (v *VcdPlatform) AddVappNetwork(ctx context.Context, vapp *govcd.VApp, vcdClient *govcd.VCDClient, ...) (*types.NetworkConfigSection, error)
- func (v *VcdPlatform) AddVmHrefToCache(ctx context.Context, vmName, href string)
- func (v *VcdPlatform) AttachPortToServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, ...) error
- func (v *VcdPlatform) BlockWhileStatusWithTickTime(ctx context.Context, vapp *govcd.VApp, unwantedStatus string, ...) error
- func (v *VcdPlatform) CheckServerReady(ctx context.Context, client ssh.Client, serverName string) error
- func (v *VcdPlatform) ClearVmHrefCache(ctx context.Context)
- func (v *VcdPlatform) ConfigureCloudletSecurityRules(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, ...) error
- func (v *VcdPlatform) ConfigureTrustPolicyExceptionSecurityRules(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, ...) error
- func (v *VcdPlatform) CreateImageFromUrl(ctx context.Context, imageName, imageUrl, md5Sum string) (string, error)
- func (v *VcdPlatform) CreateInternalNetworkForNewVm(ctx context.Context, vapp *govcd.VApp, serverName, netName string, cidr string, ...) (string, error)
- func (v *VcdPlatform) CreateVApp(ctx context.Context, vappTmpl *govcd.VAppTemplate, ...) (*govcd.VApp, error)
- func (v *VcdPlatform) CreateVMs(ctx context.Context, vmgp *vmlayer.VMGroupOrchestrationParams, ...) error
- func (v *VcdPlatform) DeleteImage(ctx context.Context, folder, image string) error
- func (v *VcdPlatform) DeleteMetadataForInternalSubnet(ctx context.Context, subnetName string, vcdClient *govcd.VCDClient, ...) error
- func (v *VcdPlatform) DeleteTemplate(ctx context.Context, name string, vcdClient *govcd.VCDClient) error
- func (v *VcdPlatform) DeleteVM(ctx context.Context, vm *govcd.VM) error
- func (v *VcdPlatform) DeleteVMs(ctx context.Context, vmGroupName, ownerID string) error
- func (v *VcdPlatform) DeleteVapp(ctx context.Context, vapp *govcd.VApp, vcdClient *govcd.VCDClient) error
- func (v *VcdPlatform) DeleteVmHrefFromCache(ctx context.Context, vmName string)
- func (v *VcdPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, ...) error
- func (v *VcdPlatform) DisableOrgRuntimeLease(ctx context.Context, override bool) error
- func (v *VcdPlatform) DumpVapps(ctx context.Context, matchPattern string) (string, error)
- func (v *VcdPlatform) DumpVmHrefCache(ctx context.Context) string
- func (v *VcdPlatform) FindTemplate(ctx context.Context, tmplName string, vcdClient *govcd.VCDClient) (*govcd.VAppTemplate, error)
- func (v *VcdPlatform) FindVApp(ctx context.Context, vappName string, vcdClient *govcd.VCDClient, ...) (*govcd.VApp, error)
- func (v *VcdPlatform) FindVMByHrefCache(ctx context.Context, vmName string, vcdClient *govcd.VCDClient) *govcd.VM
- func (v *VcdPlatform) FindVMByName(ctx context.Context, serverName string, vcdClient *govcd.VCDClient, ...) (*govcd.VM, error)
- func (v *VcdPlatform) FindVMInVApp(ctx context.Context, serverName string, vapp govcd.VApp) (*govcd.VM, error)
- func (v *VcdPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error
- func (v *VcdPlatform) GetAddrOfVM(ctx context.Context, vm *govcd.VM, netName string) (string, error)
- func (v *VcdPlatform) GetAddrOfVapp(ctx context.Context, vapp *govcd.VApp, netName string) (string, error)
- func (v *VcdPlatform) GetAllVMsInVApp(ctx context.Context, vapp *govcd.VApp) (VMMap, error)
- func (v *VcdPlatform) GetApiEndpointAddr(ctx context.Context) (string, error)
- func (v *VcdPlatform) GetCatalog(ctx context.Context, catName string, vcdClient *govcd.VCDClient) (*govcd.Catalog, error)
- func (v *VcdPlatform) GetCatalogName() string
- func (v *VcdPlatform) GetCleanupOrphanedNetworks() bool
- func (v *VcdPlatform) GetClient(ctx context.Context, creds *VcdConfigParams) (client *govcd.VCDClient, err error)
- func (v *VcdPlatform) GetCloudletImageSuffix(ctx context.Context) string
- func (v *VcdPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)
- func (v *VcdPlatform) GetCloudletManifest(ctx context.Context, name, cloudletImagePath string, ...) (string, error)
- func (v *VcdPlatform) GetCloudletTrustPolicy(ctx context.Context) (*edgeproto.TrustPolicy, error)
- func (v *VcdPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, ...) error
- func (v *VcdPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, ...) map[string]edgeproto.InfraResource
- func (v *VcdPlatform) GetConsoleUrl(ctx context.Context, serverName string) (string, error)
- func (v *VcdPlatform) GetEnableVcdDiskResize() bool
- func (v *VcdPlatform) GetExtAddrOfVM(ctx context.Context, vm *govcd.VM, netName string) (string, error)
- func (v *VcdPlatform) GetExtNetwork(ctx context.Context, vcdClient *govcd.VCDClient, netName string) (*govcd.OrgVDCNetwork, error)
- func (v *VcdPlatform) GetExternalGateway(ctx context.Context, extNetname string) (string, error)
- func (o *VcdPlatform) GetFeatures() *edgeproto.PlatformFeatures
- func (v *VcdPlatform) GetFlavor(ctx context.Context, flavorName string) (*edgeproto.FlavorInfo, error)
- func (v *VcdPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, error)
- func (v *VcdPlatform) GetFreeSharedCommonIpRange(ctx context.Context, subnetName, ownerID string, vcdClient *govcd.VCDClient, ...) (string, error)
- func (v *VcdPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage
- func (v *VcdPlatform) GetGatewayForOrgVDCNetwork(ctx context.Context, network *types.OrgVDCNetwork) (string, error)
- func (v *VcdPlatform) GetHrefCacheEnabled() bool
- func (v *VcdPlatform) GetIntAddrsOfVM(ctx context.Context, vm *govcd.VM) ([]string, error)
- func (v *VcdPlatform) GetInternalPortPolicy() vmlayer.InternalPortAttachPolicy
- func (v *VcdPlatform) GetLeaseOverride() bool
- func (v *VcdPlatform) GetNetworkDetail(ctx context.Context, networkName string) (*vmlayer.NetworkDetail, error)
- func (v *VcdPlatform) GetNetworkList(ctx context.Context) ([]string, error)
- func (v *VcdPlatform) GetNetworkMetadataForInternalSubnet(ctx context.Context, subnetName string, vcdClient *govcd.VCDClient, ...) (NetworkMetadataType, string, error)
- func (v *VcdPlatform) GetNsxType() string
- func (v *VcdPlatform) GetOrg(ctx context.Context, vcdClient *govcd.VCDClient) (*govcd.Org, error)
- func (v *VcdPlatform) GetPlatformResourceInfo(ctx context.Context) (*vmlayer.PlatformResources, error)
- func (v *VcdPlatform) GetResourceID(ctx context.Context, resourceType vmlayer.ResourceType, resourceName string) (string, error)
- func (v *VcdPlatform) GetRouterDetail(ctx context.Context, routerName string) (*vmlayer.RouterDetail, error)
- func (v *VcdPlatform) GetServerDetail(ctx context.Context, serverName string) (*vmlayer.ServerDetail, error)
- func (v *VcdPlatform) GetServerDetailWithVdc(ctx context.Context, serverName string, vdc *govcd.Vdc, ...) (*vmlayer.ServerDetail, error)
- func (v *VcdPlatform) GetServerGroupResources(ctx context.Context, name string) (*edgeproto.InfraResources, error)
- func (v *VcdPlatform) GetSubnetFromLegacyIsoMetadata(ctx context.Context, isonetName string, vcdClient *govcd.VCDClient, ...) (string, error)
- func (v *VcdPlatform) GetTemplateArtifactoryImportEnabled() bool
- func (v *VcdPlatform) GetVCDORG() string
- func (v *VcdPlatform) GetVCDPassword() string
- func (v *VcdPlatform) GetVCDURL() string
- func (v *VcdPlatform) GetVCDUser() string
- func (v *VcdPlatform) GetVDCName() string
- func (v *VcdPlatform) GetVMAddresses(ctx context.Context, vm *govcd.VM, vcdClient *govcd.VCDClient, vdc *govcd.Vdc) ([]vmlayer.ServerIP, map[string]*vmlayer.NetworkDetail, error)
- func (v *VcdPlatform) GetVMFromVAppByIdx(ctx context.Context, vapp *govcd.VApp, idx int) (*govcd.VM, error)
- func (v *VcdPlatform) GetVMStats(ctx context.Context, appInst *edgeproto.AppInst) (*vmlayer.VMMetrics, error)
- func (v *VcdPlatform) GetVappServerSuffix() string
- func (v *VcdPlatform) GetVcdClientFromContext(ctx context.Context) *govcd.VCDClient
- func (v *VcdPlatform) GetVcdClientRefreshInterval(ctx context.Context) uint64
- func (v *VcdPlatform) GetVcdClientTlsCert() string
- func (v *VcdPlatform) GetVcdClientTlsKey() string
- func (v *VcdPlatform) GetVcdInsecure() bool
- func (v *VcdPlatform) GetVcdOauthAgwUrl() string
- func (v *VcdPlatform) GetVcdOauthClientId() string
- func (v *VcdPlatform) GetVcdOauthClientSecret() string
- func (v *VcdPlatform) GetVcdOauthSgwUrl() string
- func (v *VcdPlatform) GetVcdOrgName() string
- func (v *VcdPlatform) GetVcdPassword() string
- func (v *VcdPlatform) GetVcdUrl() string
- func (v *VcdPlatform) GetVcdUser() string
- func (v *VcdPlatform) GetVcdVars(ctx context.Context, accessApi platform.AccessApi) error
- func (v *VcdPlatform) GetVcdVdcName() string
- func (v *VcdPlatform) GetVcdVerbose() bool
- func (v *VcdPlatform) GetVcpuSpeedOverride(ctx context.Context) int64
- func (v *VcdPlatform) GetVdc(ctx context.Context, vcdClient *govcd.VCDClient) (*govcd.Vdc, error)
- func (v *VcdPlatform) GetVdcFromContext(ctx context.Context, vcdClient *govcd.VCDClient) (*govcd.Vdc, error)
- func (v *VcdPlatform) GetVmAppInternalDhcpServer() bool
- func (v *VcdPlatform) GetVmAppStatsVdcMaxCacheTime() (uint64, error)
- func (v *VcdPlatform) GetVmHrefFromCache(ctx context.Context, vmName string) string
- func (v *VcdPlatform) GetVmStatus(ctx context.Context, vm *govcd.VM, refresh Refresh) (string, error)
- func (v *VcdPlatform) IdSanitize(name string) string
- func (v *VcdPlatform) ImportImage(ctx context.Context, folder, imageFile string) error
- func (v *VcdPlatform) ImportTemplateFromUrl(ctx context.Context, name, templUrl string, catalog *govcd.Catalog) error
- func (v *VcdPlatform) IncrCidr(a string, delta int) (string, error)
- func (v *VcdPlatform) InitApiAccessProperties(ctx context.Context, accessApi platform.AccessApi, vars map[string]string) error
- func (v *VcdPlatform) InitData(ctx context.Context, caches *platform.Caches)
- func (v *VcdPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error)
- func (v *VcdPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, ...) error
- func (v *VcdPlatform) InsertConnectionIntoNcs(ctx context.Context, ncs *types.NetworkConnectionSection, ...) *types.NetworkConnectionSection
- func (v *VcdPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, ...)
- func (v *VcdPlatform) IsDhcpEnabled(ctx context.Context, net *govcd.OrgVDCNetwork) bool
- func (v *VcdPlatform) LogVappVMsStatus(ctx context.Context, vapp *govcd.VApp)
- func (v *VcdPlatform) NameSanitize(name string) string
- func (v *VcdPlatform) PopulateCredsForSimulator(ctx context.Context, region, orgName, physName, vaultAddr string) error
- func (v *VcdPlatform) PopulateOrgLoginCredsFromEnv(ctx context.Context) error
- func (v *VcdPlatform) PopulateOrgLoginCredsFromVcdVars(ctx context.Context) error
- func (v *VcdPlatform) PrepareRootLB(ctx context.Context, client ssh.Client, rootLBName string, secGrpName string, ...) error
- func (v *VcdPlatform) RefreshOauthTokenPeriodic(ctx context.Context, creds *VcdConfigParams)
- func (v *VcdPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
- func (v *VcdPlatform) RetrieveTemplate(ctx context.Context, tmplName string, vcdClient *govcd.VCDClient) (*govcd.VAppTemplate, error)
- func (v *VcdPlatform) SetPowerState(ctx context.Context, serverName, serverAction string) error
- func (v *VcdPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties)
- func (v *VcdPlatform) TimedVcdCliCommand(ctx context.Context, name string, a ...string) ([]byte, error)
- func (v *VcdPlatform) UpdateOauthToken(ctx context.Context, creds *VcdConfigParams) error
- func (v *VcdPlatform) UpdateVMs(ctx context.Context, vmgp *vmlayer.VMGroupOrchestrationParams, ...) error
- func (v *VcdPlatform) UploadOvaFile(ctx context.Context, fileName, itemName, descr string, ...) error
- func (v *VcdPlatform) ValidateAdditionalNetworks(ctx context.Context, additionalNets map[string]vmlayer.NetworkType) error
- func (v *VcdPlatform) VerifyVMs(ctx context.Context, vms []edgeproto.VM) error
- func (v *VcdPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, ...)
- func (v *VcdPlatform) WaitForOauthTokenViaNotify(ctx context.Context, ckey *edgeproto.CloudletKey) error
- func (v *VcdPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
- type VcdResources
Constants ¶
const ( VCD_USER = "VCD_USER" VCD_PASSWORD = "VCD_PASSWORD" VCD_ORG = "VCD_ORG" VCD_URL = "VCD_URL" VDC_NAME = "VDC_NAME" VCD_OAUTH_SGW_URL = "VCD_OAUTH_SGW_URL" VCD_OAUTH_AGW_URL = "VCD_OAUTH_AGW_URL" VCD_OAUTH_CLIENT_ID = "VCD_OAUTH_CLIENT_ID" VCD_OAUTH_CLIENT_SECRET = "VCD_OAUTH_CLIENT_SECRET" VCD_CLIENT_TLS_CERT = "VCD_CLIENT_TLS_CERT" VCD_CLIENT_TLS_KEY = "VCD_CLIENT_TLS_KEY" VCD_CLIENT_REFRESH_INTERVAL = "VCD_CLIENT_REFRESH_INTERVAL" VCD_INSECURE = "VCD_INSECURE" )
const ClientId = "client_id"
const ClientSecret = "client_secret"
const ContentFormUrlEncoded = "application/x-www-form-urlencoded"
const CurrentVmMetrics string = "application/vnd.vmware.vcloud.metrics.currentUsageSpec+xml"
const GrantType = "grant_type"
const GrantTypeCert = "CERT"
const InternalNetMax = 100
const InternalVappDedicatedSubnet = "10.101.1.1"
const NSXT = "NSX-T"
const NSXV = "NSX-V"
const Scope = "scope"
const ScopeOpenId = "openid"
const TemplateNotFoundError string = "entity not found"
const UsedCommonIpRangeTag = "UsedCommonIpRange"
UsedCommonIpRangeTag is a range within the common shared LB IP network
const UsedLegacyPerClusterIsoNetTag = "UsedLegacyPerClusterIsoNet"
UsedLegacyPerClusterIsoNetTag is a per-cluster isolated network which was used prior to 3.1
const VappNetIpAllocationDhcp = "dhcp"
const VappNetIpAllocationStatic = "static"
const VappResourceXmlType = "application/vnd.vmware.vcloud.vApp+xml"
Variables ¶
var AccessVarProps = map[string]*edgeproto.PropertyInfo{ VCD_USER: { Name: "VCD user name", Mandatory: true, }, VCD_PASSWORD: { Name: "VCD user password", Mandatory: true, }, VCD_ORG: { Name: "VCD organization name", Mandatory: true, }, VCD_URL: { Name: "VCD API URL", Mandatory: true, }, VDC_NAME: { Name: "VDC name", Mandatory: true, }, VCD_OAUTH_SGW_URL: { Name: "VCD oauth session gateway URL", Description: "VCD oauth session gateway URL. Also requires setting VCD_OAUTH_AGW_URL, VCD_OAUTH_CLIENT_ID, and VCD_OAUTH_CLIENT_SECRET.", }, VCD_OAUTH_AGW_URL: { Name: "VCD oauth API gateway URL", }, VCD_OAUTH_CLIENT_ID: { Name: "VCD oauth client id", Description: "Oauth client id if using client credentials flow", }, VCD_OAUTH_CLIENT_SECRET: { Name: "VCD oauth client secret", Description: "Oauth client secret if using client credentials flow", }, VCD_CLIENT_TLS_CERT: { Name: "VCD client public TLS certificate data", Description: "Public TLS certificate to use to authenticate with VCD", }, VCD_CLIENT_TLS_KEY: { Name: "VCD client private TLS certificate data", Description: "Private TLS certificate to use to authenticate with VCD", }, VCD_CLIENT_REFRESH_INTERVAL: { Name: "VCD client token refresh interval", }, VCD_INSECURE: { Name: "VCD insecure mode", Description: "Defaults to true, set to \"false\" and configure TLS certificates if needed to authenticate API server certificate", }, }
var DefaultClientRefreshInterval uint64 = 7 * 60 * 60 // 7 hours
var NoVCDClientInContext = "No VCD Client in Context"
var OvfTemplate = `` /* 5779-byte string literal not displayed */
var ResolvedStateMaxWait = 4 * 60 // 4 mins
var ResolvedStateTickTime time.Duration = time.Second * 3
var VCDClientCtxKey = "VCDClientCtxKey"
var VCDOrgCtxKey = "VCDOrgCtxKey"
var VCDVdcCtxKey = "VCDVdcCtxKey"
var VcdProps = map[string]*edgeproto.PropertyInfo{ "MEX_CATALOG": { Mandatory: true, Description: "VCD Org Catalog Name", }, "MEX_EXTERNAL_NETWORK_EDGEGATEWAY": { Description: "currently unused", }, "MEX_ENABLE_VCD_DISK_RESIZE": { Description: "VM disks cloned from the VDC template will be resized based on flavor if set to \"true\" or \"yes\". Set to \"false\" if fast provisioning is enabled in the VDC or VM creation will fail.", Value: "true", }, "VCDVerbose": { Description: "Verbose logging for VCD", Internal: true, }, "VCD_OVERRIDE_LEASE_DISABLE": { Description: "Accept Org runtime lease values for VCD if unable to disable", Internal: true, }, "VCD_OVERRIDE_VCPU_SPEED": { Description: "Set value for vCPU Speed if unable to read from admin VCD", Internal: true, }, "VCD_NSX_TYPE": { Description: "NSX-T or NSX-V", Mandatory: true, }, "VCD_CLEANUP_ORPHAN_NETS": { Description: "Indicates Isolated Org VDC networks with no VApps to be deleted on startup", Value: "false", Internal: true, }, "VCD_VM_APP_STATS_MAX_VDC_CACHE_TIME": { Description: "How long to cache VDC objects for VM App stat collection, in seconds", Internal: true, Value: "3600", }, "VCD_VM_APP_INTERNAL_DHCP_SERVER": { Description: "If \"true\" or \"yes\" sets up an internal DHCP server for VM Apps, otherwise uses VCD server", Value: "true", Internal: true, }, "VCD_TEMPLATE_ARTIFACTORY_IMPORT_ENABLED": { Description: "If \"true\" or \"yes\" VCD templates are stored in Artifactory and imported to VCD. Otherwise, templates must already exist in the catalog", Value: "true", }, "VCD_VM_HREF_CACHE_ENABLED": { Description: "If \"true\" or \"yes\" caching of VCD VM HREFs is enabled", Value: "true", Internal: true, }, }
This is now an edgeproto object
var VmHardwareVersion = 14
VmHardwareVersion of 14 means vsphere 6.7
Functions ¶
func DecryptToken ¶
func EncryptToken ¶
func EncryptToken(ctx context.Context, token string, cloudletKey *edgeproto.CloudletKey) (string, error)
EncryptToken encrypts a token via AES using the cloudlet name. Because we store the token in the cloudlet via notify, it is visible in a lot of logs. Perform simple encryption of the token using the cloudlet key to at least provide some level of protection if the logs are seen.
func GetNextAvailConIdx ¶
func MaskToCidr ¶
func NewPlatform ¶
func ReplaceLastOctet ¶
func TakeFloatAddress ¶
takeFloatAddress is a helper that returns the address of an `float64`
func TakeIntAddress ¶
takeIntAddress is a helper that returns the address of an `int`
func TakeIntPointer ¶
func TakeStringPointer ¶
takeStringPointer is a helper that returns the address of a `string`
func TakeUint64Pointer ¶
Types ¶
type GovcdMetric ¶
type GovcdMetricList ¶
type GovcdMetricList []*GovcdMetric
type GovcdMetricsResponse ¶
type GovcdMetricsResponse struct { Link types.LinkList `xml:"Link,omitempty"` Metric GovcdMetricList `xml:"Metric,omitempty"` }
type NetMap ¶
type NetMap map[string]*govcd.OrgVDCNetwork
type NetworkMetadataType ¶
type NetworkMetadataType string
const NetworkMetadataCommonIsoNet NetworkMetadataType = "common ISO network metadata"
const NetworkMetadataLegacyPerClusterIsoNet NetworkMetadataType = "per cluster legacy ISO network metadata"
const NetworkMetadataNone NetworkMetadataType = "no network metadata "
type TokenResponse ¶
type VappNetIpAllocationType ¶
type VappNetIpAllocationType string
type VcdConfigParams ¶
type VcdPlatform ¶
type VcdPlatform struct { Creds *VcdConfigParams TestMode bool Verbose bool VmNameToHref map[string]string // contains filtered or unexported fields }
func (*VcdPlatform) ActiveChanged ¶
func (v *VcdPlatform) ActiveChanged(ctx context.Context, platformActive bool) error
func (*VcdPlatform) AddCommonSharedNetToVapp ¶
func (*VcdPlatform) AddImageIfNotPresent ¶
func (v *VcdPlatform) AddImageIfNotPresent(ctx context.Context, imageInfo *infracommon.ImageInfo, updateCallback edgeproto.CacheUpdateCallback) error
AddImageIfNotPresent works as follows: 1) if the template is already in the VCD catalog, quit as there is nothing to do 2) if the VMDK is not in Artifactory, the qcow2 is downloaded and VMDK generated and uploaded back to Artifactory 3) regardless as to whether the VMDK had to be generated, the OVF is always regenerated in case something changed for VM images. This is very fast 4) A token is generated and used to direct the VCD to import the OVF and corresponding VMDK from Artifactory
func (*VcdPlatform) AddMetadataToVM ¶
func (v *VcdPlatform) AddMetadataToVM(ctx context.Context, vm *govcd.VM, vmparams *vmlayer.VMOrchestrationParams) error
Store attrs of vm for crmrestarts and resource fetching
func (*VcdPlatform) AddPortsToVapp ¶
func (v *VcdPlatform) AddPortsToVapp(ctx context.Context, vapp *govcd.VApp, vmgp *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback, vcdClient *govcd.VCDClient, vdc *govcd.Vdc) error
AddPortsToVapp returns netinfo map
func (*VcdPlatform) AddVMsToExistingVApp ¶
func (*VcdPlatform) AddVMsToVApp ¶
func (v *VcdPlatform) AddVMsToVApp(ctx context.Context, vapp *govcd.VApp, vmgp *vmlayer.VMGroupOrchestrationParams, baseImgTmpl *govcd.VAppTemplate, netMap map[string]networkInfo, vdc *govcd.Vdc, vcdClient *govcd.VCDClient, updateCallback edgeproto.CacheUpdateCallback) (VMMap, error)
For each vm spec defined in vmgp, add a new VM to vapp with those applicable attributes. Returns a map of VMs which should be powered on and customized
func (*VcdPlatform) AddVappNetwork ¶
func (*VcdPlatform) AddVmHrefToCache ¶
func (v *VcdPlatform) AddVmHrefToCache(ctx context.Context, vmName, href string)
func (*VcdPlatform) AttachPortToServer ¶
func (v *VcdPlatform) AttachPortToServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, portName string, ips infracommon.IPs, action vmlayer.ActionType) error
AttachPortToServer
func (*VcdPlatform) BlockWhileStatusWithTickTime ¶
func (v *VcdPlatform) BlockWhileStatusWithTickTime(ctx context.Context, vapp *govcd.VApp, unwantedStatus string, timeOutAfterSeconds int, tickTime time.Duration) error
BlockWhileStatusWithTickTime is the same as the govcd version vapp.BlockWhileStatus. The only difference is that it allows a variable tickTime instead of every 200msec so that the number of API calls can be reduced
func (*VcdPlatform) CheckServerReady ¶
func (v *VcdPlatform) CheckServerReady(ctx context.Context, client ssh.Client, serverName string) error
check server ready without cloudlets
CheckServerReady
func (*VcdPlatform) ClearVmHrefCache ¶
func (v *VcdPlatform) ClearVmHrefCache(ctx context.Context)
func (*VcdPlatform) ConfigureCloudletSecurityRules ¶
func (v *VcdPlatform) ConfigureCloudletSecurityRules(ctx context.Context, egressRestricted bool, TrustPolicy *edgeproto.TrustPolicy, rootlbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error
func (*VcdPlatform) ConfigureTrustPolicyExceptionSecurityRules ¶
func (v *VcdPlatform) ConfigureTrustPolicyExceptionSecurityRules(ctx context.Context, TrustPolicyException *edgeproto.TrustPolicyException, rootLbClients map[string]platform.RootLBClient, action vmlayer.ActionType, updateCallback edgeproto.CacheUpdateCallback) error
func (*VcdPlatform) CreateImageFromUrl ¶
func (*VcdPlatform) CreateInternalNetworkForNewVm ¶
func (*VcdPlatform) CreateVApp ¶
func (v *VcdPlatform) CreateVApp(ctx context.Context, vappTmpl *govcd.VAppTemplate, vmgp *vmlayer.VMGroupOrchestrationParams, description string, vcdClient *govcd.VCDClient, vdc *govcd.Vdc, updateCallback edgeproto.CacheUpdateCallback) (*govcd.VApp, error)
Compose a new vapp from the given template, using vmgrp orch params Creates one or more vms.
func (*VcdPlatform) CreateVMs ¶
func (v *VcdPlatform) CreateVMs(ctx context.Context, vmgp *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
func (*VcdPlatform) DeleteImage ¶
func (v *VcdPlatform) DeleteImage(ctx context.Context, folder, image string) error
func (*VcdPlatform) DeleteMetadataForInternalSubnet ¶
func (*VcdPlatform) DeleteTemplate ¶
func (*VcdPlatform) DeleteVMs ¶
func (v *VcdPlatform) DeleteVMs(ctx context.Context, vmGroupName, ownerID string) error
Delete All VMs in the resolution of vmGroupName
func (*VcdPlatform) DeleteVapp ¶
func (*VcdPlatform) DeleteVmHrefFromCache ¶
func (v *VcdPlatform) DeleteVmHrefFromCache(ctx context.Context, vmName string)
DeleteVmHrefFromCache delete the VM->href mapping in the cache if present, does nothing otherwise
func (*VcdPlatform) DetachPortFromServer ¶
func (v *VcdPlatform) DetachPortFromServer(ctx context.Context, serverName string, subnetNames vmlayer.SubnetNames, xportName string) error
func (*VcdPlatform) DisableOrgRuntimeLease ¶
func (v *VcdPlatform) DisableOrgRuntimeLease(ctx context.Context, override bool) error
func (*VcdPlatform) DumpVmHrefCache ¶
func (v *VcdPlatform) DumpVmHrefCache(ctx context.Context) string
func (*VcdPlatform) FindTemplate ¶
func (v *VcdPlatform) FindTemplate(ctx context.Context, tmplName string, vcdClient *govcd.VCDClient) (*govcd.VAppTemplate, error)
Return requested vdc template
func (*VcdPlatform) FindVMByHrefCache ¶
func (v *VcdPlatform) FindVMByHrefCache(ctx context.Context, vmName string, vcdClient *govcd.VCDClient) *govcd.VM
FindVMByHrefCache returns nil if the cache is not enabled or the vm not found
func (*VcdPlatform) FindVMByName ¶
func (v *VcdPlatform) FindVMByName(ctx context.Context, serverName string, vcdClient *govcd.VCDClient, vdc *govcd.Vdc) (*govcd.VM, error)
If all you have is the serverName (vmName)
func (*VcdPlatform) FindVMInVApp ¶
func (v *VcdPlatform) FindVMInVApp(ctx context.Context, serverName string, vapp govcd.VApp) (*govcd.VM, error)
Have vapp obj in hand use this one.
func (*VcdPlatform) GatherCloudletInfo ¶
func (v *VcdPlatform) GatherCloudletInfo(ctx context.Context, info *edgeproto.CloudletInfo) error
func (*VcdPlatform) GetAddrOfVM ¶
func (v *VcdPlatform) GetAddrOfVM(ctx context.Context, vm *govcd.VM, netName string) (string, error)
Get the address VM is using on the given Network
func (*VcdPlatform) GetAddrOfVapp ¶
func (v *VcdPlatform) GetAddrOfVapp(ctx context.Context, vapp *govcd.VApp, netName string) (string, error)
Consider a GetAllSubnetsInVapp() []string err for shared lbs... XXX Returns the first addr on the given network.
func (*VcdPlatform) GetAllVMsInVApp ¶
Given a groupName / vappName, return all of its vm membership as a VMMap
func (*VcdPlatform) GetApiEndpointAddr ¶
func (v *VcdPlatform) GetApiEndpointAddr(ctx context.Context) (string, error)
func (*VcdPlatform) GetCatalog ¶
func (*VcdPlatform) GetCatalogName ¶
func (v *VcdPlatform) GetCatalogName() string
func (*VcdPlatform) GetCleanupOrphanedNetworks ¶
func (v *VcdPlatform) GetCleanupOrphanedNetworks() bool
the normal methods of querying this seem sometimes unreliable e.g. vdc.IsNsxv()
func (*VcdPlatform) GetClient ¶
func (v *VcdPlatform) GetClient(ctx context.Context, creds *VcdConfigParams) (client *govcd.VCDClient, err error)
GetClient gets a new client object. Copies are made of the global client object, which instantiates a new http client but shares the access token
func (*VcdPlatform) GetCloudletImageSuffix ¶
func (v *VcdPlatform) GetCloudletImageSuffix(ctx context.Context) string
VCD does not yet actually support download/upload of images, but the common image suffix is provided here so it can be validated when this is implemented
func (*VcdPlatform) GetCloudletInfraResourcesInfo ¶
func (v *VcdPlatform) GetCloudletInfraResourcesInfo(ctx context.Context) ([]edgeproto.InfraResource, error)
func (*VcdPlatform) GetCloudletManifest ¶
func (v *VcdPlatform) GetCloudletManifest(ctx context.Context, name, cloudletImagePath string, VMGroupOrchestrationParams *vmlayer.VMGroupOrchestrationParams) (string, error)
func (*VcdPlatform) GetCloudletTrustPolicy ¶
func (v *VcdPlatform) GetCloudletTrustPolicy(ctx context.Context) (*edgeproto.TrustPolicy, error)
func (*VcdPlatform) GetClusterAdditionalResourceMetric ¶
func (v *VcdPlatform) GetClusterAdditionalResourceMetric(ctx context.Context, cloudlet *edgeproto.Cloudlet, resMetric *edgeproto.Metric, resources []edgeproto.VMResource) error
func (*VcdPlatform) GetClusterAdditionalResources ¶
func (v *VcdPlatform) GetClusterAdditionalResources(ctx context.Context, cloudlet *edgeproto.Cloudlet, vmResources []edgeproto.VMResource, infraResMap map[string]edgeproto.InfraResource) map[string]edgeproto.InfraResource
called by controller, make sure it doesn't make any calls to infra API
func (*VcdPlatform) GetConsoleUrl ¶
func (*VcdPlatform) GetEnableVcdDiskResize ¶
func (v *VcdPlatform) GetEnableVcdDiskResize() bool
func (*VcdPlatform) GetExtAddrOfVM ¶
func (*VcdPlatform) GetExtNetwork ¶
func (v *VcdPlatform) GetExtNetwork(ctx context.Context, vcdClient *govcd.VCDClient, netName string) (*govcd.OrgVDCNetwork, error)
fetch the OrgVDCNetwork
func (*VcdPlatform) GetExternalGateway ¶
GetExternalGateway Gateway, Always operates on MEX_EXT_NETWORK Return the IP address of the external Gateway
func (*VcdPlatform) GetFeatures ¶
func (o *VcdPlatform) GetFeatures() *edgeproto.PlatformFeatures
func (*VcdPlatform) GetFlavor ¶
func (v *VcdPlatform) GetFlavor(ctx context.Context, flavorName string) (*edgeproto.FlavorInfo, error)
func (*VcdPlatform) GetFlavorList ¶
func (v *VcdPlatform) GetFlavorList(ctx context.Context) ([]*edgeproto.FlavorInfo, error)
func (*VcdPlatform) GetFreeSharedCommonIpRange ¶
func (*VcdPlatform) GetGPUSetupStage ¶
func (v *VcdPlatform) GetGPUSetupStage(ctx context.Context) vmlayer.GPUSetupStage
func (*VcdPlatform) GetGatewayForOrgVDCNetwork ¶
func (v *VcdPlatform) GetGatewayForOrgVDCNetwork(ctx context.Context, network *types.OrgVDCNetwork) (string, error)
func (*VcdPlatform) GetHrefCacheEnabled ¶
func (v *VcdPlatform) GetHrefCacheEnabled() bool
func (*VcdPlatform) GetIntAddrsOfVM ¶
return a list of internal nets, a shared LB may have several
func (*VcdPlatform) GetInternalPortPolicy ¶
func (v *VcdPlatform) GetInternalPortPolicy() vmlayer.InternalPortAttachPolicy
func (*VcdPlatform) GetLeaseOverride ¶
func (v *VcdPlatform) GetLeaseOverride() bool
func (*VcdPlatform) GetNetworkDetail ¶
func (v *VcdPlatform) GetNetworkDetail(ctx context.Context, networkName string) (*vmlayer.NetworkDetail, error)
func (*VcdPlatform) GetNetworkList ¶
func (v *VcdPlatform) GetNetworkList(ctx context.Context) ([]string, error)
func (*VcdPlatform) GetNetworkMetadataForInternalSubnet ¶
func (*VcdPlatform) GetNsxType ¶
func (v *VcdPlatform) GetNsxType() string
the normal methods of querying this seem sometimes unreliable e.g. vdc.IsNsxv()
func (*VcdPlatform) GetOrg ¶
Retrieve our top level Org object. Tries to retrieve the org from context first, if the org is not in context then uses the APIs to retrieve it
func (*VcdPlatform) GetPlatformResourceInfo ¶
func (v *VcdPlatform) GetPlatformResourceInfo(ctx context.Context) (*vmlayer.PlatformResources, error)
func (*VcdPlatform) GetResourceID ¶
func (v *VcdPlatform) GetResourceID(ctx context.Context, resourceType vmlayer.ResourceType, resourceName string) (string, error)
func (*VcdPlatform) GetRouterDetail ¶
func (v *VcdPlatform) GetRouterDetail(ctx context.Context, routerName string) (*vmlayer.RouterDetail, error)
No Router
func (*VcdPlatform) GetServerDetail ¶
func (v *VcdPlatform) GetServerDetail(ctx context.Context, serverName string) (*vmlayer.ServerDetail, error)
func (*VcdPlatform) GetServerDetailWithVdc ¶
func (*VcdPlatform) GetServerGroupResources ¶
func (v *VcdPlatform) GetServerGroupResources(ctx context.Context, name string) (*edgeproto.InfraResources, error)
Should always be a vapp/cluster/group name
func (*VcdPlatform) GetSubnetFromLegacyIsoMetadata ¶
func (v *VcdPlatform) GetSubnetFromLegacyIsoMetadata(ctx context.Context, isonetName string, vcdClient *govcd.VCDClient, vdc *govcd.Vdc) (string, error)
GetSubnetFromLegacyIsoMetadata is used only in rare cases where we need to get the subnet name back from the iso net name
func (*VcdPlatform) GetTemplateArtifactoryImportEnabled ¶
func (v *VcdPlatform) GetTemplateArtifactoryImportEnabled() bool
func (*VcdPlatform) GetVCDORG ¶
func (v *VcdPlatform) GetVCDORG() string
func (*VcdPlatform) GetVCDPassword ¶
func (v *VcdPlatform) GetVCDPassword() string
func (*VcdPlatform) GetVCDURL ¶
func (v *VcdPlatform) GetVCDURL() string
func (*VcdPlatform) GetVCDUser ¶
func (v *VcdPlatform) GetVCDUser() string
func (*VcdPlatform) GetVDCName ¶
func (v *VcdPlatform) GetVDCName() string
func (*VcdPlatform) GetVMAddresses ¶
func (*VcdPlatform) GetVMFromVAppByIdx ¶
func (*VcdPlatform) GetVMStats ¶
func (*VcdPlatform) GetVappServerSuffix ¶
func (v *VcdPlatform) GetVappServerSuffix() string
func (*VcdPlatform) GetVcdClientFromContext ¶
func (v *VcdPlatform) GetVcdClientFromContext(ctx context.Context) *govcd.VCDClient
GetVcdClientFromContext returns a client object if one exists, otherwise nil
func (*VcdPlatform) GetVcdClientRefreshInterval ¶
func (v *VcdPlatform) GetVcdClientRefreshInterval(ctx context.Context) uint64
func (*VcdPlatform) GetVcdClientTlsCert ¶
func (v *VcdPlatform) GetVcdClientTlsCert() string
func (*VcdPlatform) GetVcdClientTlsKey ¶
func (v *VcdPlatform) GetVcdClientTlsKey() string
func (*VcdPlatform) GetVcdInsecure ¶
func (v *VcdPlatform) GetVcdInsecure() bool
GetVcdInsecure defaults to true unless explicitly set to false
func (*VcdPlatform) GetVcdOauthAgwUrl ¶
func (v *VcdPlatform) GetVcdOauthAgwUrl() string
func (*VcdPlatform) GetVcdOauthClientId ¶
func (v *VcdPlatform) GetVcdOauthClientId() string
func (*VcdPlatform) GetVcdOauthClientSecret ¶
func (v *VcdPlatform) GetVcdOauthClientSecret() string
func (*VcdPlatform) GetVcdOauthSgwUrl ¶
func (v *VcdPlatform) GetVcdOauthSgwUrl() string
func (*VcdPlatform) GetVcdOrgName ¶
func (v *VcdPlatform) GetVcdOrgName() string
func (*VcdPlatform) GetVcdPassword ¶
func (v *VcdPlatform) GetVcdPassword() string
func (*VcdPlatform) GetVcdUrl ¶
func (v *VcdPlatform) GetVcdUrl() string
func (*VcdPlatform) GetVcdUser ¶
func (v *VcdPlatform) GetVcdUser() string
func (*VcdPlatform) GetVcdVars ¶
func (*VcdPlatform) GetVcdVdcName ¶
func (v *VcdPlatform) GetVcdVdcName() string
func (*VcdPlatform) GetVcdVerbose ¶
func (v *VcdPlatform) GetVcdVerbose() bool
properties from envvars
func (*VcdPlatform) GetVcpuSpeedOverride ¶
func (v *VcdPlatform) GetVcpuSpeedOverride(ctx context.Context) int64
func (*VcdPlatform) GetVdcFromContext ¶
func (v *VcdPlatform) GetVdcFromContext(ctx context.Context, vcdClient *govcd.VCDClient) (*govcd.Vdc, error)
GetVdcFromContext gets tries to get the VDC from context, otherwise it calls GetVdc to get via APIs
func (*VcdPlatform) GetVmAppInternalDhcpServer ¶
func (v *VcdPlatform) GetVmAppInternalDhcpServer() bool
func (*VcdPlatform) GetVmAppStatsVdcMaxCacheTime ¶
func (v *VcdPlatform) GetVmAppStatsVdcMaxCacheTime() (uint64, error)
func (*VcdPlatform) GetVmHrefFromCache ¶
func (v *VcdPlatform) GetVmHrefFromCache(ctx context.Context, vmName string) string
GetVmHrefFromCache returns an href if the VM is cached, blank string otherwise
func (*VcdPlatform) GetVmStatus ¶
func (*VcdPlatform) IdSanitize ¶
func (v *VcdPlatform) IdSanitize(name string) string
VCD names conform to XML format and may be strings including spaces and various characters.
func (*VcdPlatform) ImportImage ¶
func (v *VcdPlatform) ImportImage(ctx context.Context, folder, imageFile string) error
func (*VcdPlatform) ImportTemplateFromUrl ¶
func (*VcdPlatform) InitApiAccessProperties ¶
func (v *VcdPlatform) InitApiAccessProperties(ctx context.Context, accessApi platform.AccessApi, vars map[string]string) error
start fetching access bits from vault
func (*VcdPlatform) InitData ¶
func (v *VcdPlatform) InitData(ctx context.Context, caches *platform.Caches)
func (*VcdPlatform) InitOperationContext ¶
func (v *VcdPlatform) InitOperationContext(ctx context.Context, operationStage vmlayer.OperationInitStage) (context.Context, vmlayer.OperationInitResult, error)
func (*VcdPlatform) InitProvider ¶
func (v *VcdPlatform) InitProvider(ctx context.Context, caches *platform.Caches, stage vmlayer.ProviderInitStage, updateCallback edgeproto.CacheUpdateCallback) error
func (*VcdPlatform) InsertConnectionIntoNcs ¶
func (v *VcdPlatform) InsertConnectionIntoNcs(ctx context.Context, ncs *types.NetworkConnectionSection, newConn *types.NetworkConnection, conIdx int) *types.NetworkConnectionSection
InsertConnectionIntoNcs replaces the network connection if the conIdx exists, otherwise appends it
func (*VcdPlatform) InternalCloudletUpdatedCallback ¶
func (v *VcdPlatform) InternalCloudletUpdatedCallback(ctx context.Context, old *edgeproto.CloudletInternal, new *edgeproto.CloudletInternal)
func (*VcdPlatform) IsDhcpEnabled ¶
func (v *VcdPlatform) IsDhcpEnabled(ctx context.Context, net *govcd.OrgVDCNetwork) bool
func (*VcdPlatform) LogVappVMsStatus ¶
func (v *VcdPlatform) LogVappVMsStatus(ctx context.Context, vapp *govcd.VApp)
func (*VcdPlatform) NameSanitize ¶
func (v *VcdPlatform) NameSanitize(name string) string
Assuming Vcd is more similar to Vsphere rather than vmPool or OpenStack alphanumeric plus -_. first char must be alpha, <= 255 chars.
func (*VcdPlatform) PopulateCredsForSimulator ¶
func (v *VcdPlatform) PopulateCredsForSimulator(ctx context.Context, region, orgName, physName, vaultAddr string) error
func (*VcdPlatform) PopulateOrgLoginCredsFromEnv ¶
func (v *VcdPlatform) PopulateOrgLoginCredsFromEnv(ctx context.Context) error
physicalname (vault key) not needed when using insure env vars.
func (*VcdPlatform) PopulateOrgLoginCredsFromVcdVars ¶
func (v *VcdPlatform) PopulateOrgLoginCredsFromVcdVars(ctx context.Context) error
func (*VcdPlatform) PrepareRootLB ¶
func (v *VcdPlatform) PrepareRootLB(ctx context.Context, client ssh.Client, rootLBName string, secGrpName string, trustPolicy *edgeproto.TrustPolicy, updateCallback edgeproto.CacheUpdateCallback) error
func (*VcdPlatform) RefreshOauthTokenPeriodic ¶
func (v *VcdPlatform) RefreshOauthTokenPeriodic(ctx context.Context, creds *VcdConfigParams)
func (*VcdPlatform) RemoveWhitelistSecurityRules ¶
func (v *VcdPlatform) RemoveWhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
func (*VcdPlatform) RetrieveTemplate ¶
func (v *VcdPlatform) RetrieveTemplate(ctx context.Context, tmplName string, vcdClient *govcd.VCDClient) (*govcd.VAppTemplate, error)
func (*VcdPlatform) SetPowerState ¶
func (v *VcdPlatform) SetPowerState(ctx context.Context, serverName, serverAction string) error
always sync.
func (*VcdPlatform) SetVMProperties ¶
func (v *VcdPlatform) SetVMProperties(vmProperties *vmlayer.VMProperties)
func (*VcdPlatform) TimedVcdCliCommand ¶
func (v *VcdPlatform) TimedVcdCliCommand(ctx context.Context, name string, a ...string) ([]byte, error)
example usage, login, and show vapp info: mcctl --addr https://console-qa.mobiledgex.net:443 debug rundebug cmd=govcdcmd region=US cloudlet=qa2-cld1 args="/usr/bin/env LC_ALL=C.UTF-8 LANG=C.UTF-8 /home/ubuntu/venv/bin/vcd login $HOST $ORG $USER -w -i -p $PASSWD"
mcctl --addr https://console-qa.mobiledgex.net:443 --output-format=json debug rundebug cmd=govcdcmd region=US cloudlet=qa2-cld1 args="/usr/bin/env LC_ALL=C.UTF-8 LANG=C.UTF-8 /home/ubuntu/venv/bin/vcd vapp info qa2-cld1-packet-pf-vapp" | jq -r '.[0].output'
func (*VcdPlatform) UpdateOauthToken ¶
func (v *VcdPlatform) UpdateOauthToken(ctx context.Context, creds *VcdConfigParams) error
func (*VcdPlatform) UpdateVMs ¶
func (v *VcdPlatform) UpdateVMs(ctx context.Context, vmgp *vmlayer.VMGroupOrchestrationParams, updateCallback edgeproto.CacheUpdateCallback) error
Add/remove VM from our VApp (group)
func (*VcdPlatform) UploadOvaFile ¶
func (v *VcdPlatform) UploadOvaFile(ctx context.Context, fileName, itemName, descr string, vcdClient *govcd.VCDClient) error
UploadOvaFile uploads either an OVF or OVA
func (*VcdPlatform) ValidateAdditionalNetworks ¶
func (v *VcdPlatform) ValidateAdditionalNetworks(ctx context.Context, additionalNets map[string]vmlayer.NetworkType) error
func (*VcdPlatform) VmAppChangedCallback ¶
func (v *VcdPlatform) VmAppChangedCallback(ctx context.Context, appInst *edgeproto.AppInst, newState edgeproto.TrackedState)
func (*VcdPlatform) WaitForOauthTokenViaNotify ¶
func (v *VcdPlatform) WaitForOauthTokenViaNotify(ctx context.Context, ckey *edgeproto.CloudletKey) error
func (*VcdPlatform) WhitelistSecurityRules ¶
func (v *VcdPlatform) WhitelistSecurityRules(ctx context.Context, client ssh.Client, wlParams *infracommon.WhiteListParams) error
type VcdResources ¶
type VcdResources struct {
VmsUsed uint64
}