ducky.config module¶
VM configuration management
-
class
ducky.config.
MachineConfig
(*args, **kwargs)[source]¶ Bases:
ConfigParser.ConfigParser
Contains configuration of the whole VM, and provides methods for parsing, inspection and extending this configuration.
-
_MachineConfig__count
(prefix)¶
-
_MachineConfig__count_breakpoints
()¶
-
_MachineConfig__count_devices
()¶
-
_MachineConfig__count_mmaps
()¶
-
_MachineConfig__sections_with_prefix
(prefix)¶
-
_boolean_states
= {'1': True, 'on': True, 'false': False, '0': False, 'off': False, 'yes': True, 'no': False, 'true': True}¶
-
add_device
(klass, driver, **kwargs)[source]¶ Add another device to the configuration.
Parameters: - klass (string) – class of the device (
klass
option). - driver (string) – device driver - dot-separated path to class (
driver
option). - kwargs – all keyword arguments will be added to the section as device options.
- klass (string) – class of the device (
-
add_storage
(driver, sid, filepath=None)[source]¶ Add another storage to the configuration.
Parameters: - driver (string) – storage’s driver - dot-separated path to class (
driver
option). - sid (int) – storage’s SID (
sid
options). - filepath (string) – path to backend file, if there’s any (
filepath
option).
- driver (string) – storage’s driver - dot-separated path to class (
-