On Tuesday 28 May 2013 09:28 PM, Yolanda Robla wrote:
> +            testlib.cmd(['iscsiadm', '-m', 'node', '--targetname', 
> initiatorname, '-p', '%s:3260' % remote_server, '--op=update', '--name', 
> 'node.startup', '--value=manual'])
> +            testlib.cmd(['iscsiadm', '-m', 'node', '--targetname', 
> initiatorname, '-p', '%s:3260' % remote_server, '--op=update', '--name',  
> 'node.conn[0].startup', '--value=manual'])

What'll happen if you iscsi db has multiple connection portals? Here you
are taking care of conn[0] only.

> +            testlib.cmd(['iscsiadm', '-m', 'node', '--targetname', 
> initiatorname, '-p', '%s:3260' % remote_server, '--logout'])
> +

Why don't you decouple the port also? I see no value in you hardcoding
the port here.

> +if __name__ == '__main__':
> +    import optparse
> +    parser = optparse.OptionParser()

Please port it to argparse. optparse is deprecated since Python 2.7.



-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to