maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #00998
Re: extending MAASserver node schema
On 15/04/13 15:57, Bao Nguyen wrote:
> Hi,
>
> I'm interested in extending MAAS node model and the associate APIs
> interfaces so I can store an extra info about a node in MAAS that it's
> currently do not support. It's specifically for what we need and so Tag
> is not an option.
>
> I've got some Python experience and I've been pouring over quite a bit
> of MAAS, Django documentation over the weekend and I got as far as
> extending the schema to allow me to store this additional field.
>
> I'm looking to write a very simple function to update the field with
> some data and another one to read it. Would someone kind enough to show
> me what's the simplest way I can do this? I've look into extending the
> api.py and maas-cli to allow this behavior but it's quite a bit of code
> to go through and I though any help in exposing the relationships of the
> code or some sample code would help tremendously.
>
>
> thank,
> -bn
> 0216331C
>
>
>
Hi,
You should be ok with a simple field addition but beware, your change
might cause problems when you upgrade maas in the future because the
schema migrations might break.
I think a better way forward is to do an official upstream change to
support arbitrary user data. What are you trying to store that can't be
placed in tags?
J
Follow ups
References