def createDBRealm(realm): ''' Store Realm in the DB Realm Table. If the realm already exist, we do not need to store it :param realm: the realm name :type realm: string :return : if realm is created(True) or already esists(False) :rtype : boolean ''' ret = False if not getRealmObject(name=realm): r = Realm(realm) r.storeRealm() ret = True return ret
def createDBRealm(realm): ''' Store Realm in the DB Realm Table. If the realm already exist, we do not need to store it :param realm: the realm name :type realm: string :return : if realm is created(True) or already esists(False) :rtype : boolean ''' ret = False if not getRealmObject(name=realm): log.debug("[createDBRealm] No realm with name %s exist in database. Creating new" % realm) r = Realm(realm) r.storeRealm() ret = True return ret