From 14df7415b7eb688f7fc58aaf1b92a19b9718ab05 Mon Sep 17 00:00:00 2001 From: ramyelkest <4thkest@gmail.com> Date: Sun, 27 May 2018 16:38:49 -0700 Subject: [PATCH] Generating getVcpusFlags as an example/poc --- src/whitelist.js | 1 + test/domain.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/whitelist.js b/src/whitelist.js index 2cbb2bd..ced533f 100644 --- a/src/whitelist.js +++ b/src/whitelist.js @@ -6,6 +6,7 @@ let allowed_functions = { 'virDomainGetID': 'domain', 'virDomainCreateXML': 'host', 'virDomainGetOSType': 'domain', + 'virDomainGetVcpusFlags': 'domain', }; module.exports = { diff --git a/test/domain.test.js b/test/domain.test.js index 54930d2..f49f342 100644 --- a/test/domain.test.js +++ b/test/domain.test.js @@ -26,4 +26,5 @@ let test_xml = ` let conn = libvirt.open('test:///default'); let domain = conn.createXML(xml, 0); assert.strictEqual(domain.getOSType(), "linux"); + assert.strictEqual(domain.getVcpusFlags(0), 1); })(test_xml); \ No newline at end of file