unicon.database package


unicon.database.database module

Implements In Memory Object Database

class unicon.database.database.Database(*args, **kwargs)

Bases: object

make this class singleton


makes an os entry by name

create_platform(os_name, platform_name)

create a platform under a given os instance

property data

gets the os entry if it exists or creates one

get_or_create_platform(os_name, platform_name)

gets or creates a platform under an os node


get the os by name


return the list of os’s in the system

get_platform(os_name, platform_name)

get the platform dict based on os name and platform name

get_platform_list(os_name, name_list=False)

get the platform list for a given os


update the os dict in the database, we don’t need any additional information since we have the os name already present in the dict

update_platform(os_name, platform_dict)

update a platform information

Module contents

exception unicon.database.DatabaseError

Bases: Exception

all database related errors