node-lxd-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

node-lxd-client

const { LXD } = require('node-lxd-client');
const fs = require('fs');
const path = require('path');

const lxd = new LXD({
    host: 'https://my-private-lxd-server:8443',
    cert: fs.readFileSync(path.resolve(__dirname, '../../.config/lxc/client.crt')),
    key: fs.readFileSync(path.resolve(__dirname, '../../.config/lxc/client.key')),
    password: 'mypassword'
});


lxd.authorizeCertificate()
   .then(data => lxd.image.all())
   .then(data => {
       console.log(data);
   })
   .catch(data => {
       console.error(data);
   });

Readme

Keywords

Package Sidebar

Install

npm i node-lxd-client

Weekly Downloads

5

Version

0.1.4

License

MIT

Unpacked Size

30.6 kB

Total Files

45

Last publish

Collaborators

  • brunnerlivio