On 12/14/2011 3:41 PM, Martin Kosek wrote:
ipa dnsrecord-mod ZONE NAME VALUE? --type=mx --preference=0
ipa dnsrecord-del ZONE NAME --type=mx --preference=0 
--exchanger=server1.example.com.


I think the mod & del commands should use the same way to specify the existing data.

If we use the raw data, it should be specified as an option instead of an argument:

  ipa dnsrecord-mod ZONE NAME --type=mx \
    --rec-data="10 server1.example.com." --new-preference=20

  ipa dnsrecord-del ZONE NAME --type=mx \
    --rec-data="10 server1.example.com."

Alternatively we can use separate option for each parameter:

  ipa dnsrecord-mod ZONE NAME --type=mx \
    --preference=10 --exchanger=server1.example.com. \
    --new-preference=0

  ipa dnsrecord-del ZONE NAME --type=mx \
    --preference=10 --exchanger=server1.example.com.

Or we can support both.

- SHOW and FIND commands do not need this new --type parameter

We can also add --types to specify the record types we want to get back in the result. This could be useful in case we want to refresh a certain table only in the record details page. Low priority.

BTW, I'd rather use --rec-type instead of just --type because 'type' seems to be more generic. In case a certain DNS record type also has a 'type' parameter, it might conflict with that. Another possibility is to use a prefix for all type-specific options, e.g. --mx-preference.

- 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

For consistency the mod & del commands can also ask for the type, then show the list of records in that type. This way the list can be shown in a nicely formatted table rather than just raw data.

--
Endi S. Dewata

_______________________________________________
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users

Reply via email to