authid = kwargs['auth_id']
groupname = kwargs['group_name']
accesslevel = kwargs['access_level']
+ tenant_id = kwargs['tenant_id']
try:
with open_volume(self, volname) as fs_handle:
with open_group(fs_handle, self.volspec, groupname) as group:
with open_subvol(self.mgr, fs_handle, self.volspec, group, subvolname, SubvolumeOpType.ALLOW_ACCESS) as subvolume:
- key = subvolume.authorize(authid, accesslevel)
+ key = subvolume.authorize(authid, accesslevel, tenant_id)
ret = 0, key, ""
except VolumeException as ve:
ret = self.volume_exception_to_retval(ve)
'name=sub_name,type=CephString '
'name=auth_id,type=CephString '
'name=group_name,type=CephString,req=false '
- 'name=access_level,type=CephString,req=false ',
+ 'name=access_level,type=CephString,req=false '
+ 'name=tenant_id,type=CephString,req=false ',
'desc': "Allow a cephx auth ID access to a subvolume",
'perm': 'rw'
},
sub_name=cmd['sub_name'],
auth_id=cmd['auth_id'],
group_name=cmd.get('group_name', None),
- access_level=cmd.get('access_level', 'rw'))
+ access_level=cmd.get('access_level', 'rw'),
+ tenant_id=cmd.get('tenant_id', None))
@mgr_cmd_wrap
def _cmd_fs_subvolume_deauthorize(self, inbuf, cmd):