[Maas-devel] Unique Space Names

Mike Pontillo mike.pontillo at canonical.com
Thu Nov 5 19:06:41 UTC 2015


On Thu, Nov 5, 2015 at 5:29 AM, John Meinel <john at arbash-meinel.com> wrote:

>    That is, we probably made it unique=False to work around this quirk in
>> Django, when we should have done it a slightly different way, such as the
>> one captured in the answer. (what we really wanted to say was, names must
>> be unique, unless they're NULL, in which case they will be represented by
>> ID instead.)
>>
>
> Sounds good. Given what a space means, I'd be tempted to not have ones
> that don't have a name, but instead have a NULL reference to a space for
> Fabrics and Subnets that have been autodiscovered. (As you say, a space is
> a user construct to aggregate subnets into logical groupings, and thus
> unlikely something that could be discovered.)
>

The current approach is almost much what you describe; we create a
"default" space (whose ID is always 0) and, newly-discovered objects are
always placed into the default space. (doing it the way you describe would
have worked, too, but then we'd need to worry about NULL or not-NULL edge
cases.)

Regards,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/maas-devel/attachments/20151105/996f0962/attachment.html>


More information about the Maas-devel mailing list