summaryrefslogtreecommitdiff
path: root/tests/protocol/mockmetadata.py
diff options
context:
space:
mode:
authorƁukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com>2017-01-16 10:10:41 +0100
committerusd-importer <ubuntu-server@lists.ubuntu.com>2017-01-17 17:53:13 +0000
commitdd73af563850762aad64e7ed2a9897377830af10 (patch)
tree33f34ccce29a5a11227741dbe6a8fce20deeeaba /tests/protocol/mockmetadata.py
parenta05019d9343d0fde153d75a8e61fb6f99d1d3ff3 (diff)
parent558111e33720eb8f1eaacf571cf4fadae2430286 (diff)
downloadvyos-walinuxagent-dd73af563850762aad64e7ed2a9897377830af10.tar.gz
vyos-walinuxagent-dd73af563850762aad64e7ed2a9897377830af10.zip
Import patches-applied version 2.2.2-0ubuntu1 to applied/ubuntu/zesty-proposed
Imported using git-ubuntu import. Changelog parent: a05019d9343d0fde153d75a8e61fb6f99d1d3ff3 Unapplied parent: 558111e33720eb8f1eaacf571cf4fadae2430286 New changelog entries: * New upstream release (LP: #1651128) - d/patches/fix-auto-update.patch, d/patches/lp1623570-adjust-walinuxagent-service-after-and-wants.patch: - Dropped as changes have been applied upstream - Refreshed debian/patches/disable_import_test.patch
Diffstat (limited to 'tests/protocol/mockmetadata.py')
-rw-r--r--tests/protocol/mockmetadata.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/protocol/mockmetadata.py b/tests/protocol/mockmetadata.py
index dce3367..d41ce88 100644
--- a/tests/protocol/mockmetadata.py
+++ b/tests/protocol/mockmetadata.py
@@ -22,8 +22,11 @@ from azurelinuxagent.common.utils.cryptutil import CryptUtil
DATA_FILE = {
"identity": "metadata/identity.json",
"certificates": "metadata/certificates.json",
+ "certificates_data": "metadata/certificates_data.json",
"ext_handlers": "metadata/ext_handlers.json",
"ext_handler_pkgs": "metadata/ext_handler_pkgs.json",
+ "trans_prv": "metadata/trans_prv",
+ "trans_cert": "metadata/trans_cert",
}
DATA_FILE_NO_EXT = DATA_FILE.copy()
@@ -33,8 +36,11 @@ class MetadataProtocolData(object):
def __init__(self, data_files):
self.identity = load_data(data_files.get("identity"))
self.certificates = load_data(data_files.get("certificates"))
+ self.certificates_data = load_data(data_files.get("certificates_data"))
self.ext_handlers = load_data(data_files.get("ext_handlers"))
self.ext_handler_pkgs = load_data(data_files.get("ext_handler_pkgs"))
+ self.trans_prv = load_data(data_files.get("trans_prv"))
+ self.trans_cert = load_data(data_files.get("trans_cert"))
def mock_http_get(self, url, *args, **kwargs):
content = None
@@ -42,6 +48,8 @@ class MetadataProtocolData(object):
content = self.identity
elif url.count(u"certificates") > 0:
content = self.certificates
+ elif url.count(u"certificates_data") > 0:
+ content = self.certificates_data
elif url.count(u"extensionHandlers") > 0:
content = self.ext_handlers
elif url.count(u"versionUri") > 0: