summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/os_source_file_test.py
diff options
context:
space:
mode:
authorspisarski <s.pisarski@cablelabs.com>2017-04-18 12:13:44 -0600
committerspisarski <s.pisarski@cablelabs.com>2017-04-27 16:26:10 +0200
commitc84125245f85f87c6a4b1151811a7de1bca68b26 (patch)
tree472389c3c5537369e3967494b621b737395f5d00 /snaps/openstack/tests/os_source_file_test.py
parentbf245990d5b2d5d1e9593957b28457401934f54f (diff)
Refactored multi-part images.
The logic used for creating multi-part images for the Danube release was copied all throughout the tests, which was not sustainable. This patch encapsulates the kernel and ramdisk images within the same OpenStackImage object as the disk image. JIRA: SNAPS-59 Change-Id: I45ec0ccc666accb4e768c41e249e6130dc07f6d1 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
Diffstat (limited to 'snaps/openstack/tests/os_source_file_test.py')
-rw-r--r--snaps/openstack/tests/os_source_file_test.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/snaps/openstack/tests/os_source_file_test.py b/snaps/openstack/tests/os_source_file_test.py
index 0c9f1b1..af75381 100644
--- a/snaps/openstack/tests/os_source_file_test.py
+++ b/snaps/openstack/tests/os_source_file_test.py
@@ -12,15 +12,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-import unittest
+import logging
import uuid
+import unittest
from snaps import file_utils
-import openstack_tests
-import logging
-
from snaps.openstack.create_project import ProjectSettings
from snaps.openstack.create_user import UserSettings
+from snaps.openstack.tests import openstack_tests
from snaps.openstack.utils import deploy_utils, keystone_utils
dev_os_env_file = 'openstack/tests/conf/os_env.yaml'
@@ -78,8 +77,12 @@ class OSIntegrationTestCase(OSComponentTestCase):
:param os_creds: the OSCreds object, when null it searches for the file {cwd}/openstack/tests/conf/os_env.yaml
:param ext_net_name: the name of the external network that is used for creating routers for floating IPs
:param use_keystone: when true, these tests will create a new user/project under which to run the test
+ :param image_metadata: dict() containing the URLs for the disk, kernel, and ramdisk images when multi-part
+ images are required.
+ image_metadata={'disk_url': 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img',
+ 'kernel_url': 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-kernel',
+ 'ramdisk_url': 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-initramfs'})
:param flavor_metadata: dict() to be sent directly into the Nova client generally used for page sizes
- :param image_metadata: dict() to be sent directly into the Nova client generally used for multi-part images
:param log_level: the logging level of your test run (default DEBUG)
"""
super(OSIntegrationTestCase, self).__init__(method_name=method_name, os_creds=os_creds,