Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/python
- import sys
- try:
- from hpilo import *
- except ImportError:
- print "some bad err"
- sys.exit(1)
- class Connect(object):
- def __init__(self, hostname='1.2.3.4', login='lalala', password='lalala', timeout=60, port=443):
- self.hostname = hostname
- self.login = login
- self.password = password
- self.timeout = timeout
- self.port = port
- def stuff(self):
- print self.login
- print self.port
- def blah(self):
- session = Ilo(self.hostname, self.login, self.password, self.timeout, self.port)
- session.get_all_users()
- if __name__=="__main__":
- a=Connect()
- a.stuff()
- a.blah()
Add Comment
Please, Sign In to add comment