]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
CiscoFCSanLookupSerive uses extra argument in init
authorXing Yang <xing.yang@emc.com>
Sun, 26 Oct 2014 21:29:26 +0000 (17:29 -0400)
committerXing Yang <xing.yang@emc.com>
Sun, 26 Oct 2014 21:53:31 +0000 (17:53 -0400)
This patch fixed two issues with the __init__ routine in
CiscoFCSanLookupService:

1. There's an extra argument in super(CiscoFCSanLookupService,
self).__init__(self, **kwargs). It should be changed to
super(CiscoFCSanLookupService, self).__init__(**kwargs).

2. The last line 'self.fabric_configs = ""' should be removed.
self.fabric_configs was created in self.create_configuration() in the
middle of the __init__ routine. It shouldn't be cleared out at the end
of the __init__ routine.

Change-Id: I2623f3b51af34d14849015e52e3676271c9fe414
Closes-Bug: #1385974

cinder/zonemanager/drivers/cisco/cisco_fc_san_lookup_service.py

index eaf5b3dc9a38604310737f19b493bcda91a48917..a72bc9f9f95d5bc416106b3118db10911d108327 100644 (file)
@@ -47,7 +47,7 @@ class CiscoFCSanLookupService(FCSanLookupService):
 
     def __init__(self, **kwargs):
         """Initializing the client."""
-        super(CiscoFCSanLookupService, self).__init__(self, **kwargs)
+        super(CiscoFCSanLookupService, self).__init__(**kwargs)
         self.configuration = kwargs.get('configuration', None)
         self.create_configuration()
 
@@ -57,8 +57,6 @@ class CiscoFCSanLookupService(FCSanLookupService):
         self.switch_ip = ""
         self.sshpool = None
 
-        self.fabric_configs = ""
-
     def create_configuration(self):
         """Configuration specific to SAN context values."""
         config = self.configuration