Skip to content

Commit c79affa

Browse files
committed
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>
2 parents 7e41747 + 1ad0da0 commit c79affa

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

tools/marvin/marvin/lib/base.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,13 +2587,6 @@ def delete(self, apiclient):
25872587
apiclient.deleteHost(cmd)
25882588
return
25892589

2590-
def enableMaintenance(self, apiclient):
2591-
"""enables maintenance mode Host"""
2592-
2593-
cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
2594-
cmd.id = self.id
2595-
return apiclient.prepareHostForMaintenance(cmd)
2596-
25972590
@classmethod
25982591
def enableMaintenance(cls, apiclient, id):
25992592
"""enables maintenance mode Host"""
@@ -2602,13 +2595,6 @@ def enableMaintenance(cls, apiclient, id):
26022595
cmd.id = id
26032596
return apiclient.prepareHostForMaintenance(cmd)
26042597

2605-
def cancelMaintenance(self, apiclient):
2606-
"""Cancels maintenance mode Host"""
2607-
2608-
cmd = cancelHostMaintenance.cancelHostMaintenanceCmd()
2609-
cmd.id = self.id
2610-
return apiclient.cancelHostMaintenance(cmd)
2611-
26122598
@classmethod
26132599
def cancelMaintenance(cls, apiclient, id):
26142600
"""Cancels maintenance mode Host"""
@@ -2758,13 +2744,6 @@ def delete(self, apiclient):
27582744
apiclient.deleteStoragePool(cmd)
27592745
return
27602746

2761-
def enableMaintenance(self, apiclient):
2762-
"""enables maintenance mode Storage pool"""
2763-
2764-
cmd = enableStorageMaintenance.enableStorageMaintenanceCmd()
2765-
cmd.id = self.id
2766-
return apiclient.enableStorageMaintenance(cmd)
2767-
27682747
@classmethod
27692748
def enableMaintenance(cls, apiclient, id):
27702749
"""enables maintenance mode Storage pool"""

0 commit comments

Comments
 (0)