About apiculteur

An overview of the purpose of each module is as follows:

  • ansible_generation handles writing Ansible playbooks and detonating payload scripts.

  • parsing handles CPE parsing, describing VMs and checking json schemas.

  • vagrant_generation handles writing Vagrantfiles.

  • virtualbox_interface provides functions interacting with Virtualbox (for instance to delete VMs or check which networks are available).

This API may be implemented as a PyPi library in the future.

apiculteur

Main module of Apiculteur. Used to convert a procedurally refined scenario (written as a json) into the appropriate Vagrant and Ansible files.

apiculteur.main.build_vagrant_ansible(args)

Builds Vagrant and Ansible files related to the scenario provided in the arguments.

This module does, in order: - Gets the list of all scenarios in the given output directory by parsing and looking for output_scenario.json files. - Clears the previously generated service and install script folders. - Generates Vagrantfiles. - Generates playbooks. - Generates postlaunch scripts (such as payload detonation, not used in CERBERE).

Parameters:

args (Namespace) – the arguments.

Return type:

None

apiculteur.main.clean_target_dir(dest_dir)

Will clear a former Vagrant project by : * Running vagrant destroy * Deleting the old project files

Parameters:

dest_dir (str) – target output directory.

apiculteur.main.verify_target_dir(dest_dir)

Will check if another vagrant project is running inside the target directory. If so it will propose to the user to run vagrant destroy inside this project before generating a new Vagrantfile.

Parameters:

dest_dir (str) – target output directory.

A module responsible for creating ansible tasks and playbooks related to VM objects given as arguments.

These include:
  • Service tasks to start services by specific users.

  • User tasks to create users.

  • File tasks (append to file, append or create, edit, edit or create, copy file, copy directory)

  • Tasks related to package installations (repository keys, update repository, specific tasks for some packages)

  • Inline file tasks to execute commands contained in files.

apiculteur.ansible_generation.ansible_generator.add_key_task(key)

Adds a add_key task in the playbook

Parameters:
  • key (object) – Object expected to the following format :

  • { – “key_id”: “36A1D7869245C8950F966E92D8576A8BA88D21E9” “key_server”: “keyserver.ubuntu.com”

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.add_repo_task(repo)

Adds a add_repo task in the playbook

Parameters:
Return type:

str

apiculteur.ansible_generation.ansible_generator.append_beginning_template_task(file, role_path)

Appends content of template file to destination. :type file: dict :param file: File object. :type role_path: str :param role_path: path of current role.

Return type:

str

apiculteur.ansible_generation.ansible_generator.append_file_task(file)

Adds a task appending the content of the file in argument. :type file: dict :param file: the file whose content to append.

Return type:

str

Returns:

The corresponding ansible playbook task.

apiculteur.ansible_generation.ansible_generator.appendplus_file_task(file)

Adds a task appending the content of the file in argument, and creating it if it doesn’t exist. :type file: dict :param file: the file whose content to append or create.

Return type:

str

Returns:

The corresponding ansible playbook task.

apiculteur.ansible_generation.ansible_generator.aux_install_package(package, role_path)

Specific installation instructions for some packages. :type package: dict :param package: a package. :type role_path: str :param role_path: the root directory of the machine role

apiculteur.ansible_generation.ansible_generator.change_user_permissions(username)

Adds task to change a user permissions to 750 so they do not distract from the rest. Useful to for default users (ubuntu, debian) that come prepackaged with vagrant boxes.

Return type:

str

apiculteur.ansible_generation.ansible_generator.copy_directory_task(file)

Adds a copy_directory task in the playbook We can’t use ansible.copy because it’s so slow on directories, so we use synchronize. But synchronize can’t set permissions so we have to make that a separate task (fun).

Parameters:
  • file (object) – Object expected to the following format :

  • { – “Destination”: “/root/file1”, “Source”: “/full/path/to/file1”, “Owner”: “root”, “Group”: “root”, “Permissions”: “0640”, “before_packages”: True

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.copy_file_task(file)

Adds a copy_file task in the playbook.

Parameters:
  • file (object) – Object expected to the following format :

  • { – “Destination”: “/root/file1”, “Source”: “/full/path/to/file1”, “Owner”: “root”, “Group”: “root”, “Permissions”: “0640”, “before_packages”: True

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.delete_task(file)

Adds a delete_directory (or file) task in the playbook

Parameters:
  • file (object) – Object expected to the following format :

  • { – “Destination”: “/root/file1”, “Source”: “/full/path/to/file1”, “Owner”: “root”, “Group”: “root”, “Permissions”: “0640”, “before_packages”: True

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.edit_file_task(file)

Adds a task editing the contents of the file in argument, by looking for a line containing a specific string and changing its cnotents. :type file: dict :param file: the file whose content to edit.

Return type:

str

Returns:

The corresponding ansible playbook task.

apiculteur.ansible_generation.ansible_generator.editplus_file_task(file)

Adds a task editing the contents of the file in argument, by looking for a line containing a specific string and changing its contents. Creates the file if it does not exist. :type file: dict :param file: the file whose content to edit or create.

Return type:

str

Returns:

The corresponding ansible playbook task.

apiculteur.ansible_generation.ansible_generator.file_task(file, role_path)

Creates an ansible task related to the input file modification type. Raises a ValueError if the type of modification for the file is not recognized. :type file: dict :param file: The file to write a task for. :type role_path: str :param role_path: path of the role (useful for templates)

Return type:

str

Returns:

The ansible playbook task.

apiculteur.ansible_generation.ansible_generator.gen_password_hash(clear_password)

Generates a password hash based on the password given in entry. :type clear_password: str :param clear_password: the entry password.

Return type:

str

Returns:

The hashed password.

apiculteur.ansible_generation.ansible_generator.generate_all_vm_roles(vms, dest_dir, ignore_virtualbox)

Generate a main_playbook.yml from a list of virtual machine objects

Parameters:
  • vms (list[VirtualMachine]) – list of virtual machine to declare

  • dest_dir (str) – Destination root folder.

  • ignore_virtualbox (bool) – will not make us of virtualbox commands (take care of your networks yourself)

apiculteur.ansible_generation.ansible_generator.generate_vm_role(vm, dest_dir, vms, ignore_virtualbox)

Generates role containing tasks for the VM vm. The output will be written in directory dest_dir. :type vm: VirtualMachine :param vm: the VirtualMachine object to write tasks for. :type dest_dir: str :param dest_dir: path of the output directory. :type vms: :param vms: list of all VirtualMachines (useful for vars) :type ignore_virtualbox: :param ignore_virtualbox: ignores virtualbox commands if true (take care of your networks yourself, might break)

Return type:

None

apiculteur.ansible_generation.ansible_generator.inline_files_task(file, role_path)

Takes a file object and uses its information to execute a script from the correct location with the correct privileges on the resulting machine. These files are assumed to be templates.

Args:

file (dict): File object with Destination, Source, Owner, Group, Permissions, before_packages fields. role_path: path of the role (useful for templates)

apiculteur.ansible_generation.ansible_generator.inline_task(inline, user=None)

Ansible task to run inline command

Parameters:
  • inline (str) – command

  • user (Optional[str]) – the user related to the task

Returns:

ansible task

Return type:

str

apiculteur.ansible_generation.ansible_generator.install_package_post_task(package)

Adds post tasks needed to install a package properly (usually inline commands)

Parameters:
  • package (object) – Object expected to the following format :

  • { – “name”: “foo” “version”: “latest”

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.install_package_task(package, role_path)

Adds a install_package task in the playbook

Parameters:
  • role_path (str) – the root directory of the role

  • package (object) – Object expected to the following format :

  • { – “name”: “foo” “version”: “latest”

  • }

Return type:

str

apiculteur.ansible_generation.ansible_generator.port_task(port_name)

Adds a task to opena port on firewall.

Parameters:

port_name (str) – the name of the port to open.

Return type:

str

Returns:

The corresponding ansible task.

apiculteur.ansible_generation.ansible_generator.pre_task()

Adds tasks that have to be added to every machine. For now this only changes the timezone of the machines to match the one of the host. :rtype: str

Returns:

A string containing the relevant ansible playbook code.

apiculteur.ansible_generation.ansible_generator.restart_service_task(service_name)

Adds a task to restart a service.

Parameters:

service_name (str) – the name of the service to restart.

Return type:

str

Returns:

The corresponding ansible task.

apiculteur.ansible_generation.ansible_generator.service_task(user, service, role_path)

Adds a create_service task in the playbook. This will be called by user_task if the [“Service”] key in the user is not empty. This first adds a script to be executed by the service, then the service file to the proper directory, then calls ansible builtin service to run it and enable it on reboot. Note: SSH is a special case for now, as this service is available by default. If a User constraint specifies SSH, it means that constraint is asking for a SSH restart.

Parameters:
  • user (dict) – A dictionary representing all user constraints.

  • service (str) – the name of the service.

  • role_path (str) – the root directory of the machine role

Return type:

str

Returns:

A string containing the relevant ansible playbook code.

apiculteur.ansible_generation.ansible_generator.uninstall_ubuntu_advantage()

Adds task to uninstall ubuntu advantage package. This is done in order to avoid getting 401 errors on old Ubuntu versions while installing packages, as it will otherwise try to install package versiosn only available for ubuntu premium paid users. :rtype: str :returns: A string corresponding to an ansible playbook tasK.

apiculteur.ansible_generation.ansible_generator.user_task(user)

Adds a create_user task in the playbook. If the user has SuperUser privileges, adds a playbook command to add him to sudoers. :type user: :param user: A dictionary representing all user constraints.

Return type:

str

Returns:

a string corresponding to the relevant ansible playbook commands.

apiculteur.ansible_generation.ansible_generator.write_template_task(file, role_path)

Adds a copy_file task in the playbook. The file will be put as a template.

Parameters:
  • file (object) – Object expected to the following format :

  • role_path (str) – path of the current role

  • { – “Destination”: “/root/file1”, “Source”: “/full/path/to/file1”, “Owner”: “root”, “Group”: “root”, “Permissions”: “0640”, “before_packages”: True

  • }

Return type:

str

Utility functions to link Vagrant and VM objects.

apiculteur.ansible_generation.interface_vagrant.get_vm_playbook_name(vm)

Gets the playbook name of the related VM object. :type vm: VirtualMachine :param vm: a VirtualMachine object.

Return type:

str

Returns:

The name of the playbook related to the VM.

Functions related to actions to perform post launch, such as detonating payloads. NOTE: this hasn’t been tested since CERBERE deployment and might be broken.

apiculteur.ansible_generation.post_launch_scripts.post_launch_payload_detonation(vms)

Handles post launch commands for VMs, such as for instance detonating paylods. NOTE: this hasn’t been tested in a while and might be broken. :type vms: list :param vms: a list of VM objects

Return type:

None

Parses the JSON scenario file and generate the right configuration

apiculteur.parsing.parser.check_vm_name_format(name)

Check vms name format. Errors and Exits if it does not match.

Parameters:

name (str) – Name of the vm

apiculteur.parsing.parser.check_vm_name_unicity(vms)

Check vms name unicity and correct if needed

Parameters:

vms (list[VirtualMachine]) – list of virtual machine to check

apiculteur.parsing.parser.json_open(path)

Utility function to load jsons. :type path: :param path: path of the json file.

Return type:

dict

Returns:

A dictionary corresponding to the contents of the json.

apiculteur.parsing.parser.open_and_validate_json(path)

Opens json at path. Verify its syntax.

Parameters:

path (str) – path to the json file

Return type:

tuple[dict, bool]

Returns:

(parsed_json, is_valid)

is_valid == True => the json corresponds to the schema

is_valid == False => the json presented an error while parsing

apiculteur.parsing.parser.parse_file_inline_commands(vm, files, path_to_scenario, before_packages=False)

Parses files into a VirtualMachine object, except it adds them as inline commands. This means that the content of the files will be copied, executed then deleted in the VM as opposed to just copied.

Parameters:
  • vm (VirtualMachine) – the virtual machine object to edit.

  • files (list[dict]) – the list of files to parse.

  • path_to_scenario (str) – the path to the scenario.

  • before_packages (bool) – whether the files should be added before packages are installed.

apiculteur.parsing.parser.parse_files(vm, files, path_to_scenario, before_packages=False)

Parses files into a VirtualMachine object.

Parameters:
  • vm (VirtualMachine) – the virtual machine object to edit.

  • files (list[dict]) – the list of files to parse.

  • path_to_scenario (str) – the path to the scenario.

  • before_packages (bool) – whether the files should be added before packages are installed.

apiculteur.parsing.parser.parse_networks(vm, network_names)

Parses a list of network names into the entry VirtualMachine object.

Parameters:
  • vm (VirtualMachine) – the virtual machine to be edited.

  • network_names (list[str]) – a list of networks to be parsed.

apiculteur.parsing.parser.parse_os(vm, os_cpe)

Parse the OS of a given VirtualMachine object. This converts the name of the OS into the name of an Vagrantbox corresponding to said OS. If a version match wasn’t found, it will take the closest version possible.

Parameters:
  • vm (VirtualMachine) – the virtual machine to be edited.

  • os_cpe (str) – the os type and version written in CPE form.

Return type:

bool

Returns:

True if the parsing was successful, False otherwise.

apiculteur.parsing.parser.parse_software(vm, software, called_from_cpe=False)

Parses software into the VirtualMachine object.

Parameters:
  • vm (VirtualMachine) – the virtual machine to be edited.

  • software (dict) – the software object to be pared.

  • called_from_cpe (bool) – debug argument, don’t touch unless you know what you are doing.

apiculteur.parsing.parser.parse_vm(vm, vm_object, path_to_scenario)

Parses the vm_object :type vm: VirtualMachine :param vm: VirtualMachine object to complete :type vm: VirtualMachine :type vm_object: dict :param vm_object: Contains all the information for the VM to be provided and provisioned. :type vm_object: dict :param It should have been validated by parsing.validator functions first.: :type path_to_scenario: str :param path_to_scenario: path to the scenario JSON file. :type path_to_scenario: str :param It is used in order to verify the existences of the files that are to be copied by the provisioner: :param onto the generated virtual machines.:

apiculteur.parsing.parser.parse_vms_from_json(path_to_scenario, scenario_number, vm_names_already_used, total_number_of_scenario, ignore_virtualbox)

Parses every VM as coded in the path_to_scenario json into a list of vm objects. This also keeps track of which VM names were already used in the past. This is useful when converting the same scenario n times (otherwise VMs would share names and network names). For instance, when deploying the same scenario twice, if machine zagreus was already generated the second one will be named zagreus2.

Parameters:
  • path_to_scenario (str) – the path to the scenario.

  • scenario_number (int) – the numbering of the current scenario. Useful in order to create new network names for each

  • scenario.

  • vm_names_already_used (list[str]) – kust if vm names that if encountered need to be changed.

  • total_number_of_scenario (int) – the number of scenario_i directories that have been generated

  • ignore_virtualbox (bool) – if True will not check whether a given machine name already exists

Return type:

list

apiculteur.parsing.parser.scenario_format_conversion(scenario_path, scenario_number, vm_names_already_used, total_number_of_scenario)

Converts the json scenario format (as output by Chouchen) into one acceptable by Apiculteur. Result will be output as path output_scenario.json in the same directory as the input. :type scenario_path: str :param scenario_path: path of the scenario. :type scenario_number: int :param scenario_number: number of the scenario currently being refined (useful to keep track of directory names when we refine more than one at once). :type vm_names_already_used: list :param vm_names_already_used: list of vm names already used (useful when refining more than one at once). :type total_number_of_scenario: int :param total_number_of_scenario: how many scenarios have been refined in total (useful for names)

Return type:

str

[EN] This script will validate the scheme and types of the JSON scenario ————————————————————————————————————- Ce script va valider le schéma et le typage du scénario JSON [FR]

pip install jsonschema

apiculteur.parsing.validator.validate_json_scenario(j)

Validates the entry json scenario based on the schme astored in ./new_schema.json :type j: object :param j: the dictionary to check against the schmema.

Return type:

bool

Returns:

True if the schema is valid, False otherwise.

Object representing a Virtual Machine.

class apiculteur.parsing.VM.VirtualMachine

A class to represent Virtual Machine objects. These will then be converted into ansible playbooks and tasks. .. attribute:: name

the name of the machine.

image

the name of the ansible image.

users

a list of users.

network_names

a list of network names.

files

a list of file objects.

packages

a list of packages.

repos

a list of repos.

keys

a list of repo keys.

inline_commands

a list of inline commands.

inline_file_commands

a list of inline file commands.

postlaunch_commands

a list of postlaunch commands (think payload detonation).

used_ports

a list of used ports.

add_file(dst, full_path_src, owner, group, perm, modif, before_packages)

Add a file entry to the VM with the provided arguments.

Parameters:
  • dst (str) – destination on the guest

  • full_path_src (str) – full path source on the host

  • owner (str) – owner

  • group (str) – group

  • perm (str) – Permissions for the file (Unix format)

  • before_packages (bool) – Copy before packages or not

  • modif (str) – modification to do to the file (edit/append/write)

add_file_inline_command(dst, full_path_src, owner, group, perm, modif, before_packages)

Adds a file inline command to the VM object. :type dst: str :param dst: destination on the guest :type dst: str :type full_path_src: str :param full_path_src: full path source on the host :type full_path_src: str :type owner: str :param owner: owner :type owner: str :type group: str :param group: group :type group: str :type perm: str :param perm: Permissions for the file (Unix format) :type perm: str :type before_packages: bool :param before_packages: Copy before packages or not :type before_packages: bool :type modif: str :param modif: modification to do to the file (edit/append/write)

add_inline_command(inline)

Adds inline command to the VM object. :type inline: str :param inline: the inline command to add.

add_keys(key_id, key_server)

Add a repo keys to the VM with the provided arguments.

Parameters:
  • key_id (*) – key of the repository

  • key_server (*) – server where get the key

add_package(name, version, service_name='')

Add a package to the VM with the provided arguments.

Parameters:
  • name (*) – name of the package

  • version (*) – version of the package, also use to know the type (.deb/url/…)

  • service_name (*) – name of the service associated to the package if exists

add_port(port_string)

Adds port value to attirbute list of used ports.

Return type:

None

add_postlaunch_command(command)

Adds postlaunch command to the VM object. :type command: dict :param command: the postlaunch command to add.

add_repo(repo)

Add a repository to the VM with the provided arguments.

Parameters:

repo (*) – link of the repository

get_files()

Return files to be provisioned on the virtual machine

Returns:

list of files object.

Return type:

list[object]

get_image()

Gets value of image attribute.

Return type:

str

get_inline_commands()

Getter for inline commands attribute. :rtype: list[str] :returns: attribute inline_commands.

get_inline_file_commands()

Getter for inline_file_commands attribute. :rtype: list[dict] :returns: the inline_file_commands attribute of the VM.

get_ip(provision_network)

Gets the IP of the VM inside the network indicated by the argument. This is done by using the VNM module. Uses VirtualBox. :type provision_network: str :param provision_network: the related provision network.

Return type:

str

Returns:

the ip of the VM.

get_keys()

Return keys to be provisioned on the virtual machine.

This will be a list of key_id, key_server objects. For instance: [{“key_id”: “36A1D7869245C8950F966E92D8576A8BA88D21E9”, “key_server”: “keyserver.ubuntu.com”}].

Returns:

list of keys object (includes key_id and key_server)

Return type:

list[object]

get_packages()

Return packages to be provisioned on the virtual machine. For instance, [{ “name”: “foo”, “version”: “latest”}]

Returns:

list of packages object.

Return type:

list[object]

get_postlaunch_commands()

Getter for postlaunch_commands attribute. :rtype: list[dict] :returns: attribute postlaunch_commands.

get_provision_networks()

Gets the list of all provision networks of the VM. Done by asking the VNM module. Uses VirtualBox.

Return type:

list[str]

Returns:

The list of all provision networks of the VM.

get_repos()

Return repositories to be provisioned on the virtual machine For instance: [{“repo”: “deb http://archive.canonical.com/ubuntu hardy partner”}] :returns: list of repositories object. :rtype: list[object]

get_services_names()

Gets all the service names of the VM object. :rtype: list[str] :returns: The list of all service names.

get_used_ports()

Return ports used.

Returns:

list of files object.

Return type:

list[object]

get_users()

Returns the list of users of the VM.

Return type:

list

set_image(image)

Sets value of image attribute. :type image: str :param image: the value to set.

Utility module to communicate between Ansible, Vagrant and VM objects.

apiculteur.vagrant_generation.interface_ansible.ansible_provisioning_vm(vm)

Write Vagrant instructions to provide the given VM. 2.0 compatibility mode avoids some stupid error messages. :type vm: VirtualMachine :param vm: the virtual machine to provide.

Return type:

str

apiculteur.vagrant_generation.interface_ansible.get_playbook_path(vm)

Gets the path of a given VM object’s playbook. :type vm: VirtualMachine :param vm: the virtual machine whose playbook path to get.

Return type:

str

Module generating Vagrantfiles. Unlike ansible_generator there should be no need to edit this module when adding new procedures, unless you want to add new network functionalities.

apiculteur.vagrant_generation.vagrant_generator.command_to_vagrant(vm, command, msg)

Manually runs commands on the given VM object using Vagrant.

Parameters:
  • vm (VirtualMachine) – the relevant VirtualMachine object.

  • command (str) – the command to run

  • msg (str) – the message to show when the command is being ran.

apiculteur.vagrant_generation.vagrant_generator.configure_networks(vm)

Configures networks for the given VM object. :type vm: VirtualMachine :param vm: the virtual machine to configure.

Return type:

str

Returns:

the VagrantFile code that configures the networks.

apiculteur.vagrant_generation.vagrant_generator.generate_vagrantfile(vms, dest_dir)

Generate a Vagrantfile from a list of virtual machine objects

Parameters:
  • vms (list[VirtualMachine]) – list of virtual machine to declare

  • dest_dir (str) – Destination root folder.

apiculteur.vagrant_generation.vagrant_generator.generate_yaml(vms, dest_dir)

Generates Not used in the publicly available implementation. This was used for the real life CERBERE experiment.

Parameters:
  • vms (list[VirtualMachine]) – the list of VM objects.

  • dest_dir (str) – the destination directory of the yml.

apiculteur.vagrant_generation.vagrant_generator.vm_to_vagrant(vm, dest_dir)

Converts a given VM object into a Vagrantfile.

Parameters:
  • vm (VirtualMachine) – the VirtualMachine object.

  • dest_dir (str) – the destination directory for the Vagrantfile.

Return type:

str

Module managing the interfacing with VirtualBox. In particular, this can stop, start, delete, and get current VM names by calling vboxmanage commands.

apiculteur.virtualbox_interface.manage.check_vm_name(vmname)

List VMs and check if a vm already exist with the given name. If so, returns a new name by appeding a number on it. Used in parser to check whether VMs already exist or not;

apiculteur.virtualbox_interface.manage.delete_nat(vmname)

Delete nat network. Currently unused.

Parameters:

vmname (str) – name of the VM whose network to delete.

apiculteur.virtualbox_interface.manage.start_vm(vmname)

Start VM. Currently unused.

Parameters:

vmname (str) – name of the VM to start.

apiculteur.virtualbox_interface.manage.stop_vm(vmname)

Stop VM. Currently unused.

Parameters:

vmname (str) – name of the VM to stop.

[EN] This script allows the project to list the networks necessary to later interact with VirtualBox to list and create missing virtual networks. ————————————————————————————————————- Ce script permet au projet de lister les réseaux nécessaires pour ensuite intéragir avec VirtualBox pour lister et créer les réseaux virtuels nécessaires. [FR]

class apiculteur.virtualbox_interface.VNM.VirtualNetworkManager

This class uses VBoxManage logic and assumes that virtualbox networks are going to be used. If virtualbox stopped behing part of the provider, this class must be updated.

create_virtual_provision_networks()

Creates virtual provision networks. This is done by: :rtype: None

  • Counting the amount of missing networks.

  • Creating the necessary amount of virtual networks.

  • Verifying that all virtual networks are available as they should be.

get_free_ip_address_for_network(prov_network)

Takes the name of a provision network as an argument.

Example: “vboxnet0”

Return type:

IPv4Address

get_provision_network(network_name)

Gets provision network name based on the given network name. :type network_name: :param network_name: the network name.

Return type:

str

maybe_add_network(network_name)

Adds a network unless the maximum count of networks is reached.

Parameters:

network_name (str) – the name of the network to add.

apiculteur.virtualbox_interface.VNM.catch_network_list()

Get the network list in a array form. This is done by asking virtualbox directly which networks it has available and parsing the result.

Return type:

list[dict[(name, str), (ip_addr, str)]]

Returns:

a list of network names and IP addresses.

apiculteur.virtualbox_interface.VNM.create_vboxnet(number=1)

Create the necessary number of vboxnet.

Parameters:

number (int) – number of networks to create.

apiculteur.virtualbox_interface.VNM.delete_vboxnet()

Delete all vboxnets. Careful about using this if you have current experiments running.

Return type:

None