Method: CloudFS::RestAdapter#unlock_share

Defined in:
lib/cloudfs/rest_adapter.rb

#unlock_share(share_key, password) ⇒ Object

Unlock share

Parameters:

  • share_key (String)

    id of the share

  • password (String)

    password of share

Raises:



954
955
956
957
958
959
960
961
962
963
964
965
# File 'lib/cloudfs/rest_adapter.rb', line 954

def unlock_share(share_key, password)
  fail Errors::ArgumentError,
       'Invalid argument, must pass valid path' if Utils.is_blank?(share_key)
  fail Errors::ArgumentError,
       'Invalid argument, must pass valid path' if Utils.is_blank?(password)

  uri = set_uri_params(Constants::ENDPOINT_SHARES, name: share_key,
                       operation: 'unlock')
  form = {password: password}

  request('POST', uri: uri, body: form)
end