mirror of https://github.com/apache/cloudstack.git
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:
commit
4325574270
File diff suppressed because it is too large
Load Diff
|
|
@ -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"""
|
||||
|
|
|
|||
Loading…
Reference in New Issue