openstack-client
v1.0.3
Published
openstack client for nodejs
Downloads
386
Readme
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: '[email protected]'})
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