https://github.com/dell/gopowerscale
Go library for Dell PowerScale
https://github.com/dell/gopowerscale
Last synced: 8 months ago
JSON representation
Go library for Dell PowerScale
- Host: GitHub
- URL: https://github.com/dell/gopowerscale
- Owner: dell
- License: apache-2.0
- Created: 2019-11-13T19:24:49.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T12:26:26.000Z (9 months ago)
- Last Synced: 2025-04-18T03:01:18.939Z (9 months ago)
- Language: Go
- Homepage:
- Size: 2.74 MB
- Stars: 11
- Watchers: 19
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# GoIsilon
## Overview
GoIsilon is a Go package that provides a client for the EMC Isilon OneFS HTTP
API. The package provides both direct implementations of the API bindings as
well as abstract, helper functionality. In addition, services such as Docker,
Mesos, and [REX-Ray](http://rexray.readthedocs.io/) use the GoIsilon package
to integrate with the NAS storage platform.
## OneFS API Support Matrix
The GoIsilon package is tested with and supports OneFS 8.1+.
## Examples
The tests provide working examples for how to use the package, but here are
a few code snippets to further illustrate the basic ideas:
### Initialize a new client
This example shows how to initialize a new client.
```go
client, err := NewClient(context.Background())
if err != nil {
panic(err)
}
```
Please note that there is no attempt to provide a host, credentials, or any
other options. The `NewClient()` function relies on the following environment
variables to configure the GoIsilon client:
#### Environment Variables
Name | Description
---- | -----------
`GOISILON_ENDPOINT` | the API endpoint, ex. `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
`GOISILON_VOLUMEPATH_PERMISSIONS` | permissions for new volume directory
`GOISILON_AUTHTYPE` | what should be the auth type, session-based or basic
### Initialize a new client with options
The following example demonstrates how to explicitly specify options when
creating a client:
```go
client, err := NewClientWithArgs(
context.Background(),
"https://172.17.177.230:8080",
true,
1,
"userName",
"groupName",
"password",
"/ifs/volumes",
"0777",
0)
if err != nil {
panic(err)
}
```
### Create a Volume
This snippet creates a new volume named "testing" at "/ifs/volumes/testing".
The volume path is generated by concatenating the client's volume path and the
name of the volume.
```go
volume, err := c.CreateVolume(context.Background(), "testing")
```
### Export a Volume
Enabling a volume for NFS access is fairly straight-forward.
```go
if err := c.ExportVolume(context.Background(), "testing"); err != nil {
panic(err)
}
```
### Delete a Volume
When a volume is no longer needed, this is how it may be removed.
```go
if err := c.DeleteVolume(context.Background(), "testing"); err != nil {
panic(err)
}
```
### More Examples
Several, very detailed examples of the GoIsilon package in use can be found in
the package's `*_test.go` files as well as in the libStorage Isilon
[storage driver](https://github.com/rexray/rexray/blob/master/libstorage/drivers/storage/isilon/storage/isilon_storage.go).
## 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
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
For any issues, questions or feedback, please follow our [support process](https://github.com/dell/csm/blob/main/docs/SUPPORT.md)