PageRenderTime 121ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 58ms app.codeStats 0ms

/silverlining/commands/deactivate.py

https://bitbucket.org/ianb/silverlining/
Python | 15 lines | 12 code | 2 blank | 1 comment | 3 complexity | f95f884b831040e77af9d3611f2c76b3 MD5 | raw file
 1"""Remove an instance from a location"""
 2from silversupport.shell import ssh
 3from silversupport import appdata
 4
 5
 6def command_deactivate(config):
 7    if not config.args.node:
 8        config.args.node = appdata.normalize_location(config.args.locations[0])[0]
 9    if config.args.keep_prev:
10        option = ['--keep-prev']
11    else:
12        option = []
13    ssh('www-mgr', config.node_hostname,
14        ['/usr/local/share/silverlining/mgr-scripts/remove-host.py']
15        + option + config.args.locations)