hpe-onesphere-js
Javascript bindings to the HPE OneSphere REST API.
Usage
Install dependency
npm i @hpe/hpe-onesphere-js
Example usage
import OneSphere from '@hpe/hpe-onesphere-js';
const oneSphere = new OneSphere(host);
oneSphere.postSession({ username: ..., password: ... })
.then(() => oneSphere.getSession())
.then(session => console.log('Session:', session));
APIs
Appliances
getAppliance(uri, args)
getAppliances(args)
addAppliance(data, args)
updateAppliance(uri, data, args)
removeAppliance(uri, args)
Billing Accounts
getBillingAccount(uri, args)
getBillingAccounts(args)
addBillingAccount(data, args)
updateBillingAccount(uri, data, args)
removeBillingAccount(uri, args)
Catalogs
getCatalog(uri, args)
getCatalogs(args)
addCatalog(data, args)
updateCatalog(uri, data, args)
getCatalogTypes(args)
Connect App
getConnectApp(args)
Deployments
getDeployment(uri, args)
getDeployments(args)
addDeployment(data, args)
updateDeployment(uri, data, args)
removeDeployment(uri, args)
actionOnDeployment(uri, data, args)
getDeploymentConsole(uri, args)
getDeploymentKubeconfig(uri, args)
Keypairs
getKeyPair(args)
Memberships
getMemberships(arg)
addMembership(data, args)
removeMembership(uri, args)
getMembershipRoles(args)
Metrics
getMetrics(args)
Networks
getNetwork(uri, args)
getNetworks(args)
updateNetwork(uri, data, args)
Password Reset
resetSingleUsePassword(data, args)
changePassword(data, args)
Projects
getProject(uri, args)
getProjects(args)
addProject(data, args)
updateProject(uri, data, args)
Providers
getProvider(uri, args)
getProviders(args)
addProvider(data, args)
updateProvider(uri, data, args)
removeProvider(uri, args)
getProviderTypes(args)
Rates
getRate(uri, args)
getRates(args)
Regions
getRegion(uri, args)
getRegions(args)
addRegion(data, args)
updateRegion(uri, data, args)
removeRegion(uri, args)
getRegionConnection(uri, args)
addRegionConnection(uri, data, args)
removeRegionConnection(uri, args)
getRegionConnectorImage(uri, args)
Roles
getRole(uri, args)
getRoles(args)
Services
getService(uri, args)
getServices(args)
getServiceType(args)
getServiceTypes(args)
Sessions
getSession(args)
postSession({ username, password })
getSessionSSO(args)
callbackSessionSSO(args)
Status
getStatus(args)
Tag Keys
getTagKey(uri, args)
getTagKeys(args)
addTagKey(data, args)
removeTagKey(uri, args)
Tags
getTag(uri, args)
getTags(args)
addTag(data, args)
removeTag(uri, args)
Users
getUser(uri, args)
getUsers(args)
addUser(data, args)
updateUser(uri, data, args)
removeUser(uri, args)
Version
getVersion(args)(args)
Virtual Machine Profiles
getVirtualMachineProfile(uri, args)
getVirtualMachineProfiles(args)
Volumes
getVolume(uri, args)
getVolumes(args)
addVolume(data, args)
updateVolume(uri, data, args)
removeVolume(uri, args)
Zones
getZone(uri, args)
getZones(args)
addZone(data, args)
updateZone(uri, data, args)
removeZone(uri, args)
actionOnZone(uri, data, args)
getZoneApplianceImage(uri, args)
getZoneTaskStatus(uri, args)
getZoneConnections(uri, args)
addZoneConnection(uri, data, args)
updateZoneConnection(uri, data, uuid, args)
removeZoneConnection(uri, uuid, args)
getZoneEndpoint(uri, args)
getZoneTypes(args)
getZoneTypeResourceProfiles(uri, args)
Development
Install
yarn install
Test
npm test
The tests are full integration tests and require the following environment variables:
ONESPHERE_URL='https://my.onesphere.com'
ONESPHERE_USERNAME='eric.soderberg@hpe.com'
ONESPHERE_PASSWORD='...'