NodeManager¶
-
class
caris.bathy.db.
NodeManager
¶ An Interface to a Bathy Nodemanager
-
hostname
¶ The hostname of the server that hosts the
NodeManager
- Type
-
databases
¶ The list of
Database
names registered on theNodeManager
-
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 theDatabase
backup. 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
Database
from theNodeManager
.
-
get_database_state
((NodeManager)self, (str)database_name) → DatabaseState :¶ Get the
DatabaseState
of a Database from theNodeManager
.- Parameters
- Returns
The state of the database.
- Return 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.')