~ubuntu-branches/ubuntu/trusty/maas/trusty-security

« back to all changes in this revision

Viewing changes to src/apiclient/maas_client.py

  • Committer: Package Import Robot
  • Author(s): Greg Lutostanski
  • Date: 2014-08-29 13:27:34 UTC
  • mto: (61.1.4 trusty-proposed)
  • mto: This revision was merged to the branch mainline in revision 62.
  • Revision ID: package-import@ubuntu.com-20140829132734-d47evihju2etdwcy
Tags: upstream-1.5.4+bzr2294
ImportĀ upstreamĀ versionĀ 1.5.4+bzr2294

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import gzip
22
22
from io import BytesIO
23
23
import urllib2
 
24
import uuid
24
25
 
25
26
from apiclient.encode_json import encode_json_data
26
27
from apiclient.multipart import encode_multipart_data
45
46
            with the signature.
46
47
        """
47
48
        oauth_request = oauth.OAuthRequest.from_consumer_and_token(
48
 
            self.consumer_token, token=self.resource_token, http_url=url)
 
49
            self.consumer_token, token=self.resource_token, http_url=url,
 
50
            parameters={'oauth_nonce': uuid.uuid4().get_hex()})
49
51
        oauth_request.sign_request(
50
52
            oauth.OAuthSignatureMethod_PLAINTEXT(), self.consumer_token,
51
53
            self.resource_token)