NodeManager

class caris.bathy.db.NodeManager

An Interface to a Bathy Nodemanager

hostname

str – The hostname of the server that hosts the NodeManager

username

str – The username of the specified account

password

str – The password of the specified account

databases

list of str – The list of Database names registered on the NodeManager

create_database((NodeManager)self, (str)database_name, (str)database_location, (str)backup_location[, (object)pool_file=None[, (object)profile_file=None]]) → Dataset :

Create a new Database.

Parameters:
  • database_name (str) – The name to give the new Database.
  • database_location (str) – The path for the new Database. Must be a value from the filesystemtable.bfs. e.g.: Root/databases
  • backup_location (str) – The path for the Database backup. Must be a value from the filesystemtable.bfs. e.g.: Root/databases
  • pool_file (str, optional) – The path to an override XML pool file. Only used if the profile_file is also specified
  • profile_file (str, optional) – The path to an override XML profile file. Only used if the pool_file is also specified
Returns:

The specified database.

Return type:

Database

get_database((NodeManager)self, (str)database_name) → Dataset :

Get the existing Database from the NodeManager.

Parameters:database_name (str) – The name of the Database.
Returns:A Dataset for the database
Return type:Database
get_database_state((NodeManager)self, (str)database_name) → DatabaseState :

Get the DatabaseState of a Database from the NodeManager.

Parameters:database_name (str) – The name of the Database.
Returns:The state of the database.
Return type:DatabaseState
start_database((NodeManager)self, (str)database_name) → None :

Start the specified Database.

Parameters:database_name (str) – The name of the Database.
stop_database((NodeManager)arg1, (str)database_name) → None :

Stop the specified Database.

Parameters:database_name (str) – The name of the Database.
unregister_database((NodeManager)self, (str)database_name) → None :

Unregister an existing Database.

Parameters:database_name (str) – The name of the existing Database to be unregistered.
class caris.bathy.db.DatabaseState

This class represents the states of the Bathy Database.

  • UNKNOWN
  • STARTING
  • STARTED
  • STOPPING
  • STOPPED
  • DISABLED
  • START_FAILED

For example:

state = node_manager.get_database_state('My Database')
if state == caris.bathy.db.DatabaseState.DISABLED:
    print('The database is disabled.')