NodeManager¶
- class caris.bathy.db.NodeManager¶
An Interface to a Bathy 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_location (
str) – The path for the newDatabase. Must be a value from the filesystemtable.bfs. e.g.: Root/databasesbackup_location (
str) – The path for theDatabasebackup. Must be a value from the filesystemtable.bfs. e.g.: Root/databasespool_file (
str, optional) – The path to an override XML pool file. Only used if the profile_file is also specifiedprofile_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
- get_database((NodeManager)self, (str)database_name) Dataset :¶
Get the existing
Databasefrom theNodeManager.
- get_database_state((NodeManager)self, (str)database_name) DatabaseState :¶
Get the
DatabaseStateof a Database from theNodeManager.- Parameters
- Returns
The state of the database.
- Return type
- property databases¶
The list of
Databasenames registered on theNodeManager
- property hostname¶
The hostname of the server that hosts the
NodeManager- Type
- 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.')