Example #1
0
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
Example #2
0
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
Example #3
0
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
Example #4
0
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