Advertisement
Guest User

Untitled

a guest
Aug 19th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. pprint(vars(self.snmp))
  2. pprint(repr(self.access_profile))
  3. pprint(repr(self.access_profile.snmp_ro))
  4. if self.snmp and self.access_profile.snmp_ro:
  5. print "Condition passed"
  6. try:
  7. su = self.snmp.get(mib["SNMPv2-MIB::sysUpTime", 0])
  8. return float(su) / 100.0
  9. except self.snmp.TimeOutError:
  10. pass
  11. else:
  12. print "Condition failed
  13.  
  14. Output
  15.  
  16. {'access_profile': <noc.sa.protocols.sae_pb2.AccessProfile object at 0x7f5c28b89ad0>,
  17. 'community_suffix': None,
  18. 'factory': <noc.sa.management.commands.debug-script.ActivatorStubFactory object at 0x7f5c28acb1d0>,
  19. 'script': <Script(Thread-2, started daemon 140033717696256)>,
  20. 'to_save_output': False}
  21. '<noc.sa.protocols.sae_pb2.AccessProfile object at 0x7f5c28b89ad0>'
  22. "u''"
  23. Condition failed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement