Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

openstack-client

1.0.3 • Public • Published

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

Keywords

install

npm i openstack-client

Downloadsweekly downloads

176

version

1.0.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar