def __init__(self): """ initialize an empty object. """ # declare db-internal attributes BaseModel.__init__(self) ## for db index self.db_id = None ## list of DNS-hostnames self.servernames = None self.servernames_js = "" ## list of ipaddrs self.ipaddr = "" ## Flag if it is a clone or real db-server self.is_clone = True ## type of db : vldb or ptdb self.afsdb_type = "" ## local version of the DB self.local_afsdb_version = "" ## rxdebug version string self.version = "" self.build_date = "" ## list of attributes not to put into the DB self.unmapped_attributes_list= ['BNode', 'ExtServAttr' ]
def __init__(self) : """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## (fileserver_uuid,name) is foreign key to partition-table self.name = "" self.fileserver_uuid = "" ## Owner of the Partition (string) self.owner = "" ## json-encoded dict { "projectID" : "numVolumes" } ## showing ProjectIDs having numVolumes volumes on that partition self.project_ids_js = '{}' self.project_ids = {} ## allocated (by quota) size in Kbytes self.allocated = -1 ## stale_allocated, same as allocated, ## but for volumes which had not been accessed in $StaleTime days self.allocated_stale = -1 ## number of volumes with unlimited quota self.unlimited_volumes = -1 ## Total number of volumes self.num_vol_rw = -1 self.num_vol_ro = -1 self.num_vol_bk = -1 self.num_vol_offline = -1 self.unmapped_attributes_list = []
def __init__(self, instance_name = "N/A", bnode_type = "N/A", bos_db_id = -1): """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## DB-ID of owning bosserver self.bos_db_id = -1 self.instance_name = "" self.bnode_type = "" # FIXME : what to do with procs of type cron ? ## list of commands run for this bnode self.commands = '' self.commands_js = '' self.status = '' self.start_date = datetime.fromtimestamp(0) self.start_count = '' self.last_exit_date = datetime.fromtimestamp(0) self.notifier = '' self.error_stop = '' self.core = '' self.error_exit_date = datetime.fromtimestamp(0) self.error_exit_due = '' self.error_exit_signal = '' self.error_exit_code = '' ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtServAttr' ] ## DB-ID of owning bosserver self.bos_db_id = bos_db_id self.instance_name = instance_name self.bnode_type = bnode_type
def __init__(self): """ initialize an empty object. """ # declare db-internal attributes BaseModel.__init__(self) ## list of DNS-hostnames self.servernames = [] self.servernames_js = "" ## list of ipaddrs self.ipaddrs = [] self.ipaddrs_js = "" ## list of superusers self.superusers = [] self.superusers_js = "" ## list of cell hosts (dbservers) self.db_servers = [] self.db_servers_js = "" ## rxdebug version string and builddate self.version = "" self.build_date = "" ## dict containing general and binary restart times self.restart_times = {} self.restart_times_js = "{}" ## list of attributes not to put into the DB ## these contain (lists of) independent objects ## or convenience attributes ## bnodes: list of BNode objects ## servername short for servernames[0] self.unmapped_attributes_list = ['bnodes']
def __init__(self): """ Initializes empty shell """ # declare db-internal attributes BaseModel.__init__(self) ## Database definitions ## Cellname self.name = "" ## VLDb-Version self.vldb_version = -1 ## VLDb-syncsite, hostname self.vldb_sync_site = "" ## VLDB-State (aka "Recovery state") self.vldb_state = "" ## PTDB-Version self.ptdb_version = -1 ## PTDB-syncsite, hostname self.ptdb_sync_site = "" ## PTDB-State (aka "Recovery state") self.ptdb_state = "" ## Number of users in PTDB self.num_users = -1 ## Number of groups in PTDB self.num_groups = -1 ## Total number of volumes self.num_vol_rw = -1 self.num_vol_ro = -1 self.num_vol_bk = -1 self.num_vol_offline = -1 ## List of DBServers (hostnames only) self.db_servers = [] self.db_servers_js = "" ## List of FileServers (hostnames only) self.file_servers = [] self.file_servers_js = "" ## List of Projects (names only) self.projects = [] self.projects_js = "" ## Total Size, etc self.size_kb = -1 self.used_kb = -1 self.free_kb = -1 self.allocated_kb = -1 self.allocated_stale_kb = -1 ## list of attributes not to put into the DB self.unmapped_attributes_list = [ ]
def __init__(self) : """ initialize an empty object. The app-representation of compley attributes must be initialized to its type here. """ # declare db-internal attributes BaseModel.__init__(self) ## name self.name = "" ## list of regexes, json encoded self.volname_regex_js = "[]" self.volname_regex = [] ## list of additional Volumenames, json encoded self.additional_volnames_js = "[]" self.additional_volnames = [] ## list of excluded Volumenames , json encoded self.excluded_volnames_js = "[]" self.excluded_volnames = [] ## minimum Size for a Volume self.min_size_kb = -1 ## maximum Size for a volume self.max_size_kb = -1 ## Projects are organized in trees. db_id of a parent project. ## -1 means that this is the root project self.parent_db_id = -1 ## contact self.contact = "" ## owner self.owner = "" ## list of locationIDs for RW-Volumes, json encoded self.rw_locations_js = "[]" self.rw_locations = [] ## list of locationIDs for RO-Volumes, json encoded self.ro_locations_js = "[]" self.ro_locations = [] ## list of "server-uuid,partition" pairs for RW-Volumes, json encoded self.rw_serverparts_js = "[]" self.rw_serverparts = [] ## list of "server-uuid, partition" pairs for RO-Volumes, json encoded self.ro_serverparts_js = "[]" self.ro_serverparts = [] ## free form description self.description = "" ## minimum number of RO-replicas self.num_min_ro = 1 ## list of attributes not to put into the DB self.unmapped_attributes_list = []
def __init__(self) : """ initializes to an empty Volume """ # declare db-internal attributes BaseModel.__init__(self) ## name of the volume in the VLDB self.name = '' ## numerical ID of the volume, can be RW, RO or BK self.vid = -1 ## ServerUUID where this volume is stored self.fileserver_uuid = "" ## Partitionname, where this volume is stored. self.partition = "" ## hostname, not to be used for queries self.servername = "" ## numerical ID of RW Volume self.parent_id = 0 ## numerical ID of RO Volume self.readonly_id = 0 ## numerical ID of Backup Volume self.backup_id = 0 self.clone_id = 0 self.in_use = "" self.needs_salvage = "" self.destroy_me = "" self.type = "" self.creation_date = datetime.fromtimestamp(0) self.access_date = datetime.fromtimestamp(0) self.backup_date = datetime.fromtimestamp(0) self.update_date = datetime.fromtimestamp(0) self.copy_date = datetime.fromtimestamp(0) self.flags = 0 self.diskused = -1 self.maxquota = -1 self.minquota = -1 self.status = VolStatus.OK self.filecount = 0 self.day_use = 0 self.week_use = 0 self.spare2 = 0 self.spare3 = 0 ## list of attributes not to put into the DB self.unmapped_attributes_list = ['ExtAttr']
def __init__(self): """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## id of server in DB Table tbl_dbserver self.server_db_id = None ## physical Location of the server (string) self.location = "" ## Owner of the server (string) self.owner = "" ## custom description about HW etc. self.description = "" ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtServAttr' ]
def __init__(self): """ Initializes empty shell """ # declare db-internal attributes BaseModel.__init__(self) ## list of servers providing this DB self.dbservers_ipaddrs_js = "[]" self.dbservers_ipaddrs = [] ## syncsite, master-server self.sync_server_ipaddrs = "" ## FIXME: add more attributes like registered fileservers etc. ## DB-version self.vldb_version = -1 ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtServAttr' ]
def __init__(self): # declare db-internal attributes BaseModel.__init__(self) ## AFS Server UUID self.uuid = "" ## list of DNS-hostnames self.servernames_js = '[]' self.servernames = [] ## list of ipaddrs self.ipaddrs_js = '[]' self.ipaddrs = [] ## rxdebug version string self.version = "" ## build-date of binary according to rxdebug self.build_date = "" ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtAttr' ]
def __init__(self): """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## UUID of fileserver self.fileserver_uuid = "" ## canonicalized partition name e.g "ad" for "/vicepad" self.name = "" ## free size in Kbytes self.free_kb = -1 ## total size in Kbytes self.size_kb = -1 ## used size in Kbytes self.used_kb = -1 ## list of attributes not to put into the DB self.unmapped_attributes_list = [ "ExtAttr" ]
def __init__(self): """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## ID of Volume, foreign key to volume-table ## SHOULD point to RWID self.vid = -1 ## number of RO required for this volume, overrrides project self.num_min_ro = -1 ## Owner of the volume (string) self.owner = "" ## json-encodedlist of projectIDs this Volume belongs to self.project_ids_js = '[]' self.project_ids = [] ## if volume should stay on the present server. self.pinned_on_server = 0 ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtServAttr' ]
def __init__(self): """ initialize an empty object """ # declare db-internal attributes BaseModel.__init__(self) ## DB ID of Project self.project_id = -1 ## UUID of FSServer self.fileserver_uuid = -1 ## partition self.part = "" ## type of volumes self.vol_type = "" ## number of volumes of that type self.num_vol = -1 ## total used kilobytes self.used_kb = -1 ## list of attributes not to put into the DB self.unmapped_attributes_list = [ 'parts', 'ExtServAttr' ]