示例#1
0
 def share_create_v1(self, request):
     data = _request_data(request)
     return api.share_create(
         owner_id=data.get('owner_id', None),
         key_size=int(data.get('key_size', '2048')),
         label=data.get('label', ''),
     )
 def jsonrpc_share_create(self, key_alias, remote_path=None):
     return api.share_create(key_alias=key_alias, remote_path=remote_path)
示例#3
0
 def share_create_v1(self, request):
     data = _request_data(request, mandatory_keys=['key_alias', ])
     return api.share_create(
         key_alias=data['key_alias'],
         remote_path=data.get('remote_path'),
     )