libremesh / lime-ui-ng

New generation user interface for libremesh
GNU General Public License v3.0
3 stars 3 forks source link

Implement get_internet_status #7

Closed nicoechaniz closed 7 years ago

nicoechaniz commented 7 years ago

Should return Internet connectivity status.

May differentiate IPv4 and IPv6 status returning a result with this structure: { "IPv4": "reachable", "IPv6": "reachable" }

Related to libremesh/lime-app#34

gmarcos87 commented 7 years ago

I think a more granular structure can be expanded more easily in the future. If we have to add attributes or handle errors we can do it without breaking anything. Like:

{
  "IPv4" : {
     "reachable" : true
  },
  "IPv6" : {
     "reachable" : true
  }
}

With others atributtes:

{
  "IPv4": {
     "reachable" : true,
     "ip": "10.5.5.5"
  },
  "IPv6": {
     "reachable" : false,
     "error": {
         "code": 0,
         "msg": "Example error message"
     }
  }
}

I do not remember what limitation with objects and lists has Lua.