mapiserver

package
v1.12.1-RC1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2020 License: Apache-2.0 Imports: 18 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MAPIAddr string

MAPIAddr stores address of mapi server if passed through flag

View Source
var MAPIAddrPort string

MAPIAddrPort stores port number of mapi server if passed through flag

Functions

func ChangeDateFormatToUnixDate

func ChangeDateFormatToUnixDate(snapshotDisks []SnapshotInfo) error

ChangeDateFormatToUnixDate changes the created date from RFC3339 format to UnixDate format

func CreateSnapshot

func CreateSnapshot(volName string, snapName string, namespace string) error

CreateSnapshot creates a snapshot of volume by API request to m-apiserver

func CreateVolume

func CreateVolume(vname, size, namespace string) error

CreateVolume creates a volume by invoking the API call to m-apiserver

func DeleteVolume

func DeleteVolume(vname string, namespace string) error

DeleteVolume will request maya-apiserver to delete volume (vname)

func GetConnectionStatus

func GetConnectionStatus() string

GetConnectionStatus return the status of the connecion

func GetStatus

func GetStatus() (string, error)

GetStatus returns the status of maya-apiserver via http

func GetURL

func GetURL() string

GetURL returns the mapi server address

func Initialize

func Initialize()

Initialize func sets the env variable with local ip address

func ListPools

func ListPools() (*v1alpha1.CStorPoolList, error)

ListPools returns a obj StoragePoolList from api-server

func ListSnapshot

func ListSnapshot(volName string, namespace string) error

ListSnapshot lists snapshots of volume by API request to m-apiserver

func ListVolumes

func ListVolumes(obj interface{}) error

ListVolumes and return them as obj

func Print

func Print(format string, obj interface{}) error

Print binds the object with go template and executes it

func ReadPool

func ReadPool(poolName string) (*v1alpha1.CStorPool, error)

ReadPool returns a obj of StoragePool from api-server

func RevertSnapshot

func RevertSnapshot(volName string, snapName string, namespace string) error

RevertSnapshot reverts a snapshot of volume by API request to m-apiserver

func SortSnapshotDisksByDateTime

func SortSnapshotDisksByDateTime(snapshotDisks []SnapshotInfo)

SortSnapshotDisksByDateTime orders the snapshot disks with respect to date and time

func VolumeStats

func VolumeStats(volName, namespace string) (v1alpha1.VolumeMetricsList, error)

VolumeStats returns the VolumeMetrics fetched from apisever endpoint

Types

type SnapshotInfo

type SnapshotInfo struct {
	Name    string
	Created string
	Size    string
	// Parent keeps most recently saved version of current state of volume
	Parent string
	// Child keeps latest saved version of volume
	Children []string
}

SnapshotInfo stores the details of snapshot

Jump to

Keyboard shortcuts

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