|
38 | 38 | ) |
39 | 39 | from marvin.lib.common import (get_domain, |
40 | 40 | get_zone, |
41 | | - get_template) |
| 41 | + get_template, |
| 42 | + list_storage_pools) |
42 | 43 | from marvin.codes import FAILED |
43 | 44 |
|
44 | 45 | from marvin.lib.decoratorGenerators import skipTestIf |
@@ -258,20 +259,31 @@ def test_mount_shared_fs(self): |
258 | 259 | def test_resize_shared_fs(self): |
259 | 260 | """Resize the shared filesystem by changing the disk offering and validate |
260 | 261 | """ |
| 262 | + sharedfs_pool_response = list_storage_pools(self.apiclient, id=self.sharedfs.storageid) |
| 263 | + sharedfs_pool = sharedfs_pool_response[0] |
| 264 | + |
261 | 265 | self.mountSharedFSOnVM(self.vm1_ssh_client, self.sharedfs) |
262 | 266 | result = self.vm1_ssh_client.execute("df -Th /mnt/fs1 | grep nfs")[0] |
263 | 267 | self.debug(result) |
264 | 268 | size = result.split()[-5] |
265 | 269 | self.debug("Size of the filesystem is " + size) |
266 | | - self.assertEqual(size, "2.0G", "SharedFS size should be 2.0G") |
| 270 | + if sharedfs_pool.type.lower() == "powerflex": |
| 271 | + self.assertEqual(size, "8.0G", "SharedFS size should be 8.0G") |
| 272 | + new_size = 9 |
| 273 | + else: |
| 274 | + self.assertEqual(size, "2.0G", "SharedFS size should be 2.0G") |
| 275 | + new_size = 3 |
267 | 276 |
|
268 | 277 | response = SharedFS.stop(self.sharedfs, self.apiclient) |
269 | | - response = SharedFS.changediskoffering(self.sharedfs, self.apiclient, self.disk_offering.id, 3) |
| 278 | + response = SharedFS.changediskoffering(self.sharedfs, self.apiclient, self.disk_offering.id, new_size) |
270 | 279 | self.debug(response) |
271 | 280 | response = SharedFS.start(self.sharedfs, self.apiclient) |
272 | 281 | time.sleep(10) |
273 | 282 |
|
274 | 283 | result = self.vm1_ssh_client.execute("df -Th /mnt/fs1 | grep nfs")[0] |
275 | 284 | size = result.split()[-5] |
276 | 285 | self.debug("Size of the filesystem is " + size) |
277 | | - self.assertEqual(size, "3.0G", "SharedFS size should be 3.0G") |
| 286 | + if sharedfs_pool.type.lower() == "powerflex": |
| 287 | + self.assertEqual(size, "16G", "SharedFS size should be 16G") |
| 288 | + else: |
| 289 | + self.assertEqual(size, "3.0G", "SharedFS size should be 3.0G") |
0 commit comments