[Freeipa-users] Optionistic approach for new DNS API

Martin Kosek mkosek at redhat.com
Fri Dec 16 09:51:59 UTC 2011


On Thu, 2011-12-15 at 19:09 -0500, Adam Young wrote:
> On 12/14/2011 04:41 PM, Martin Kosek wrote:
...
> 
> > In CLI it may look like this:
> > # ipa dnsrecordmx-show example.com @ --structured
> >    Record name: @
> >      Record type: MX
> >      Data: 0 server1.example.com
> >      Preference: 0
> >      Exchanger: server1.example.com
> >
> >      Record type: NS
> >      Data: vm-068.idm.lab.bos.redhat.com.
> >      Hostname: vm-068.idm.lab.bos.redhat.com.
> >
> > instead of:
> >
> > # ipa dnsrecord-show example.com @
> >    Record name: @
> >    MX record: 0 server1.example.com
> >    NS record: vm-068.idm.lab.bos.redhat.com.
> This is OK, but it might be a little weird compared to the other 
> outputs.  Are any of the other ones indented like this?

I don't think so. There is some code in CLI output module to create
nested entries with increased indentation though. But this was just an
example, we think up something better and more consistent.

> 
> > Command help:
> > ~~~~~~~~~~~~~
> > - since dnsrecord-add would accept all options from all DNS RR types,
> > its list would be overwhelming and not very helpful
> > - we can take advantage of OptionParser option groups. The help may look
> > like this:
> >
> > $ ipa dnsrecord-add --help
> > Usage: ipa [global-options] dnsrecord-add DNSZONE NAME [options]
> >
> > Options:
> >    -h, --help  show this help message and exit
> >
> > SRV Options:
> >   --priority   Priority
> >   --weight     Weight
> >   --port       Port
> >   --target     Target
> >
> > MX Options:
> >   --priority   Priority
> >   --exchanger  A host willing to act as a mail exchanger
> > ...
> >
> > Interactive mode in CLI:
> > ~~~~~~~~~~~~~~~~~~~~~~~~
> > - ADD command:
> >    - when no option is passed to dnsrecord-add command, it may ask for
> > --type and then for the options specific for the particular type
> > - MOD command:
> >    - when no option is passed to dnsrecord-mod command, it may provide a
> > list of current DNS record values and ask for specific DNS record parts
> > to be changed for chosen value
> > - DEL command:
> >    - when no option is passed to dnsrecord-del command, it may provide a
> > list of current DNS record values remove the chosen value
> >
> > Any comments, suggestions? Do you think that introducing these new
> > options in current dnsrecord-add/mod/show/del commands would be better
> > and more usable that introducing these capabilities in separate
> > commands?
> 
> This is a big improvement.  Right off the top of my head I see no major 
> problems from the UI side,  and I think it will make things a lot easier 
> to work with than the older proposal.

Great, thanks for comments Adam.

Martin




More information about the Freeipa-users mailing list