Clay,

I am in no way finished with my code review, however, I saw something in 
installadm_common.py that I wanted to bring to your attention.

the vfstab, mnttab, and grubMenu classes are all essentially recreating 
what you are already getting with dict ()

Instead of inheriting from object, inherit from dict:

class vfstab (dict):
<...>

This will give you full access to all the built-in functions for 
dictionaries including things like dict.get (), dict.setdefault (), etc.

This way, a) don't have to implement them your self (the keys() method) 
and b) when solaris changes from python 2.4 to 2.x you'll probably be 
code safe to any python changes behind the scene.

Also, have you run this through pylint?  Pylint should have been in the 
sfw consolidation around 119 so if you're developing this on 121, it 
should be available to you.

A more comprehensive review is forthcoming.

-Drew

Clay Baenziger wrote:
> Hello all,
>     I've got a webrev for some mighty delete-service changes. The bugs 
> I'm hoping to address are:
> 4526 -    delete-service is not deleting service as described in section
>     4.3.2 ai_design_doc
> 6587 -    delete-service shouldn't remove the source image if there's other
>     services actives 'linked' to the same source image
> 10740 -    Need way to interact with SMF from Python for installadm
>     components in Python
> 
> Further, this webrev includes the already reviewed (but as yet unpushed 
> and related libpyscf code). The files to ignore (unless you're 
> interested) are anything under usr/src/lib/*
> 
> Otherwise, if I could get initial comments as soon as possible, however, 
> Eric has extended the expected timeline for these changes to be pushed 
> to next week opposed to the initial hope of Friday.
> 
> Webrev:
> http://cr.opensolaris.org/~clayb/delete_service/
> 
>                             Thank you,
>                             Clay

Reply via email to