[Interop-dev] Round 2: Network Device Config JSON Schema
Nemesis
(spam-protected)
Wed Nov 5 13:02:14 CET 2014
On 11/05/2014 12:44 PM, Mitar wrote:
> Hi!
>
>> Yes we should, and something I need right now is a schema that is able
>> to tell me information like cpu, ram, and so on.
> Tell you what is measured CPU and RAM, or configured CPU and RAM?
A real, physical device has an intrinsic CPU and RAM, while a virtual
one must have it configured because it won't use everything that is used
on the host, I suppose.
>> I was not implying that we should define everything, just that we should
>> make it possible to have a few attributes that do not necessary mean
>> that they can be changed by some software.
> True. But it should be clear that it is configuration. Not monitoring.
> So yes, there are cases when it is necessary to configure also RAM and
> CPU. I have not seen such cases in mesh networks, but if you have such
> needs, then let's define it. Just we should be careful to carefully
> define that it is configuration, not measurement.
Ok for me.
>
>> Indeed the information represented here is something I'm also extracting
>> via SNMP.
> Yes, but SNMP is measurements, not configuration. No?
Not exactly.
If certain mibs are implemented you can use SNMP to retrieve device
name, firmware version, device model, total RAM.
For example on AirOS:
name:
https://github.com/ninuxorg/netengine/blob/master/netengine/backends/snmp/airos.py#L43
model:
https://github.com/ninuxorg/netengine/blob/master/netengine/backends/snmp/airos.py#L50
ram:
https://github.com/ninuxorg/netengine/blob/master/netengine/backends/snmp/airos.py#L367
SNMP can be also used to change configurations, although I never tried.
>
>> But is there a known and widely adopted JSON schema already? If yes
>> please provide information.
> We could translate some existing XML schema into JSON schema?
We could, if you could suggest some XML schema that was successfull -
that is - it was adopted by at least 3 or 4 open source softwares.
> And sadly I don't know much about industry standards. :-( So not sure if
> there are things already there. But for general network devices there
> probably is.
Writing "probably" is not enough. We have to try harder.
>
>> Is there a JSON schema that is already being used by few softwares that
>> deal with networks?
> For configuration or monitoring?
Both. Do you know any JSON schema that people tried to define and adopt?
>
>> I thought that every software implemented its own JSON API, XML or
>> whatever, but I might be wrong. It would be much better if you provided
>> some links or some background info.
> https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py
>
Ok, that's the sql alchemy model of open stack nova, it is not a JSON
schema that can be used/shared by different libraries or applications
written in different languages, using different databases, and so on.
Federico
More information about the Interop-dev
mailing list