Ejemplo n.º 1
0
 def test_list_scopes(self):
     """ SCOPE (CORE): List scopes """
     for scope in self.scopes:
         add_scope(scope=scope, account=self.jdoe)
     scopes = get_scopes(account=self.jdoe)
     for scope in scopes:
         assert scope in scopes
Ejemplo n.º 2
0
 def test_list_scopes(self):
     """ SCOPE (CORE): List scopes """
     for scope in self.scopes:
         add_scope(scope=scope, account='jdoe')
     scopes = get_scopes(account='jdoe')
     for s in scopes:
         assert_in(s, scopes)
Ejemplo n.º 3
0
def get_scopes(account):
    """
    Gets a list of all scopes for an account.

    :param account: The account name.

    :returns: A list containing the names of all scopes for this account.
    """
    return core_scope.get_scopes(account)
Ejemplo n.º 4
0
def get_scopes(account):
    """
    Gets a list of all scopes for an account.

    :param account: The account name.

    :returns: A list containing the names of all scopes for this account.
    """
    return core_scope.get_scopes(account)
Ejemplo n.º 5
0
Archivo: scope.py Proyecto: zlion/rucio
def get_scopes(account):
    """
    Gets a list of all scopes for an account.

    :param account: The account name.

    :returns: A list containing the names of all scopes for this account.
    """

    account = InternalAccount(account)

    return [scope.external for scope in core_scope.get_scopes(account)]
Ejemplo n.º 6
0
def get_scopes(account, vo='def', session=None):
    """
    Gets a list of all scopes for an account.

    :param account: The account name.
    :param vo: The VO to act on.
    :param session: The database session in use.

    :returns: A list containing the names of all scopes for this account.
    """

    account = InternalAccount(account, vo=vo)

    return [scope.external for scope in core_scope.get_scopes(account, session=session)]