vmware

package
v0.0.0-...-8f289dc Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUTH_URI           string = "/rest/com/vmware/cis/session"
	CLUSTER_INFO_URI   string = "/rest/vcenter/cluster"
	WCP_INFO_URI       string = "/rest/vcenter/wcp/clusters"
	DATASTORE_INFO_URI string = "/rest/vcenter/datastore"
	NETWORK_INFO_URI   string = "/rest/vcenter/network"
)

Variables

This section is empty.

Functions

func EnableWcp

func EnableWcp(cfg VsphereConfig) bool

Types

type Cidr

type Cidr struct {
	Address string
	Prefix  int
}

type Cluster

type Cluster struct {
	Id         string `json:"cluster"`
	Name       string `json:"name"`
	DrsEnabled bool   `json:"drs_enabled"`
	HaEnabled  bool   `json:"ha_enabled"`
}

type Clusters

type Clusters struct {
	AllClusters []Cluster `json:"value"`
}

type Datastore

type Datastore struct {
	Id        string `json:"datastore"`
	Name      string `json:"name"`
	Type      string `json:"type"`
	FreeSpace int64  `json:"free_space"`
	Capacity  int64  `json:"capacity"`
}

type Datastores

type Datastores struct {
	AllDatastores []Datastore `json:"value"`
}

type EsxConfig

type EsxConfig struct {
	HostIp   string
	UserName string
	Password string
}

type Network

type Network struct {
	Id   string `json:"network"`
	Name string `json:"name"`
	Type string `json:"type"`
}

type NetworkConfig

type NetworkConfig struct {
	Mode        string
	VcNetwork   string
	Gateway     string
	Start       string
	Count       int
	NetworkMask string
}

type Networks

type Networks struct {
	AllNetworks []Network `json:"value"`
}

type VsphereConfig

type VsphereConfig struct {
	VcUser            string
	VcPassword        string
	VcIp              string
	Cluster           string
	Hosts             []EsxConfig
	Size              string
	MasterDNS         []string
	WorkerDNS         []string
	MasterNTP         []string
	WorkerNTP         []string
	MasterNetwork     NetworkConfig
	ManagementNetwork NetworkConfig
	WorkerNetwork     NetworkConfig
	MasterStore       string // Only support using one datastore at this point
	WorkerStore       string // Only support using one datastore at this point
	PodCidr           Cidr
	ServiceCidr       Cidr
}

type WcpAddressRange

type WcpAddressRange struct {
	AddressCount    int    `json:"address_count"`
	Gateway         string `json:"gateway"`
	StartingAddress string `json:"starting_address"`
	SubnetMask      string `json:"subnet_mask"`
}

type WcpCidr

type WcpCidr struct {
	Address string `json:"address"`
	Prefix  int    `json:"prefix"`
}

type WcpConfig

type WcpConfig struct {
	Cluster string  `json:"cluster"`
	Spec    WcpSpec `json:"spec"`
}

type WcpNetwork

type WcpNetwork struct {
	Range     WcpAddressRange `json:"address_range"`
	Mode      string          `json:"mode"`
	VcNetwork string          `json:"network"`
}

type WcpSpec

type WcpSpec struct {
	SizeHint          string     `json:"size_hint"`
	MasterDNS         []string   `json:"master_DNS"`
	MasterNTP         []string   `json:"master_NTP_servers"`
	MasterNetwork     WcpNetwork `json:"master_cluster_network"`
	ManagementNetwork WcpNetwork `json:"master_management_network"`
	MasterStore       []string   `json:"master_storage"`
	PodCidr           WcpCidr    `json:"pod_cidr"`
	ServiceCidr       WcpCidr    `json:"service_cidr"`
	VxlanPort         int        `json:"vxlan_port"`
	WorkerDNS         []string   `json:"worker_DNS"`
	WorkerNTP         []string   `json:"worker_NTP_servers"`
	WorkerNetwork     WcpNetwork `json:"worker_cluster_network"`
	WorkerStore       []string   `json:"worker_storage"`
}

Jump to

Keyboard shortcuts

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