blob: 8f3c0245374b520048448d38332701914c1b1ef5 [file] [log] [blame]
from barbicanv1.common import send, get_by_name_or_uuid
from barbicanv1.secrets import secret_list, RESOURCE_LIST_KEY
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('get')
def secret_acl_get(secret_uuid, **kwargs):
url = '/v1/secrets/{}/acl'.format(secret_uuid)
return url, {}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('put')
def secret_acl_put(secret_uuid, **kwargs):
url = '/v1/secrets/{}/acl'.format(secret_uuid)
json = {
'read': kwargs,
}
return url, {'json': json}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('patch')
def secret_acl_patch(secret_uuid, **kwargs):
url = 'v1/secrets/{}/acl'.format(secret_uuid)
json = {
'read': kwargs,
}
return url, {'json': json}
@get_by_name_or_uuid(secret_list, RESOURCE_LIST_KEY)
@send('delete')
def secret_acl_delete(secret_uuid, **kwargs):
url = 'v1/secrets/{}/acl'.format(secret_uuid)
return url, {}