nutanix

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Id                        string
	Uuid                      string
	Name                      string
	NumNodes                  int               `json:"num_nodes"`
	SsdPinningPercentageLimit int               `json:"ssd_pinning_percentage_limit"`
	RackableUnits             []RackableUnits   `json:"rackable_units`
	Stats                     map[string]string `josn:"stats"`
	UsageStats                map[string]string `json:"usage_stats"`
}

type HostEntity

type HostEntity struct {
	Name           string
	CpuFrequency   float64 `json:"cpu_frequency_in_hz"`
	CpuCapacity    float64 `json:"cpu_capacity_in_hz"`
	MemoryCapacity float64 `json:"memory_capacity_in_bytes"`
	NumVms         int     `json:"num_vms"`
	BootTime       float64 `json:"boot_time_in_usecs"`
	Stats          map[string]string
	UsageStats     map[string]string
}

type HostMetadata

type HostMetadata struct {
}

type HostResponse

type HostResponse struct {
	Metadata *HostMetadata
	Entities []HostEntity
}

type Nutanix

type Nutanix struct {
	// contains filtered or unexported fields
}

func NewNutanix

func NewNutanix(url string, username string, password string) *Nutanix

func (*Nutanix) GetCluster

func (n *Nutanix) GetCluster() *Cluster

func (*Nutanix) GetHosts

func (n *Nutanix) GetHosts() []HostEntity

func (*Nutanix) GetStorageContainers

func (n *Nutanix) GetStorageContainers() []StorageEntity

func (*Nutanix) GetVms

func (n *Nutanix) GetVms() []*VmEntity

type NutanixMetadata

type NutanixMetadata struct {
	GrandTotalEntities uint   `json:"grand_total_entities"`
	TotalEntities      uint   `json:"total_entities"`
	FilterCriteria     string `json:"filter_criteria"`
	SortCriteria       string `json:"sort_criteria"`
	Page               uint   `json:"page"`
	Count              uint   `json:"count"`
	StartIndex         uint   `json:"start_index"`
	EndIndex           uint   `json:"end_index"`
}

type RackableUnits

type RackableUnits struct {
	Id               int
	RackableUnitUuid string `json:"rackable_unit_uuid"`
	Model            string
	ModelName        string `json:"model_name"`
	Serial           string
	Positions        []int
	Nodes            []int
	NodeUUids        []string `json:"node_uuids"`
}

type RequestParams

type RequestParams struct {
	// contains filtered or unexported fields
}

type StorageEntity

type StorageEntity struct {
	Id          string
	Name        string
	MaxCapacity uint64 `json:"max_capacity"`
	//	TotalExplicitReservedCapacity	uint64	`json:"total_explicit_reserved_capacity"`
	//	TotalImplicitReservedCapacity	uint64	`json:"total_implicit_reserved_capacity"`
	//	AdvertisedCapacity		uint64	`json:"advertised_capacity"`
	//	ReplicationFactor		uint	`json:"replication_factor"`
	//	OplogReplicationFactor		uint	`json:"oplog_replication_factor"`
	Stats      map[string]string `json:"stats"`
	UsageStats map[string]string `json:"usage_stats"`
}

type StorageResponse

type StorageResponse struct {
	Metadata *NutanixMetadata
	Entities []StorageEntity
}

type VmEntity

type VmEntity struct {
	Name            string
	NumVCpus        float64 `json:"nun_vcpus"`
	NumCoresPerVCpu float64 `json:"num_cores_per_vcpu"`
	MemoryMb        float64 `json:"memory_mb"`
	PowerState      string  `json:"power_state"`
}

type VmMetadata

type VmMetadata struct {
	GrandTotalEntites float64 `json:"grand_total_entities"`
	TotalEntites      float64 `json:"total_entities"`
	Count             float64 `json:"count"`
}

type VmResponse

type VmResponse struct {
	Metadata *VmMetadata
	Entities []*VmEntity
}

Jump to

Keyboard shortcuts

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