cmds

package
v0.0.0-...-f1610be Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 28 Imported by: 2

Documentation

Overview

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package cmds Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Index

Constants

View Source
const (
	// CliBlock command line flag to block thread of execution
	CliBlock = "block"

	// CliPool node pool flag
	CliPool = "pool"

	// CliDisableGran disable grand validation flag
	CliDisableGran = "grant"

	//CliIgnoreGrantFailure flag sets ignore grant failure
	CliIgnoreGrantFailure = "ignoreGrantFailure"

	//CliDisableAutoRollback flag disables auto rollback during instantiation
	CliDisableAutoRollback = "disableAutoRollback"

	//CliAutoName flag generate new name upon conflict.
	CliAutoName = "auto_name"

	// CliForce force delete flag
	CliForce = "force"

	// CliNamespace change default name space
	CliNamespace = "namespace"

	// CliProgress show task progress
	CliProgress = "progress"

	// CliDryRun dry run flag
	CliDryRun = "dry"

	// CliShow output spec to stdio
	CliShow = "show"
)
View Source
const (
	// ConfigDefaultPinter default printer.
	ConfigDefaultPinter = "default"

	// ConfigJsonPinter json printers
	ConfigJsonPinter = "json"

	// ConfigYamlPinter yaml printers
	ConfigYamlPinter = "yaml"

	//FilteredOutFilter - Filtered output printer
	FilteredOutFilter = "filtered"

	// ConfigFile default config file name.
	ConfigFile = "config"

	// ConfigFormat specifies default config format.
	ConfigFormat = "yaml"

	// ConfigTcaEndpoint URI endpoint.
	ConfigTcaEndpoint = "tca-endpoint"

	// ConfigTcaUsername TCA Username
	ConfigTcaUsername = "tca-username"

	// ConfigTcaPassword specifies password to authenticate
	ConfigTcaPassword = "tca-password"

	// ConfigDefaultCluster default cluster name used to do a placement
	ConfigDefaultCluster = "defaultCluster"

	// ConfigNodePool default node pool name used for placement
	ConfigNodePool = "defaultNodePool"

	// ConfigRepoName default repo name
	ConfigRepoName = "defaultRepoName"

	// ConfigDefaultCloud default target cloud
	ConfigDefaultCloud = "defaultCloud"

	// ConfigStderrThreshold - default logging level
	ConfigStderrThreshold = "stderrthreshold"

	// ConfigHarborEndpoint Default harbor end point
	ConfigHarborEndpoint = "harbor-endpoint"

	// ConfigHarborUsername Default harbor username
	ConfigHarborUsername = "harbor-username"

	// ConfigHarborPassword default harbor password
	ConfigHarborPassword = "harbor-password"

	// ConfigVcUrl default vc url
	ConfigVcUrl = "vc"

	// ConfigVcUsername default repo name
	ConfigVcUsername = "vc_username"

	// ConfigVcPassword default repo name
	ConfigVcPassword = "vc_password"

	// ConfigTrace dump server respond
	ConfigTrace = "trace"

	// FlagOutput - default logging level
	FlagOutput = "output"

	// FlagConfig config
	FlagConfig = "config"

	// FlagCliWide wide output
	FlagCliWide = "wide"

	//FlagCliTerm normal terminal mode no color.
	FlagCliTerm = "term"
)

Variables

This section is empty.

Functions

func CheckErrLogError

func CheckErrLogError(msg interface{})

CheckErrLogError , print error and log error

func CheckErrLogInfoMsg

func CheckErrLogInfoMsg(msg interface{})

func CheckNilLogError

func CheckNilLogError(predicate interface{}, msg interface{})

func CheckNotOkLogError

func CheckNotOkLogError(predicate bool, msg interface{})

func Chunks

func Chunks(s string, chunkSize int, sep byte) []string

Chunks splits string to chunks, it uses sep to split near chunkSize limit. Each chunk is variable size. Method used to partition flags usage.

func IsValidUUID

func IsValidUUID(u string) bool

IsValidUUID check value in UUID format

Types

type TcaCtl

type TcaCtl struct {

	//
	HarborClient *client.RestClient

	// CnfInstancePrinters cnf instance printer
	CnfInstancePrinters map[string]func(*response.Cnfs, ui.PrinterStyle)

	//
	CnfInstanceExtendedPrinters map[string]func(*response.CnfsExtended, ui.PrinterStyle)

	// CnfPackagePrinters cnf catalog packages printer
	CnfPackagePrinters map[string]func(*response.VnfPackages, ui.PrinterStyle)

	// RepoPrinter repositories printer
	RepoPrinter map[string]func(*response.ReposList, ui.PrinterStyle)

	// TenantsPrinter cloud tenant printer
	TenantsPrinter map[string]func(*response.Tenants, ui.PrinterStyle)

	// NodePoolPrinter k8s node pool printer
	NodePoolPrinter map[string]func(*response.NodePool, ui.PrinterStyle)

	// PoolSpecTablePrinter k8s single pool printer
	PoolSpecPrinter map[string]func(*response.NodesSpecs, ui.PrinterStyle)

	// ClustersPrinter k8s cluster printer
	ClustersPrinter map[string]func(*response.Clusters, ui.PrinterStyle)

	// ClusterPrinter k8s cluster printer
	ClusterPrinter map[string]func(*response.ClusterSpec, ui.PrinterStyle)

	// VduPrinter vdu printer
	VduPrinter map[string]func(*response.VduPackage, ui.PrinterStyle)

	// TenantQueryPrinter tenant query printer
	TenantQueryPrinter map[string]func(*response.Tenants, ui.PrinterStyle)

	// TenantQueryPrinter tenant query printer
	NodesPrinter map[string]func(*response.NodePool, ui.PrinterStyle)

	// TenantQueryPrinter tenant query printer
	TemplatePrinter map[string]func(*response.ClusterTemplateSpec, ui.PrinterStyle)

	// TenantQueryPrinter tenant query printer
	TemplatesPrinter map[string]func([]response.ClusterTemplateSpec, ui.PrinterStyle)

	// TenantQueryPrinter tenant query printer
	ClusterRequestPrinter map[string]func(*specs.SpecCluster, ui.PrinterStyle)

	// cloud tenant printer
	TenantsResponsePrinter map[string]func(*response.TenantSpecs, ui.PrinterStyle)

	// Vmware specific infra printers
	VMwareClusterPrinter    map[string]func(*models.VMwareClusters, ui.PrinterStyle)
	VMwareDatastorePrinter  map[string]func(*models.VMwareClusters, ui.PrinterStyle)
	VmwareNetworkPrinter    map[string]func(*models.CloudNetworks, ui.PrinterStyle)
	VmwareVmTemplatePrinter map[string]func(*models.VcInventory, ui.PrinterStyle)
	VmwareResourcePrinter   map[string]func(*models.ResourcePool, ui.PrinterStyle)

	// VMware Vsphere Datastore printers
	VsphereDatastores map[string]func(*vc.VsphereDatastores, ui.PrinterStyle)

	// Tca consumption specific printers
	TcaConsumptionPrinter map[string]func(*models.ConsumptionResp, ui.PrinterStyle)

	// cluster task list printer.  cluster task is take current executing or
	// already executed.
	TaskClusterPrinter map[string]func(*models.ClusterTask, ui.PrinterStyle)

	// global flag what output printer to use
	Printer string

	// global debug flag for a tool
	IsDebug bool

	// config file
	CfgFile string

	// root entry for cli
	RootCmd *cobra.Command

	// default style for table Printer
	DefaultStyle ui.PrinterStyle

	// DefaultClusterName cluster name from config or flag
	DefaultClusterName string

	// DefaultCloudName default cloud name tool will use
	DefaultCloudName string

	// DefaultNodePoolName node pool tool will use.
	DefaultNodePoolName string

	// DefaultRepoName default repo name
	DefaultRepoName string

	// IsColorTerm color or not term
	IsColorTerm bool

	// IsWideTerm is wide or not output
	IsWideTerm bool

	// Harbor harbor api end-point
	Harbor string

	// HarborUsername harbor username
	HarborUsername string

	// HarborPassword harbor password
	HarborPassword string

	// IsTrace set rest api trace
	IsTrace bool

	// VsphereAuthSpecs VMware VC Authentication specs
	VsphereAuthSpecs VMwareVcSpecs
	// contains filtered or unexported fields
}

func NewTcaCtl

func NewTcaCtl() *TcaCtl

NewTcaCtl - main abstraction for a tool

func (*TcaCtl) Authorize

func (ctl *TcaCtl) Authorize() error

Authorize authenticate and obtain a session. TODO this method will go away

func (*TcaCtl) BasicAuthentication

func (ctl *TcaCtl) BasicAuthentication()

BasicAuthentication TODO this method will go away

func (*TcaCtl) BuildCmd

func (ctl *TcaCtl) BuildCmd()

BuildCmd build all commands and attaches to root cmd in case you need add sub-command you can, add to plugin dir.

func (*TcaCtl) CmdConsumption

func (ctl *TcaCtl) CmdConsumption() *cobra.Command

CmdConsumption - describe VIM

func (*TcaCtl) CmdCreate

func (ctl *TcaCtl) CmdCreate() *cobra.Command

func (*TcaCtl) CmdCreateCluster

func (ctl *TcaCtl) CmdCreateCluster() *cobra.Command

CmdCreateCluster - command for cluster creation Read cluster spec , validate each spec param and create cluster if specs are valid, in Dry run resolve all name, parse spec and output final yaml if no error.

func (*TcaCtl) CmdCreateClusterTemplates

func (ctl *TcaCtl) CmdCreateClusterTemplates() *cobra.Command

CmdCreateClusterTemplates - Create new cluster template

func (*TcaCtl) CmdCreateCnf

func (ctl *TcaCtl) CmdCreateCnf() *cobra.Command

CmdCreateCnf create a new cnf instance

func (*TcaCtl) CmdCreateExtension

func (ctl *TcaCtl) CmdCreateExtension() *cobra.Command

CmdCreateExtension - Command register new extension

func (*TcaCtl) CmdCreatePackage

func (ctl *TcaCtl) CmdCreatePackage() *cobra.Command

CmdCreatePackage create package in TCA catalog by default API interface will regenerate descriptor id based on substitution map. All other parameter can overwritten by passing respected key. For example if caller need overwrite chart name or chart version.

func (*TcaCtl) CmdCreatePoolNodes

func (ctl *TcaCtl) CmdCreatePoolNodes() *cobra.Command

CmdCreatePoolNodes - command create a node pool from a node pool spec.

func (*TcaCtl) CmdCreateTenant

func (ctl *TcaCtl) CmdCreateTenant() *cobra.Command

CmdCreateTenant - Command create-registers a new tenant

func (*TcaCtl) CmdDeleteCatalog

func (ctl *TcaCtl) CmdDeleteCatalog() *cobra.Command

CmdDeleteCatalog delete catalog entity from TCA

func (*TcaCtl) CmdDeleteCluster

func (ctl *TcaCtl) CmdDeleteCluster() *cobra.Command

CmdDeleteCluster - command delete cluster

func (*TcaCtl) CmdDeleteClusterTemplates

func (ctl *TcaCtl) CmdDeleteClusterTemplates() *cobra.Command

CmdDeleteClusterTemplates - Deletes cluster template.

func (*TcaCtl) CmdDeleteExtension

func (ctl *TcaCtl) CmdDeleteExtension() *cobra.Command

CmdDeleteExtension - Command delete extension

func (*TcaCtl) CmdDeleteInstances

func (ctl *TcaCtl) CmdDeleteInstances() *cobra.Command

CmdDeleteInstances command deletes existing instance force flag provide option to terminate and delete

func (*TcaCtl) CmdDeletePoolNodes

func (ctl *TcaCtl) CmdDeletePoolNodes() *cobra.Command

CmdDeletePoolNodes - command delete a node pool from a cluster. Note worker node must not have any active instances.

func (*TcaCtl) CmdDeleteTenant

func (ctl *TcaCtl) CmdDeleteTenant() *cobra.Command

CmdDeleteTenant - Command deletes tenant TODO do recursive force i.e remove all

func (*TcaCtl) CmdDeleteTenantCluster

func (ctl *TcaCtl) CmdDeleteTenantCluster() *cobra.Command

CmdDeleteTenantCluster - Deletes tenant cluster

func (*TcaCtl) CmdDescClusterNodePool

func (ctl *TcaCtl) CmdDescClusterNodePool() *cobra.Command

CmdDescClusterNodePool - describe node pool cmd tcactl describe node pool

func (*TcaCtl) CmdDescClusterNodePools

func (ctl *TcaCtl) CmdDescClusterNodePools() *cobra.Command

CmdDescClusterNodePools - describe all node pool command will output all node pool currently

func (*TcaCtl) CmdDescClusterNodes

func (ctl *TcaCtl) CmdDescClusterNodes() *cobra.Command

CmdDescClusterNodes - describe all node pools for all cluster

func (*TcaCtl) CmdDescribeTask

func (ctl *TcaCtl) CmdDescribeTask() *cobra.Command

CmdDescribeTask - command describe task running in TCA.

func (*TcaCtl) CmdDescribeTemplate

func (ctl *TcaCtl) CmdDescribeTemplate() *cobra.Command

CmdDescribeTemplate - describe single template

func (*TcaCtl) CmdDescribeVim

func (ctl *TcaCtl) CmdDescribeVim() *cobra.Command

CmdDescribeVim - command describe VIM , Cloud Provider , attached to system.

func (*TcaCtl) CmdGetClouds

func (ctl *TcaCtl) CmdGetClouds() *cobra.Command

CmdGetClouds - return list of cloud provider attached to Telco Cloud Automation

func (*TcaCtl) CmdGetCluster

func (ctl *TcaCtl) CmdGetCluster() *cobra.Command

CmdGetCluster - command get cluster or cluster list describe cluster test

func (*TcaCtl) CmdGetClusterTasks

func (ctl *TcaCtl) CmdGetClusterTasks() *cobra.Command

CmdGetClusterTasks - command return current list of task.

func (*TcaCtl) CmdGetClusterTemplates

func (ctl *TcaCtl) CmdGetClusterTemplates() *cobra.Command

CmdGetClusterTemplates - return list of cloud provider attached to TCA output filter allow to filter by specific key filter allow to filter on template type

func (*TcaCtl) CmdGetClusters

func (ctl *TcaCtl) CmdGetClusters() *cobra.Command

CmdGetClusters - Sub-command to get cluster information.

func (*TcaCtl) CmdGetClustersK8SConfig

func (ctl *TcaCtl) CmdGetClustersK8SConfig() *cobra.Command

CmdGetClustersK8SConfig retrieve kubeconfig if active flag passed, will serialize to kubeconfig file if file indicated will save to a file

func (*TcaCtl) CmdGetClustersList

func (ctl *TcaCtl) CmdGetClustersList() *cobra.Command

CmdGetClustersList - command to get cluster list

func (*TcaCtl) CmdGetClustersPool

func (ctl *TcaCtl) CmdGetClustersPool() *cobra.Command

CmdGetClustersPool - command return cluster pools list Example get cluster pool mycluster

func (*TcaCtl) CmdGetClustersPoolNodes

func (ctl *TcaCtl) CmdGetClustersPoolNodes() *cobra.Command

CmdGetClustersPoolNodes - command return nodes linked to pool. Example: get clusters nodes mycluster

func (*TcaCtl) CmdGetDatastore

func (ctl *TcaCtl) CmdGetDatastore() *cobra.Command

CmdGetDatastore - get datastores from vcenter

func (*TcaCtl) CmdGetExtensions

func (ctl *TcaCtl) CmdGetExtensions() *cobra.Command

CmdGetExtensions command get extensions from TCA

func (*TcaCtl) CmdGetInstances

func (ctl *TcaCtl) CmdGetInstances() *cobra.Command

CmdGetInstances Get CNF/VNF active instances instance might be in different state. active define package that instantiate.

func (*TcaCtl) CmdGetPackages

func (ctl *TcaCtl) CmdGetPackages() *cobra.Command

CmdGetPackages - Command retrieves a list of CNFs or VNFs catalog entities

func (*TcaCtl) CmdGetPoolNodes

func (ctl *TcaCtl) CmdGetPoolNodes() *cobra.Command

CmdGetPoolNodes - command to get CNF Catalog entity

func (*TcaCtl) CmdGetRepos

func (ctl *TcaCtl) CmdGetRepos() *cobra.Command

CmdGetRepos get cnf or vnf instances

func (*TcaCtl) CmdGetTcaManager

func (ctl *TcaCtl) CmdGetTcaManager() *cobra.Command

CmdGetTcaManager - a root sub-command for all tca manager sub-commands.

func (*TcaCtl) CmdGetVc

func (ctl *TcaCtl) CmdGetVc() *cobra.Command

CmdGetVc - a root sub-command for all vc sub-commands.

func (*TcaCtl) CmdGetVdu

func (ctl *TcaCtl) CmdGetVdu() *cobra.Command

CmdGetVdu retrieves information

func (*TcaCtl) CmdGetVim

func (ctl *TcaCtl) CmdGetVim() *cobra.Command

CmdGetVim - Get's VIM root command. - Each sub-command gets particular facts about attached VIM, Cloud provider.

func (*TcaCtl) CmdGetVimResourcePool

func (ctl *TcaCtl) CmdGetVimResourcePool() *cobra.Command

CmdGetVimResourcePool - return vmware resource pools defined in VIM.

func (*TcaCtl) CmdGetVmFolders

func (ctl *TcaCtl) CmdGetVmFolders() *cobra.Command

CmdGetVmFolders - describe VIM

func (*TcaCtl) CmdGetVmTemplates

func (ctl *TcaCtl) CmdGetVmTemplates() *cobra.Command

CmdGetVmTemplates - describe VIM

func (*TcaCtl) CmdGetVmwareDatastore

func (ctl *TcaCtl) CmdGetVmwareDatastore() *cobra.Command

CmdGetVmwareDatastore - command to get retrieve cloud provider datastore, in case VMware ( supported now ) it VSAN/Local and NFS data stores.

func (*TcaCtl) CmdGetVmwareInfra

func (ctl *TcaCtl) CmdGetVmwareInfra() *cobra.Command

CmdGetVmwareInfra - describe VIM

func (*TcaCtl) CmdGetVmwareNetworks

func (ctl *TcaCtl) CmdGetVmwareNetworks() *cobra.Command

CmdGetVmwareNetworks - describe VIM networks.

func (*TcaCtl) CmdInitConfig

func (ctl *TcaCtl) CmdInitConfig() *cobra.Command

CmdInitConfig - initialize configuration file, for initial setup TCA and other defaults

func (*TcaCtl) CmdMove

func (ctl *TcaCtl) CmdMove() *cobra.Command

CmdMove command move instance

func (*TcaCtl) CmdReconfigure

func (ctl *TcaCtl) CmdReconfigure() *cobra.Command

CmdReconfigure command reconfigures lcm instance

func (*TcaCtl) CmdResetInstances

func (ctl *TcaCtl) CmdResetInstances() *cobra.Command

CmdResetInstances resets instance state

func (*TcaCtl) CmdRollbackInstances

func (ctl *TcaCtl) CmdRollbackInstances() *cobra.Command

CmdRollbackInstances command to update CNF state. i.e rollback

func (*TcaCtl) CmdSaveConfig

func (ctl *TcaCtl) CmdSaveConfig() *cobra.Command

CmdSaveConfig - save config file

func (*TcaCtl) CmdSetCluster

func (ctl *TcaCtl) CmdSetCluster() *cobra.Command

CmdSetCluster - return list of cloud provider attached to TCA

func (*TcaCtl) CmdSetNodePool

func (ctl *TcaCtl) CmdSetNodePool() *cobra.Command

CmdSetNodePool - return list of cloud provider attached to TCA

func (*TcaCtl) CmdSetPassword

func (ctl *TcaCtl) CmdSetPassword() *cobra.Command

CmdSetPassword - return list of cloud provider attached to TCA

func (*TcaCtl) CmdSetTca

func (ctl *TcaCtl) CmdSetTca() *cobra.Command

CmdSetTca - return list of cloud provider attached to TCA

func (*TcaCtl) CmdSetUsername

func (ctl *TcaCtl) CmdSetUsername() *cobra.Command

CmdSetUsername - return list of cloud provider attached to TCA

func (*TcaCtl) CmdTerminateInstances

func (ctl *TcaCtl) CmdTerminateInstances() *cobra.Command

CmdTerminateInstances command to update CNF state. i.e terminate

func (*TcaCtl) CmdUpdateClusterTemplates

func (ctl *TcaCtl) CmdUpdateClusterTemplates() *cobra.Command

CmdUpdateClusterTemplates - Updates cluster template from a file spec.

func (*TcaCtl) CmdUpdateExtension

func (ctl *TcaCtl) CmdUpdateExtension() *cobra.Command

CmdUpdateExtension - Command update extension for example attach Harbor to cluster

func (*TcaCtl) CmdUpdateInstance

func (ctl *TcaCtl) CmdUpdateInstance() *cobra.Command

CmdUpdateInstance root command

func (*TcaCtl) CmdUpdateInstances

func (ctl *TcaCtl) CmdUpdateInstances() *cobra.Command

CmdUpdateInstances Update state of instance if instance terminated , instantiate in same environment or update environment for example change VIM or Node Pool.

func (*TcaCtl) CmdUpdatePoolNodes

func (ctl *TcaCtl) CmdUpdatePoolNodes() *cobra.Command

CmdUpdatePoolNodes - command create a node pool from a node pool spec. TODO

func (*TcaCtl) CmdUpdateTenant

func (ctl *TcaCtl) CmdUpdateTenant() *cobra.Command

CmdUpdateTenant - Command update tenant TODO

func (*TcaCtl) CmdVims

func (ctl *TcaCtl) CmdVims() *cobra.Command

CmdVims - Command retrieves K8s tenant cluster.

func (*TcaCtl) GetApi

func (ctl *TcaCtl) GetApi() *api.TcaApi

GetApi returns TcaApi api.TcaApi

func (*TcaCtl) PrintRunningInstances

func (ctl *TcaCtl) PrintRunningInstances() error

PrintRunningInstances Prints instance name

func (*TcaCtl) ResolveClusterName

func (ctl *TcaCtl) ResolveClusterName(q string) (string, error)

ResolveClusterName - resolve cluster name to cluster id TODO this method will go away

func (*TcaCtl) ResolvePoolName

func (ctl *TcaCtl) ResolvePoolName(poolName string, clusterName string) (string, string, error)

ResolvePoolName - resolve pool name to id in given cluster TODO this method will go away

func (*TcaCtl) SetPassword

func (ctl *TcaCtl) SetPassword(password string)

SetPassword sets tca password

func (*TcaCtl) SetTcaBase

func (ctl *TcaCtl) SetTcaBase(url string)

SetTcaBase sets tca base url

func (*TcaCtl) SetTcaUsername

func (ctl *TcaCtl) SetTcaUsername(username string)

SetTcaUsername sets tca username

func (*TcaCtl) VcConnect

func (ctl *TcaCtl) VcConnect(ctx context.Context, alias string) error

VcConnect Connects to vsphere and update vSphere client.

type VMwareVcSpecs

type VMwareVcSpecs struct {
	// Hold authentication credentials.
	Vmware map[string]VSphereAuthSpec `mapstructure:"vmware"`
}

VMwareVcSpecs map hold all VCs

type VSphereAuthSpec

type VSphereAuthSpec struct {
	// VcUrl vsphere url
	Url string `json:"url" yaml:"url"`
	// Username vsphere username
	Username string `json:"username" yaml:"username"`
	// Password vsphere password
	Password string `json:"password" yaml:"password"`
	// Default used in case caller didn't provide actual vc
	// config contains a list of vc not just single entry
	Default bool `json:"default" yaml:"default"`
}

VSphereAuthSpec credential and endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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