Guest User

Untitled

a guest
Jun 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #/usr/bin/python
  2.  
  3. import sys
  4.  
  5. try:
  6. from hpilo import *
  7.  
  8. except ImportError:
  9. print "some bad err"
  10. sys.exit(1)
  11.  
  12. class Connect(object):
  13.  
  14. def __init__(self, hostname='1.2.3.4', login='lalala', password='lalala', timeout=60, port=443):
  15. self.hostname = hostname
  16. self.login = login
  17. self.password = password
  18. self.timeout = timeout
  19. self.port = port
  20.  
  21. def stuff(self):
  22. print self.login
  23. print self.port
  24.  
  25. def blah(self):
  26. session = Ilo(self.hostname, self.login, self.password, self.timeout, self.port)
  27. session.get_all_users()
  28. if __name__=="__main__":
  29. a=Connect()
  30. a.stuff()
  31. a.blah()
Add Comment
Please, Sign In to add comment