package module
v0.0.0-...-4c6f6f9 Latest Latest

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

Go to latest
Published: Mar 30, 2018 License: MIT Imports: 11 Imported by: 3



Dell EMC Unity package that provides API bindings for Go.


Initialize a new Unity session

server := "myunity.example.com"
insecure := true
username := "myuser"
password := "mypassword"

session, err := gounity.NewSession(server, insecure, username, password)
if err != nil {

Get Unity's DNS configuration

err = session.GetDNSServer()
if err != nil {

Create a realtime metric's query

// metric paths
paths := []string{

// metric interval in second
var interval uint32
interval = 60

Metric, err := session.NewMetricRealTimeQuery(paths, interval)
if err != nil {


Erwan Quélin


Copyright 2017 Erwan Quelin and the community.

Licensed under the MIT License.




This section is empty.


This section is empty.


func EncodeCredentials

func EncodeCredentials(username string, password string) string

EncodeCredentials purpose is to encode the Username and Password with base64 encoding which is required for UNITY

func URL

func URL(server string, URI string) string

URL purpose is to return the main entry point for the UNITY API


type Session

type Session struct {
	// contains filtered or unexported fields

Session struct

func NewSession

func NewSession(server string, insecure bool, username string, password string) (*Session, error)

NewSession purpose is to build a session object and authenticate to the Unity array

func (*Session) CloseSession

func (session *Session) CloseSession() (err error)

CloseSession purpose is to end the session with the Unity array.

func (*Session) DeleteMetricRealTimeQuery

func (session *Session) DeleteMetricRealTimeQuery(queryID int) error

DeleteMetricRealTimeQuery purpose is to delete a real time query.

func (*Session) GetDNSServer

func (session *Session) GetDNSServer() (resp *types.DNSServer, err error)

GetDNSServer purpose is to get the DNS configuration of the Unity array.

func (*Session) GetMetricRealTimeQueryResult

func (session *Session) GetMetricRealTimeQueryResult(queryID int) (resp *types.MetricRealTimeQueryResult, err error)

GetMetricRealTimeQueryResult tototo

func (*Session) GetPool

func (session *Session) GetPool() (resp *types.Pool, err error)

GetPool purpose is to get information about pool in the storage system. .

func (*Session) GetStorageResource

func (session *Session) GetStorageResource() (resp *types.StorageResource, err error)

GetStorageResource purpose is to get information about storage resources in the storage system.

func (*Session) GetbasicSystemInfo

func (session *Session) GetbasicSystemInfo() (resp *types.BasicSystemInfo, err error)

GetbasicSystemInfo Provides access to system model, system name, software version, and API version information.

func (*Session) GetkpiValue

func (session *Session) GetkpiValue(path string) (resp *types.KpiValueResponse, err error)

GetkpiValue Historical values for requested metrics

func (*Session) GetmetricValue

func (session *Session) GetmetricValue(path string) (resp *types.MetricValueResponse, err error)

GetmetricValue Historical values for requested metrics

func (*Session) NewMetricRealTimeQuery

func (session *Session) NewMetricRealTimeQuery(paths []string, interval uint32) (resp *types.MetricRealTimeQueryResponse, err error)

NewMetricRealTimeQuery purpose is to create a real time query.

func (*Session) Request

func (session *Session) Request(method string, URI string, fields string, filter string, engineering bool, body, resp interface{}) error

Request purpose is to send a Rest API request to the Unity array.


Path Synopsis

Jump to

Keyboard shortcuts

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