Exemplo n.º 1
0
def identifier_create(args):
    """
    Create a new identifier
    """
    client = identifiers_client(config)
    args = clear_internal_args(vars(args))
    return client.create_identifier(**args)
Exemplo n.º 2
0
def identifier_update(args):
    """
    Update the state of an identifier
    """
    client = identifiers_client(config)
    identifier_id = args.identifier
    args = clear_internal_args(vars(args))

    return client.update_identifier(identifier_id, **args)
Exemplo n.º 3
0
def identifier_create(args):
    """
    Create a new identifier
    """
    client = identifiers_client(config)
    args = clear_internal_args(vars(args))
    args = set_checksum_args(args)
    if args.get('locations'):
        args['location'] = args.pop('locations')
    return client.create_identifier(**args)
Exemplo n.º 4
0
def identifier_update(args):
    """
    Update the state of an identifier
    """
    client = identifiers_client(config)
    identifier_id = args.identifier
    args = clear_internal_args(vars(args))
    args = set_checksum_args(args)
    if args.get('locations'):
        args['location'] = args.pop('locations')
    return client.update_identifier(identifier_id, **args)
Exemplo n.º 5
0
def namespace_create(args):
    """
    Create a new namespace
    """
    client = identifiers_client(config)
    args = clear_internal_args(vars(args))
    # Convenience helper: If user doesn't specify a member
    # group, just use the same group as for admins.
    # This means all members will be admins.
    if 'creators' not in args:
        args['creators'] = args['admins']
    return client.create_namespace(**args)
Exemplo n.º 6
0
def namespace_update(args):
    """
    Update the properties of an existing namespace
    """
    client = identifiers_client(config)
    args = clear_internal_args(vars(args))

    # Convenience helper: If user doesn't specify a member
    # group, just use the same group as for admins.
    # This means all members will be admins.
    if 'creators' not in args:
        args['creators'] = args['admins']
    namespace_id = args.pop('namespace_id')
    return client.update_namespace(namespace_id, **args)