Merge pull request #1528 from mike-tutkowski/marvin_methods

CLOUDSTACK-9373: Class methods over-shawdowing instance methodsWe have some methods in base.py that are named the same.

Per my findings below, Python methods in a class should not be named the same even if one is a class method and the other is an instance method.

The solution discussed on dev@ is to remove the instance versions (reason listed in e-mail text, which is listed in JIRA ticket).

https://issues.apache.org/jira/browse/CLOUDSTACK-9373

* pr/1528:
  CLOUDSTACK-9373: Removing a few instance methods where there are class methods that are overshadowing them

Signed-off-by: Will Stevens <williamstevens@gmail.com>
This commit is contained in:
Will Stevens 2016-05-12 11:08:53 -04:00
commit c79affaefb

View File

@ -2587,13 +2587,6 @@ class Host:
apiclient.deleteHost(cmd)
return
def enableMaintenance(self, apiclient):
"""enables maintenance mode Host"""
cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
cmd.id = self.id
return apiclient.prepareHostForMaintenance(cmd)
@classmethod
def enableMaintenance(cls, apiclient, id):
"""enables maintenance mode Host"""
@ -2602,13 +2595,6 @@ class Host:
cmd.id = id
return apiclient.prepareHostForMaintenance(cmd)
def cancelMaintenance(self, apiclient):
"""Cancels maintenance mode Host"""
cmd = cancelHostMaintenance.cancelHostMaintenanceCmd()
cmd.id = self.id
return apiclient.cancelHostMaintenance(cmd)
@classmethod
def cancelMaintenance(cls, apiclient, id):
"""Cancels maintenance mode Host"""
@ -2758,13 +2744,6 @@ class StoragePool:
apiclient.deleteStoragePool(cmd)
return
def enableMaintenance(self, apiclient):
"""enables maintenance mode Storage pool"""
cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
cmd.id = self.id
return apiclient.enableStorageMaintenance(cmd)
@classmethod
def enableMaintenance(cls, apiclient, id):
"""enables maintenance mode Storage pool"""