libvirt-node provides a thin Makefile
on top of npm for convenience.
make clean && make && make check
to clean, generate code and run tests respectively.
Please refer to the wiki.
lib/
entry into the libvirt-node librarytests/
mocha tests for the generated interfacetools/
build system scriptssrc/
top level source files withmain.js
as the entry scriptsrc/generators/
code generators for XML API entriessrc/generators/wrappers
code genenrators for JS interfacessrc/generators/headers
code genenrators for napi headerssrc/generators/impls
code genenrators for napi implementationsrc/generators/exports
code genenrators for napi exports
There are three main scripts that run during make
check_min_libvirt_ver.js
checks the installed libvirt version is>= 0.9.11
api_xml_files.js
exports libvirt-api xmls retrieved using pkg-configsanitytest.js
reports the number and % of implemented API relative to available API
To add a new implementation
-
Add it to
src/whitelist.js
-
override the implementation by registering your custom implementation
wrapper_emitter.register('virMyFunction', data => 'myImplementation(){}');
libvirt-node utilizes http://npmjs.com/package/debug for debugging.
To enable all debugs export DEBUG=*