summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceMAAS.py
diff options
context:
space:
mode:
authorOleg Strikov <oleg.strikov@canonical.com>2015-03-05 20:26:10 +0300
committerOleg Strikov <oleg.strikov@canonical.com>2015-03-05 20:26:10 +0300
commit692078e75a3f8af92a0151ad30b6a4ecc64b4b35 (patch)
tree61fcb64daf6b83fc30dce4715bb4ef9664653a4b /cloudinit/sources/DataSourceMAAS.py
parent978991f5793f639f24c95df3beca5e4cdf98fd9c (diff)
downloadvyos-cloud-init-692078e75a3f8af92a0151ad30b6a4ecc64b4b35.tar.gz
vyos-cloud-init-692078e75a3f8af92a0151ad30b6a4ecc64b4b35.zip
DataSourceMAAS: generate oauth headers with adjusted timestamp in case of clock skew
This functionality has been introduced to fix LP: #978127, but was lost while migrating cloud-init to python3.
Diffstat (limited to 'cloudinit/sources/DataSourceMAAS.py')
-rw-r--r--cloudinit/sources/DataSourceMAAS.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceMAAS.py b/cloudinit/sources/DataSourceMAAS.py
index 6cc010b7..9f9cf3ab 100644
--- a/cloudinit/sources/DataSourceMAAS.py
+++ b/cloudinit/sources/DataSourceMAAS.py
@@ -288,7 +288,8 @@ def oauth_headers(url, consumer_key, token_key, token_secret, consumer_secret,
client_secret=consumer_secret,
resource_owner_key=token_key,
resource_owner_secret=token_secret,
- signature_method=oauth1.SIGNATURE_PLAINTEXT)
+ signature_method=oauth1.SIGNATURE_PLAINTEXT,
+ timestamp=timestamp)
uri, signed_headers, body = client.sign(url)
return signed_headers