Skip to content

Commit db8a7a0

Browse files
WIP - Enumerate function.
1 parent b2c9706 commit db8a7a0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lib/virtualbox.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,10 +643,26 @@ class VboxGuestProperty {
643643
}
644644
}
645645

646+
/**
647+
*
648+
* @param {String} vmname The name of the VM to enumerate guest properties on.
649+
* @param {Function} callback The callback to handle the output.
650+
* @returns {void} The output of stdout will be an array of properties objects.
651+
* {
652+
* "key": "ResumeCounter",
653+
* "value": 0,
654+
* "namespace": "VMInfo",
655+
* "timestamp": 1596902741176896000,
656+
* "flags": ["TRANSIENT", "RDONLYGUEST"]
657+
* }
658+
*/
646659
enumerate(vmname, callback) {
647660
this.vboxmanage(
648661
['guestproperty', 'enumerate', vmname],
649662
(err, stdout, stderr) => {
663+
const arrOfProps = stdout.split('\n');
664+
const arrOfPropsParsed = [];
665+
arrOfProps.forEach((prop) => {});
650666
callback(err, stdout, stderr);
651667
}
652668
);

0 commit comments

Comments
 (0)