summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_openstack.py
diff options
context:
space:
mode:
authorLars Kellogg-Stedman <lars@redhat.com>2017-01-17 08:53:22 -0500
committerScott Moser <smoser@brickies.net>2017-01-17 11:36:37 -0500
commit4cf53f1544f8f5629330eab3efef1a18255c277a (patch)
tree6e7a4534739046fc6932de246fa25713f8f3c7b0 /tests/unittests/test_datasource/test_openstack.py
parent8ddb57149281ba2658696f19c1eb96e7769381e4 (diff)
downloadvyos-cloud-init-4cf53f1544f8f5629330eab3efef1a18255c277a.tar.gz
vyos-cloud-init-4cf53f1544f8f5629330eab3efef1a18255c277a.zip
OpenStack: Use timeout and retries from config in get_data.
This modifies get_data in DataSourceOpenStack.py to get the timeout and retries values from the data source configuration, rather than from keyword arguments. This permits get_data to use the same timeout as other methods, and allows an operator to increase the timeout in environments where the metadata service takes longer than five seconds to respond. LP: #1657130 Resolves: rhbz#1408589
Diffstat (limited to 'tests/unittests/test_datasource/test_openstack.py')
-rw-r--r--tests/unittests/test_datasource/test_openstack.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_openstack.py b/tests/unittests/test_datasource/test_openstack.py
index e5b6fcc6..28e1833e 100644
--- a/tests/unittests/test_datasource/test_openstack.py
+++ b/tests/unittests/test_datasource/test_openstack.py
@@ -232,7 +232,7 @@ class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
None,
helpers.Paths({}))
self.assertIsNone(ds_os.version)
- found = ds_os.get_data(timeout=0.1, retries=0)
+ found = ds_os.get_data()
self.assertTrue(found)
self.assertEqual(2, ds_os.version)
md = dict(ds_os.metadata)
@@ -256,7 +256,7 @@ class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
None,
helpers.Paths({}))
self.assertIsNone(ds_os.version)
- found = ds_os.get_data(timeout=0.1, retries=0)
+ found = ds_os.get_data()
self.assertFalse(found)
self.assertIsNone(ds_os.version)
@@ -275,7 +275,7 @@ class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
'timeout': 0,
}
self.assertIsNone(ds_os.version)
- found = ds_os.get_data(timeout=0.1, retries=0)
+ found = ds_os.get_data()
self.assertFalse(found)
self.assertIsNone(ds_os.version)
@@ -298,7 +298,7 @@ class TestOpenStackDataSource(test_helpers.HttprettyTestCase):
'timeout': 0,
}
self.assertIsNone(ds_os.version)
- found = ds_os.get_data(timeout=0.1, retries=0)
+ found = ds_os.get_data()
self.assertFalse(found)
self.assertIsNone(ds_os.version)