# README
seagate-exos-x-api-go
A Go implementation of the Seagate EXOS X API.
Test Using A Live System
This option runs the Go language test cases against a live storage system. Two steps are required:
- Update .env with the correct system IP Address and credentials
- Run
go test -v
Another option is to define environment variables, which take precedence over .env values
- export TEST_STORAGEIP=http://[ipaddress]
- export TEST_USERNAME=[username]
- export TEST_PASSWORD=[password]
- export TEST_INITIATOR=[initiator]
- export TEST_POOL=[pool]
- Run
go test -v
- unset TEST_STORAGEIP TEST_PASSWORD TEST_USERNAME TEST_INITIATOR TEST_POOL
To just validate all API calls against a specified target
- export TEST_STORAGEIP=http://[ipaddress]
- export TEST_USERNAME=[username]
- export TEST_PASSWORD=[password]
- export TEST_INITIATOR=[initiator]
- export TEST_POOL=[pool]
- Run
go test -v -run TestAPI
- unset TEST_STORAGEIP TEST_PASSWORD TEST_USERNAME TEST_INITIATOR TEST_POOL
Test Using a Mock Server
Using node.js
You can run tests with docker-compose:
docker-compose up --build --abort-on-container-exit --exit-code-from tests
Using node.js
In order to run tests against a mock server, you will need to install node.js and npm to run the mock server. When it's done, go to the mock
directory, install dependencies and start the mock server.
cd ./mock
npm install
npm run start
- Update .env with an IP Address of
localhost:8080
and correct credentials - You're now ready to go, just run
go test -v
to run the tests suite.
# Functions
AddSystem: Uses the client to query and store system data.
GetSystem: Return the System data object correspoinding to the IP Address.
NewClient : Creates an API client by setting up its HTTP transport.
NewErrorStatus : Creates an error status when response is not available.
NewResponse : Unmarshals the raw data into a typed response object and generate a hash map from fields for optimization.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Configuration constants.
# Structs
Client : Can be used to request the API.
No description provided by the author
No description provided by the author
No description provided by the author
Object : Typed representation of any XML API object.
PoolType: Linear or virtual pool attributes.
PortType: Storage system port attributes.
Property : Typed representation of any XML API property.
Request : Used internally, and can be used to send custom requests (see Client.Request()).
Response : Typed representation of any XML API response.
ResponseStatus : Final representation of the "status" object in every API response.
System: Information stored for a storage array controller.
SystemsData: Information stored multiple storage array controllers.
Volume : volume-view representation.
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author