[pox-dev] CLI with POX

Murphy McCauley murphy.mccauley at gmail.com
Wed Oct 3 05:30:29 PDT 2012


Ahh, I see.  With POX-specific options instead of component-specific options.  The fix is a bit more subtle and a bit hacky.  POX-specific options in general are a bit hacky, but it may not be possible to entirely get rid of them (though you'll note that making the CLI much more of a normal component is a step in this direction).  I also am not positive that the way the CLI gets "preloaded" now is the best way to do it.

But at any rate, thanks for the bug report; I think you'll find it's fixed now.

-- Murphy

On Oct 3, 2012, at 4:23 AM, William Emmanuel Yu wrote:

> Hi Murphy,
> 
> On the original unmodified code:
> 
> ./pox.py py --help
>>> ['py', '--disable', 'py', '--help']
> 
> ./pox.py --help
>>> ['py', '--disable', '--help']
> 
> On the modified code:
> 
> ./pox.py py --help
>>> ['py', '--help']
> 
> ./pox.py --help
> ['--help']
> 
> The issue seems to be that py always comes up in the arguments list. 
> 
> On the last one runs properly. I am using the openflow VM. I just
> updated the pox with betta.
> 
> Thanks.
> 
> On Wed, 2012-10-03 at 03:05 -0700, Murphy McCauley wrote:
>> On Oct 3, 2012, at 2:41 AM, William Emmanuel Yu wrote:
>>> As of betta, running pox.py will no longer drop me into a CLI. I would
>>> like to go back to the old behavior. How do I do this? I tried
>>> spelunking the code myself but it wasn't very obvious.
>> 
>> Yeah; I'm not sure where to document this.  Maybe add something in the readme.  Certainly update the wiki, though I am loathe to update the wiki with things that are betta-specific yet.
>> 
>> The "py" component now provides the CLI, so just stick "py" on your commandline.
>> 
>>> Btw, there is a bug with respect to passing parameters to pox.py. Here
>>> is a small patch to fix it:
>> 
>> Are you sure this is necessary?  Some things to note which might be causing confusion:
>> 
>> boot() trims the first entry off of sys.argv[].
>> boot() manipulates argv -- it's prepends "py --disable" to the commandline to ensure that py loads early (of_01 will probably work similarly at some point, it's currently special-cased to load early).
>> 
>>> For some reason, using the passed variable argv refers to all the system
>>> arguments and not the parameter passed to the function. Strange.
>> 
>> This definitely doesn't seem to be the case on my system.  Could it be one of the above-mentioned complications?  What does "print argv" around like 126 in boot.py show?
>> 
>> 
>> -- Murphy
> 
> -- 
> -------------------------------------------------------
> William Emmanuel S. Yu, Ph.D. (杨怀义)
> Department of Information Systems and Computer Science
> Ateneo de Manila University
> email  :  wyu at ateneo dot edu
> blog   :  http://hip2b2.yutivo.org/
> web    :  http://CNG.ateneo.edu/cng/wyu/
> phone  :  +63(2)4266001 loc. 4186
> GPG    :  http://CNG.ateneo.net/cng/wyu/wyy.pgp
> 
> Confidentiality Issue:  This message is intended only for the use of the
> addressee and may contain information that is privileged and
> confidential. If you are not the intended recipient, you are hereby
> notified that any use or dissemination of this communication is strictly
> prohibited.  If you have received this communication in error, please
> notify us immediately by reply and delete this message from your system.
> 




More information about the pox-dev mailing list