openstack-client
openstack client for nodejs
Last updated 2 months ago by zf .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install openstack-client 
SYNC missed versions from official npm registry.

openstack-client

openstack client for nodejs

a thin wrapper over the Openstack REST API

also availalble in clojure and elixir

usage

let client = require("openstack-client");
let token = client.authenticate({
    endpoint: "http://keystone/v3",
    name:"admin",
    password: "password",
    userDomainName:"Default",
    projectName:"admin",
    projectDomainName:"Default"
});
client.nova.server.list(token, "RegionOne").then(function(servers) {
    console.dir(servers);
});

normally following methods are defined for a resource

let {keystone: {user}} = client
user.list(token, region)
user.create(token, region, {name: 'bob'})
user.show(token, region, id)
user.update(token, region, {email: 'bob@bob.com'})
user.del(token, region, id)

sometimes, additional methods are defined, like this

server creation is an exception that you have to pass the server key, might be changed in future versions

nova.server.create(token, region, {server: {name: 'vm-101'}})

read the code and consult the Openstack REST API for more details

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 65
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |