linux.ubuntu

This Model Component provides an UbuntuHost object that has functionality common to all versions of Ubuntu. This notably includes a function to install debian packages.

Model Component Dependencies:

Available Objects

class linux.ubuntu.UbuntuDesktop(*args, **kwargs)[source]

Bases: object

This is an abstract decorator which can be used to distinguish if a VM is running a Ubuntu Desktop or Server.

__init__(*args, **kwargs)
class linux.ubuntu.UbuntuHost(*args, **kwargs)[source]

Bases: object

This object provides a generic abstraction for all Ubuntu-based VMs. Any VM resource or method that could apply broadly to Ubuntu systems should be contained within this MC.

__init__(*args, **kwargs)
add_debug_debs()[source]

Installs debian packages that are useful for debugging purposes, including htop and parallel-ssh.

add_default_profiles()[source]

Adds default ssh keys, .bashrc, .vimrc, etc. Also configures the VM to allow the ubuntu user to use passwordless sudo.

default_user = 'ubuntu'
home_path = PosixPath('/home/ubuntu')
install_debs(time, debfile)[source]

Installs a debian package.

Parameters:
  • time (int) – Experiment time at which to install the package.

  • debfile (str) – The file to be installed. This can be either a .deb file or a tarball containing multiple .deb files. No additional path information should be provided. However, the .deb file/tarball must be provided by a model component used in the experiment (i.e. it must be referenced in a MANIFEST file).

class linux.ubuntu.UbuntuServer(*args, **kwargs)[source]

Bases: object

This is an abstract decorator which can be used to distinguish if a VM is running a Ubuntu Desktop or Server.

__init__(*args, **kwargs)