Please find the following code changes available for you review. Please have all comments by COB Nov 16th.

https://cr.opensolaris.org/action/browse/caiman/enpointe/CR7110264/webrev/

These code changes clean up some of the pylint errors that appear from the Pylint Audit that is done as part of the build

http://indiana-build.us.oracle.com/job/slim_code_cleanliness/Pylint_Audit

These changes address the following pylint type of errors

Relative import
Redefined built-in
Used built-in function
Unused variable

There are 4 unused variable warnings that this checkin is not addressing since they are false positive.

conv_sysidcfg.py

W:1682:XMLSysidcfgData.__store_net_interface: Unused argument 'keyword'
W:1738:XMLSysidcfgData.__unsupported_keyword: Unused argument 'values'

conv.py

W:172:XMLRuleData.__unsupported_keyword: Unused argument 'values'
W:582:XMLProfileData.__unsupported_keyword: Unused argument 'values'

They get called in a manner like

     def __unsupported_keyword(self, keyword, values):
         """Generate an unsupported keyword error message"""
         self.__gen_err(LVL_UNSUPPORTED,
                        _("unsupported keyword: %(key)s") % {"key": keyword})


     rule_conversion_dict = {
         "any": __unsupported_keyword,
         "arch": __convert_arch,
        "disksize": __unsupported_keyword,
         "domainname": __unsupported_keyword,
         "hostaddress": __convert_common,
         "hostname": __unsupported_keyword,
         "installed": __unsupported_keyword,
         "karch": __convert_arch,
         "memsize": __convert_memsize,
         "model": __convert_common,
         "network": __convert_network,
         "osname": __unsupported_keyword,
         "probe": __unsupported_keyword,
         "totaldisk": __unsupported_keyword,
         }

   def process(self)

     …...
         try:
                 function_to_call = self.rule_conversion_dict[keyword]
             except KeyError:
                 self.__unsupported_keyword(keyword, values)
             else:
                 function_to_call(self, keyword, values)

Switching over to kwarg does not seem worth the effort here to eliminate these 
warning


Test Results

Automated Tests
 slim_test cmd/js2ai/modules/test
[ text deleted ]
----------------------------------------------------------------------
Ran 237 tests in 26.162s

OK

Manual
Ran js2ai again 2 different jumpstart configurations to convert rules and profiles of those configurations.
Ran conversion on 4 sysidcfg
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to