Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. from fabric.api import task, execute, run, env
  2.  
  3. @task
  4. def ipmitool(host, cmd):
  5.     run("ipmitool -H %s %s" % (host, cmd))
  6.  
  7. @task
  8. def list_ipmi_events():
  9.     host = env.host_string
  10.     result = execute(ipmitool, host, "sel list", hosts=["gateway.example.com"])
  11.     print result[host]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement