Skip to content

Commit

Permalink
Documented pf-server-restart and included a basic implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
KayEss committed Feb 10, 2012
1 parent e278792 commit e04d4a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.markdown
Expand Up @@ -53,6 +53,10 @@ If multiple roles set an AMI, instance size or region then the last one that doe

pf-server-list client-name

## pf-server-restart ##

pf-server-restart client-name reservation

## pf-server-role-add ##

pf-server-role-add client-name hostname _roles_
Expand Down
23 changes: 23 additions & 0 deletions bin/pf-server-restart
@@ -0,0 +1,23 @@
#!/usr/bin/env python
import fabric.network
import logging
import sys

from profab.server import Server


def main(client, hostname):
logging.basicConfig(level=logging.INFO)
server = Server.connect(client, hostname)
if server:
server.restart()
else:
logging.error("Could not find a server instance")


if __name__=="__main__":
try:
main(*sys.argv[1:])
finally:
fabric.network.disconnect_all()

0 comments on commit e04d4a6

Please sign in to comment.