NodeManager

class caris.bathy.db.NodeManager((object)arg1, (str)username, (str)password, (str)hostname)
create_database((str)database_name, (str)database_location, (str)backup_location) → Database

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
Return type:

The specified Database.

databases

The list of Database names that the NodeManager knows about.

Type:StringList
get_database((str)database_name) → Database

Get the existing Database from the NodeManager.

Parameters:database_name (str) – The name of the Database.
Return type:The specified Database.
get_database_state((str)database_name) → DatabaseState

Get the DatabaseState of a Database from the NodeManager.

Parameters:database_name (str) – The name of the Database.
Return type:The DatabaseState of the specified Database.
hostname

The hostname of the server that houses the NodeManager.

Type:str
password

The password to be used to log into the NodeManager.

Type:str
start_database((str)database_name) → None

Start the specified Database.

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

Stop the specified Database.

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

New in version 4.1.10.

Unregister an existing Database.

Parameters:database_name (str.) – The name of the existing Database to be unregistered.
username

The user name to be used to log into the NodeManager.

Type:str
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 = database.get_status()
if state == caris.bathy.db.DatabaseState.DISABLED:
    print('The database is disabled.')