trento-project / agent

Trento Agent is a little process running in your OS, collecting metadata about SAP hosts.
Other
4 stars 10 forks source link

Discover host ip address netmasks #346

Closed arbulu89 closed 2 months ago

arbulu89 commented 2 months ago

Description

Discover host netmasks and send them in thenetmasks field. Each value corresponds the value in the same position for ip_addresses.

I'm aware that this "position related" usage is not optimal, and actually, in the 1st commit I implemented a more complex struct to send complete network interfaces. But this makes compatibility between old web/new agent, new web/old agent more difficult, so I sticked to simplest solution.

If for some reason, in the future we need more information about network interfaces, I finally think that we will need something more complex implementation that eventually will require some upgrade in api versioning or even major version of agent/web.

How was this tested?

Partially tested... We don't have any code testing host discoveries, and in fact, testing network related things is pretty difficult. Basically the serialization as json is the unique thing that it is tested. In any case, the used functions are not changed, just the composed final code, so as everything was working now, i expect that it will continue working