On Mon, May 30, 2011 at 6:54 AM, Michael Hudson-Doyle <[email protected]> wrote: > Hi all, > > I'm working on the infrastructure that will underlie the scheduler > command line api. Zygmunt and I have the technical side understood I > think, but what I want to think aloud about is how the command line > should work for a user. In particular, I wonder how much state the > command line tool should save. > > The basic command line entry point is "submit a job". For now at least, > the job will be a JSON file, so the simplest possible invocation would > be: > > $ lava-tool submit-job test.json > > But this doesn't specify anything about where the job should go. The > least effort solution would be to require a full specification on the > command line: > > $ lava-tool submit-job --farm https://mwhudson:[email protected] > test.json > > This is clearly a bad idea though: tokens will be long and unwieldy and > passing it on the command line means they will be disclosed in ways that > we should avoid (they'll appear in ps output for all users and could > easily end up in log files). > > So we need a way of storing tokens. The easiest thing to do would be to > store a token for a (username, host) pair, so you'd run a command like: > > $ lava-tool auth-add --token-file token-file > https://[email protected] > > Then you'd still need to specify the username and host on every > invocation: > > $ lava-tool submit-job --farm https://[email protected] test.json > > Would this be too unwieldy do you think? For scripted or cronjobbed > invocations its probably fine, for the command line it might be a bit > awkward. But I don't know how much call there is for a genuinely > interactive tool here. > > I guess the point I've argued myself to here is that I should implement > this long form for now, and if a need arises add more conveniences (for > example, reading from an environment variable or adding a command to set > the defaults). Does anyone disagree too strongly with that?
you could also register short names in the "git remote" style... lava-tool add-farm myfarm http://[email protected] lava-tool submit-job --farm myfarm test.json -- - Alexander _______________________________________________ linaro-dev mailing list [email protected] http://lists.linaro.org/mailman/listinfo/linaro-dev
