PageRenderTime 82ms CodeModel.GetById 41ms app.highlight 1ms RepoModel.GetById 39ms app.codeStats 0ms

/silverlining/commands/clean_node.py

https://bitbucket.org/ianb/silverlining/
Python | 11 lines | 8 code | 2 blank | 1 comment | 1 complexity | 004e123ed04af1406868cc3a2523c704 MD5 | raw file
 1"""Cleans out unused instances from a server"""
 2from silversupport.shell import ssh
 3
 4
 5def command_clean_node(config):
 6    if config.args.simulate:
 7        simulate = '-n'
 8    else:
 9        simulate = ''
10    ssh('www-mgr', config.node_hostname,
11        '/usr/local/share/silverlining/mgr-scripts/clean-instances.py %s' % simulate)