NodeManager¶
-
class
caris.bathy.db.NodeManager¶ An Interface to a Bathy Nodemanager
-
hostname¶ str– The hostname of the server that hosts theNodeManager
-
databases¶ listofstr– The list ofDatabasenames 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_name (
str) – The name to give the newDatabase. - database_location (
str) – The path for the newDatabase. Must be a value from the filesystemtable.bfs. e.g.: Root/databases - backup_location (
str) – The path for theDatabasebackup. 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_name (
-
get_database((NodeManager)self, (str)database_name) → Dataset :¶ Get the existing
Databasefrom theNodeManager.Parameters: database_name ( str) – The name of theDatabase.Returns: A Dataset for the database Return type: Database
-
get_database_state((NodeManager)self, (str)database_name) → DatabaseState :¶ Get the
DatabaseStateof a Database from theNodeManager.Parameters: database_name ( str) – The name of theDatabase.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 theDatabase.
-
-
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.')