goisilon

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2016 License: Apache-2.0 Imports: 6 Imported by: 11

README

GoIsilon

Overview

GoIsilon represents API bindings for Go that allow you to manage Isilon NAS platforms. In the true nature of API bindings, it is intended that the functions available are basically a direct implementation of what is available through the API. There is however, an abstraction called object which can be used by things like Docker, Mesos, and REX-Ray to integrate Isilon.

API Compatibility

Currently only tested with v7+.

Examples

The package was written using test files, so these can be looked at for a more comprehensive view of how to implement the different functions.

Intialize a new client

c, err := NewClient() // or NewClientWithArgs(endpoint, insecure, userName,
password,volumePath)
if err != nil {
	panic(err)
}

Create a Volume

volume, err := c.CreateVolume("testing")

Export a Volume

err := c.ExportVolume("testing")

Delete a Volume

_, err := c.DeleteVolume(name)

For example usage you can see the REX-Ray repo. There, the goisilon package is used to implement a Volume Manager across multiple storage platforms. This includes managing multipathing, mounts, and filesystems.

Environment Variables

Name Description
GOISILON_ENDPOINT the API endpoint, https://172.17.177.230:8080
GOISILON_USERNAME the username
GOISILON_GROUP the user's group
GOISILON_PASSWORD the password
GOISILON_INSECURE whether to skip SSL validation
GOISILON_VOLUMEPATH which base path to use when looking for volume directories

Contributions

Please contribute!

Licensing

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.

Support

If you have questions relating to the project, please either post Github Issues, join our Slack channel available by signup through community.emc.com and post questions into #projects, or reach out to the maintainers directly. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportsPath

func ExportsPath(p string)

func NamespacePath

func NamespacePath(p string)

func QuotaPath

func QuotaPath(p string)

func SnapshotsPath

func SnapshotsPath(p string)

func VolumeSnapshotsPath

func VolumeSnapshotsPath(p string)

func VolumesPath

func VolumesPath(p string)

Types

type Client

type Client Client1

func NewClient

func NewClient() (*Client, error)

func NewClientWithArgs

func NewClientWithArgs(
	endpoint string,
	insecure bool,
	username, group, password, volumePath string) (*Client, error)

func (*Client) ClearExportClients

func (c *Client) ClearExportClients(name string) error

Clear the list of all clients that can connect to a given volume. This essentially makes the volume accessible by all.

func (*Client) ClearQuota

func (c *Client) ClearQuota(name string) error

ClearQuota removes the quota from a volume

func (*Client) CopySnapshot

func (c *Client) CopySnapshot(sourceId int64, sourceName, destinationName string) (Volume, error)

func (*Client) CopyVolume

func (c *Client) CopyVolume(source_name, destination_name string) (Volume, error)

CopyVolume creates a volume based on an existing volume

func (*Client) CreateSnapshot

func (c *Client) CreateSnapshot(path, name string) (Snapshot, error)

func (*Client) CreateVolume

func (c *Client) CreateVolume(name string) (Volume, error)

CreateVolume creates a volume

func (*Client) DeleteVolume

func (c *Client) DeleteVolume(name string) error

DeleteVolume deletes a volume

func (*Client) Export

func (c *Client) Export(name string) error

Export the volume with a given name on the cluster

func (*Client) ExportVolume

func (c *Client) ExportVolume(name string) error

ExportVolume exports a volume

func (*Client) GetExportClients

func (c *Client) GetExportClients(name string) ([]string, error)

Get a list of all clients allowed to connect to a given volume

func (*Client) GetIsiExport

func (c *Client) GetIsiExport(id, name string) (Export, error)

Gets a specific export (by volume id or name) on a cluster

func (*Client) GetIsiExports

func (c *Client) GetIsiExports() (ExportList, error)

Gets a list of all exports on the cluster

func (*Client) GetQuota

func (c *Client) GetQuota(name string) (Quota, error)

GetQuota returns a specific quota by path

func (*Client) GetSnapshot

func (c *Client) GetSnapshot(id int64, name string) (Snapshot, error)

func (*Client) GetSnapshots

func (c *Client) GetSnapshots() (SnapshotList, error)

func (*Client) GetSnapshotsByPath

func (c *Client) GetSnapshotsByPath(path string) (SnapshotList, error)

func (*Client) GetVolume

func (c *Client) GetVolume(id string, name string) (Volume, error)

GetVolume returns a specific volume by name or ID

func (*Client) GetVolumeExports

func (c *Client) GetVolumeExports() ([]*VolumeExport, error)

GetVolumeExports return a list of volume exports

func (*Client) GetVolumes

func (c *Client) GetVolumes() ([]Volume, error)

GetVolumes returns a list of volumes

func (*Client) NameFromPath

func (c *Client) NameFromPath(path string) string

func (*Client) Path

func (c *Client) Path(name string) string

Path returns the path to a volume

func (*Client) RemoveSnapshot

func (c *Client) RemoveSnapshot(id int64, name string) error

func (*Client) SetExportClients

func (c *Client) SetExportClients(name string, client []string) error

Set the list of clients allowed to connect to a given volume

func (*Client) SetQuotaSize

func (c *Client) SetQuotaSize(name string, size int64) error

SetQuota sets the max size (hard threshold) of a quota for a volume

func (*Client) Unexport

func (c *Client) Unexport(name string) error

Stop exporting a given volume from the cluster

func (*Client) UnexportVolume

func (c *Client) UnexportVolume(name string) error

UnexportVolume stops exporting a volume

func (*Client) UpdateQuotaSize

func (c *Client) UpdateQuotaSize(name string, size int64) error

UpdateQuota modifies the max size (hard threshold) of a quota for a volume

type Client1

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

type Export

type Export *papi.IsiExport

type ExportList

type ExportList []*papi.IsiExport

type Quota

type Quota *papi.IsiQuota

type Snapshot

type Snapshot *papi.IsiSnapshot

type SnapshotList

type SnapshotList []*papi.IsiSnapshot

type Volume

type Volume *papi.IsiVolume

type VolumeExport

type VolumeExport struct {
	Volume     Volume
	ExportPath string
	Clients    []string
}

Directories

Path Synopsis
api
v1
Note: The bulk of this was taken from the goextremio package.
Note: The bulk of this was taken from the goextremio package.

Jump to

Keyboard shortcuts

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