# Simple-libvirt
This package is a simple [Libvirt][libvirt_home] [NodeJS][nodejs_home] wrapper.

## Installation
### Dependencies

 * Libvirt
 * NodeJS v0.12.x or higher
 
### Package installation
```Shell
$ npm install --save simple-libvirt
```

### Example of use

```JavaScript
var simple_libvirt = require('simple-libvirt');

var hyperv = simple_libvirt.Hypervisor();
hyperv.connect('test:///default', function(err) {
    if (err)
        console.log('Error: ' + err);
    else
        console.log('Connection succeeded!');
});
```

## API status
Work in progress...

| Command          | Method    | Status |
| :---             | :---      | :---:  |
| Connect to the virt-manager server | `connect` | ✓ |
| Disconnect the current connection | `disconnect` | ✓ |
| Start a domain by his name | `startByName` | ✓ |
| Shutdown a domain by his name | `shutdownByName` | ✓ |
| Delete a domain by his name | `deleteByName` | ✓ |
| Get all domains infos | `getAllDomains` | ✓ |
| Get domain info by his name | `getDomainByName` | ✓ |

## References

The wrappered API propose the very simple libvirt calls, please see:

 * API Reference: http://libvirt.org/html/libvirt-libvirt.html
 * Development Guide: http://libvirt.org/devguide.html

[nodejs_home]: http://www.nodejs.org
[libvirt_home]: http://www.libvirt.org
