API: set model in data center asset components

Dear all,

I see that the ethernet component has also a “model” field that accepts a pk as a value. Unfortunately, I didn’t find a way to create this kind of model, both via the web interface and the API. The API doesn’t accept IDs that comes from assetmodels.

How do I do it?

Thanks,
Serena

Does this thread answer your question? Api: Assign ipaddress object to data-center-assert object

Hi Marcin,

no, that thread doesn’t help me. If you notice, I was the one to answer to Mik. My question is different and related to the field “model” that belongs to ethernet components.

This is still an issue for me - is there a way to use the “model” field of the ethernet component? If yes, how do I do it? Which objects accepts?

This fields is not exposed yet, but it should be easy to do so.

Historically we(as Allegro) didn’t use global compoments catalogue, since there were differences between hardware models, but nonetheless, this model is there to use it.

@master.mateusz what do you think?

Hi @Serena , quick answer to your question: no, it is not possible at the moment.

You can use the model_name text field, however bear in mind that this may lead to inconsistencies - for example a typo will mean that the same model will be named differently in different places.

We don’t use this relation in our organization at the moment and therefore are not planning to change this in the nearest future. However if you know Python and Django, you are welcome to contribute to Ralph’s source code. We will be happy to review your PR and provide assistance if required.

1 Like