MXS-1929: Add create/destroy filter commands

Added the creation and destruction commands for filters to MaxCtrl.
This commit is contained in:
Markus Mäkelä
2018-07-23 18:45:58 +03:00
parent 605a723d97
commit 3f338c8672
2 changed files with 39 additions and 9 deletions

View File

@ -55,6 +55,14 @@ exports.builder = function(yargs) {
return doRequest(host, 'services/' + argv.name, null, {method: 'DELETE'})
})
})
.command('filter <name>', 'Destroy an unused filter', function(yargs) {
return yargs.epilog('The filter must not be used by any service when it is destroyed.')
.usage('Usage: destroy filter <name>')
}, function(argv) {
maxctrl(argv, function(host) {
return doRequest(host, 'filters/' + argv.name, null, {method: 'DELETE'})
})
})
.command('user <name>', 'Remove a network user', function(yargs) {
return yargs.epilog('The last remaining administrative user cannot be removed. ' +
'Create a replacement administrative user before attempting ' +