cdb package

Submodules

cdb.admin module

Admin settings for CDB app.

Generated by ‘django-admin startproject’ using Django 1.11.6.

For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/

For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/

cdb.apps module

class cdb.apps.CdbConfig(app_name, app_module)

Bases: django.apps.config.AppConfig

Configuration of the application CDB

name = 'cdb'

Name of the application

cdb.models module

cdb.readers module

class cdb.readers.CdbReader

Bases: object

Defines a reader for the CDB

classmethod find_template_range(template_id, templates)

Returns the range of the temaplate

Args:
template_id (string): the themplate of the ID templates (list): list of dictionaries with the templates
Returns:
dict: A range with the numbers of the template (including max and min)
classmethod get_cdb_location()
classmethod read_alarm_iasios()

Reads the IASIOs form the CDB that will become alarms

Returns:
dict: A list of IASIOs data
classmethod read_dasus_outputs(dasus_to_read=[])

Reads the DASU json files and returns a list with all their outputs

Returns:
dict: A list of IASIOs ids
classmethod read_ias()

Reads the ias.json file of the CDB and initializes what is necessary for the application to start

Returns:
dict: A dictionary with the IAS configuration data
classmethod read_iasios_file()

Reads the ioasios.json file with all the IASIOs

Returns:
dict: A list of IASIOs data
classmethod read_supervisors_dasus()

Reads the Supervisor json files and returns a list with all their DASUs

Returns:
dict: A list of DASUs to deploy
classmethod read_templates()

Reads the templates.json file from the CDB and returns its content

Returns:
dict: A list of templates data

cdb.routers module

class cdb.routers.CdbRouter

Bases: object

A router to control all database operations on models of the IAS Core configuration database.

allow_migrate(db, app_label, model_name=None, **hints)

Make sure the config database data only appears in the ‘cdb’ database

allow_relation(obj1, obj2, **hints)

Allow relations only between config database models

db_for_read(model, **hints)

Attempts to read config database models go to cdb

db_for_write(model, **hints)

Attempts to write config database models go to cdb

cdb.serializers module

cdb.urls module

cdb.views module

cdb.views.retrieve_ias(self, request, *args, **kwargs)

Module contents