KR> - def cim_define(self, ip):
KR> + def cim_define(self, ip, params=None, ref_conf=None):
This is a class method, right? It seems weird to have a parameter to a
class method that overrides the use of any of the class's private
variables. AFAICT, this behaves like a class method when params=None
and like a regular function when params is not None.
Why not make cim_define() a regular function for the case where you need
to pass in specific values and have the class method call it with the
information from the class?
KR> service = vsms.get_vsms_class(self.virt)(ip)
KR> - sys_settings = str(self.vssd)
KR> - res_settings = [str(self.dasd), str(self.nasd),
KR> - str(self.pasd), str(self.masd)]
KR> + if params is None:
KR> + sys_settings = str(self.vssd)
KR> + res_settings = [str(self.dasd), str(self.nasd),
KR> + str(self.pasd), str(self.masd)]
KR> + else:
KR> + sys_settings = params['vssd']
KR> + res_settings = params['rasds']
For the record, I think that the current convention of passing in a dict
with two specifically-named items instead of just another parameter to
the method is pretty gross. Just in case you were wondering :)
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com