Skip to content

Commit

Permalink
Support lack of ephemeral volumes for baremetal
Browse files Browse the repository at this point in the history
The agent driver in Ironic does not yet support ephemeral volumes.
This change allows tempest to test Ironic with the agent driver
by skipping ephemeral volume checks if the ephemeral volume size
is 0.

Change-Id: I9525d1c75007555d368a2aa66ab840f41b584a30
  • Loading branch information
jimrollenhagen committed Sep 11, 2014
1 parent ef92075 commit a170b53
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tempest/scenario/test_baremetal_basic_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,18 +133,23 @@ def test_baremetal_server_ops(self):
# the same size as our flavor definition.
eph_size = self.get_flavor_ephemeral_size()
self.assertIsNotNone(eph_size)
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
if eph_size > 0:
preserve_ephemeral = True

# Create the test file
self.create_remote_file(vm_client, test_filename)
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
# Create the test file
self.create_remote_file(vm_client, test_filename)
else:
preserve_ephemeral = False

# Rebuild and preserve the ephemeral partition
self.rebuild_instance(True)
# Rebuild and preserve the ephemeral partition if it exists
self.rebuild_instance(preserve_ephemeral)
self.verify_connectivity()

# Check that we maintained our data
vm_client = self.get_remote_client(self.instance)
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
vm_client.exec_command('ls ' + test_filename)
if eph_size > 0:
vm_client = self.get_remote_client(self.instance)
self.verify_partition(vm_client, 'ephemeral0', '/mnt', eph_size)
vm_client.exec_command('ls ' + test_filename)

self.terminate_instance()

0 comments on commit a170b53

Please sign in to comment.