/silverlining/commands/deactivate.py
Python | 15 lines | 12 code | 2 blank | 1 comment | 3 complexity | f95f884b831040e77af9d3611f2c76b3 MD5 | raw file
Possible License(s): GPL-2.0
- """Remove an instance from a location"""
- from silversupport.shell import ssh
- from silversupport import appdata
- def command_deactivate(config):
- if not config.args.node:
- config.args.node = appdata.normalize_location(config.args.locations[0])[0]
- if config.args.keep_prev:
- option = ['--keep-prev']
- else:
- option = []
- ssh('www-mgr', config.node_hostname,
- ['/usr/local/share/silverlining/mgr-scripts/remove-host.py']
- + option + config.args.locations)