Closed chemelli74 closed 2 years ago
Thank you for your PR. Having the property device_uptime
I see the point to have also a wan_uptime
property, but would prefer to set it just as an alias for uptime
.
@property
def wan_uptime(self):
"""
WAN uptime in seconds.
Alias for self.uptime with more specific name.
"""
return self.uptime
May be the other ay around: uptime as an alias of wan_uptime ? So in future you can remote uptime ?
Simone
That's what has come first into my mind too. But self.uptime
gets called from several other places and there is not really a need to deprecate it. So adding wan_uptime
as an alias is less work and less error prone.
I suppose
connection_uptime
as an alias foruptime
(without deprecation) is a better name in combination withdevice_uptime
. Would you like to adapt the code for merging?
Done ;-)
Simone
Thank you. There is a tiny error: as
connection_uptime
is a property it should not get called as a function fromuptime
.
Indeed, that's correct; did the change on the fly and introduced that tiny error.
Simone
Do you mind releasing a new version ? Thx in advance
Simone
wan_uptime
: seconds since last WAN connectiondevice_uptime
: seconds since last rebootuptime
: generic call forwan_uptime