[Nodeshot] Latest changes thanks to your feedback

nemesis nemesis at ninux.org
Wed Nov 20 22:28:52 CET 2013


 On Wed, 20 Nov 2013 21:25:44 +0100, Clauz <clauz at ninux.org> wrote:
> On 11/20/2013 06:22 PM, Nemesis wrote:
>> Hi,
>>
>> First of all, thankyou all for the feedback you are sending.
>>
>> I've done most of thechanges that I needed to do after receiving 
>> your
>> answers to my latest technical questions.
>> This is surely the way to go, after receiving yourfeedback I feel 
>> much
>> more secure, so please keep to do so!
>>
>> And good news, hey Clauz, look at this code:
>>
>> *>>> device = Device.objects.get(name='RM5PomeziaSNode')**
>> *(0.015) SELECT "net_device"."id", "net_device"."added",
>> "net_device"."updated", "net_device"."access_level",
>> "net_device"."name", "net_device"."node_id", "net_
>> device"."type", "net_device"."status", "net_device"."location",
>> "net_device"."elev", "net_device"."os", "net_device"."os_version",
>> "net_device"."first_seen", "
>> net_device"."last_seen", "net_device"."description",
>> "net_device"."notes", "net_device"."data", "net_device"."shortcuts" 
>> FROM
>> "net_device" WHERE "net_device"."
>> name" = 'RM5PomeziaSNode' ; args=('RM5PomeziaSNode',)
>> *>>> device.connector.connect()**
>> *True
>> *>>> device.connector.get_os()**
>> *('AirOS', 'XM.ar7240.v5.3.3.sdk.9634.111221.2238')
>> *>>> device.connector.get_wireless_output_power()*
>> 27
>> *>>> device.connector.get_wireless_channel()**
>> *'5765'
>>>>> *device.connector.disconnect()*
>>
>> I'm slowly getting the syntactic sugar I desire! And it's self
>> explanatory! :)
>
> Very sweet! :)
>
>> It willbe super cool to have a connector_class that uses SNMP or any
>> other lighter protocol instead of SSH.
>> This would save us the need of having to call "connect()" and
>> "disconnect()".
>
> Perhaps you can connect on the __init__ of the connector object and
> disconnect on __del__ ?

 I tried before, but the automatic SSH connection on init slowed down 
 the application in certain situations.
 Maybe I will try again ;-)


> Clauz
>
>
>
>
> _______________________________________________
> Nodeshot mailing list
> Nodeshot at ml.ninux.org
> http://ml.ninux.org/mailman/listinfo/nodeshot




More information about the Nodeshot mailing list