Modules reference

satnogsconfig

satnogsconfig.config

Configuration module

class satnogsconfig.config.Config(filename)[source]

Manage configuration file

Parameters

filename (str) – File path of configuration

_load_config()[source]

Load and parse YAML configuration

Returns

Configuration dictionary

Return type

dict or NoneType

clear_config()[source]

Clear configuration file

dump_config(to_file=False)[source]

Dump configuration in YAML format

Parameters

to_file (bool, optional) – Dump to file

Returns

YAML configuration

Return type

str

get_variable(variable)[source]

Get variable value from configuration

Parameters

variable (str) – Variable to get the value

Returns

Value of variable

Return type

str or bool or NoneType

set_variable(variable, value)[source]

Set variable value in configuration

Parameters
  • variable (str) – Variable to set the value

  • value (str or bool or NoneType) – Value of variable

satnogsconfig.helpers

Helpers module

class satnogsconfig.helpers.SatnogsSetup[source]

Interract with satnogs-setup

property gr_satnogs_version

Get installed gr-satnogs version

Returns

Version of gr-satnogs

Return type

str

property is_applied

Check whether configuration has been applied

Returns

Whether configuration has been applied

Return type

bool

static restart(boot=False)[source]

Restart satnogs-setup script

Parameters

boot (bool, optional) – Whether to bootstrap or not

property satnogs_client_ansible_version

Get installed SatNOGS Client Ansible version

Returns

Version of SatNOGS Client Ansible

Return type

str

property satnogs_client_version

Get installed SatNOGS Client version

Returns

Version of SatNOGS Client

Return type

str

property tags

Get satnogs-setup tags

Returns

Set of tags

Return type

set

upgrade_system()[source]

Upgrade system packages

class satnogsconfig.helpers.GrSatnogs[source]

Get and set gr-satnogs configuration

property gr_satnogs_version

Get gr-satnogs version

probe_soapysdr()[source]

Probe SoapySDR hardware

class satnogsconfig.helpers.Ansible(ansible_dir)[source]

Call Ansible playbooks

pull(playbooks, url, branch=None, tags=None, extra_args=None)[source]

Pull and run Ansible playbook

Parameters
  • playbooks (list) – List of playbooks

  • url (str) – Git URL to pull playbooks

  • branch (str, optional) – Git branch to pull playbooks

  • tags (list, optional) – List of tags

  • extra_args (list, optional) – List of extra arguments to pass to Ansible

Returns

Whether Ansible execution succeeded

Return type

bool

run(playbooks, tags=None, extra_args=None)[source]

Run Ansible playbook

Parameters
  • playbooks (list) – List of playbooks

  • tags (list, optional) – List of tags

  • extra_args (list, optional) – List of extra arguments to pass to Ansible

Returns

Whether Ansible execution succeeded

Return type

bool

satnogsconfig.menu