def UploadPassphrase(self, volume_uuid, passphrase):
    xsrf_token = self._FetchXsrfToken(base_settings.SET_PASSPHRASE_ACTION)

    # Ugh, urllib2 only does GET and POST?!
    class PutRequest(fancy_urllib.FancyRequest):

      def __init__(self, *args, **kwargs):
        kwargs.setdefault('headers', {})
        kwargs['headers']['Content-Type'] = 'application/octet-stream'
        fancy_urllib.FancyRequest.__init__(self, *args, **kwargs)
        self._method = 'PUT'

      def get_method(self):  # pylint: disable=g-bad-name
        return 'PUT'

    if not self._metadata:
      self.GetAndValidateMetadata()
    self._metadata['xsrf-token'] = xsrf_token
    url = '%s?%s' % (
        util.JoinURL(self.escrow_url, volume_uuid),
        urllib.urlencode(self._metadata))

    request = PutRequest(url, data=passphrase)
    request.set_ssl_info(ca_certs=self._ca_certs_file)
    self._RetryRequest(request, 'Uploading passphrase')
Uploads a volume uuid/passphrase pair with metadata.
dataset/ETHPy150Open google/cauliflowervest/src/cauliflowervest/client/base_client.py/CauliflowerVestClient.UploadPassphrase