Merge pull request #703 from ksowmya/disablestorage_pep8

Disablestorage pep8CLOUDSTACK-8738: Added Maintenance mode related fixes into base.py for test_disablestoragepool.
Also fixed pep8 issues in script, most of them for E501 (long lines) with max-line-length set to default

Test Result:
Test Steps: ... === TestName: test_01_disable_enable_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_01_disable_enable_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE  storage pools found
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_1_host | Status : SUCCESS ===
ok
Test Steps: ... === TestName: test_02_vm_operations_on_disabled_pool_2_CLUSTER | Status : SUCCESS ===
ok
Test Steps: ... SKIP: No ZONE wide storage pools found
Test Steps: ... === TestName: test_01_cross_cluster_attach_disk | Status : SUCCESS ===
ok

* pr/703:
  Fixed pep8 issues
  CLOUDSTACK-8738: Added the two methods for enable and cancel maintenance mode on StoragePool

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-08-18 16:37:02 +02:00
commit 4325574270
2 changed files with 686 additions and 345 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2637,6 +2637,22 @@ class StoragePool:
cmd.id = self.id
return apiclient.enableStorageMaintenance(cmd)
@classmethod
def enableMaintenance(cls, apiclient, id):
"""enables maintenance mode Storage pool"""
cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
cmd.id = id
return apiclient.enableStorageMaintenance(cmd)
@classmethod
def cancelMaintenance(cls, apiclient, id):
"""Cancels maintenance mode Host"""
cmd = cancelStorageMaintenance.cancelStorageMaintenanceCmd()
cmd.id = id
return apiclient.cancelStorageMaintenance(cmd)
@classmethod
def list(cls, apiclient, **kwargs):
"""List all storage pools matching criteria"""