← Back to team overview

maas-devel team mailing list archive

Allow names instead of IDs ?

 

I was using the CLI some more to create spaces and subnets in them, and
kept running into the difficulty having to remember IDs rather than being
able to pass in names.

So I investigated what it would take to actually use names, and I came up
with this patch:
https://code.launchpad.net/~jameinel/maas/space-from-name/+merge/276632

It is by no means well tested or complete, but it did let me do "maas m1
subnet create name=foo space=bar" and have that work rather than "space=1"
and also lets me do "maas m1 subnet delete foo" instead of just the id.

Is this a sane direction to be going? I'm concerned about compatibility
because while "to_field_name" lets me change *what* key is used, it doesn't
let me allow IDs *or* names.

Thoughts appreciated,
John
=:->

Follow ups