MXS-1929: Rename alter service filters

The command naming caused problems when other parts of the service were
being altered. The parser doesn't seem to handle the case of overlapping
commands that well.

Updated test cases with new code and adjusted syntax accordingly.
This commit is contained in:
Markus Mäkelä
2018-08-08 09:37:39 +03:00
parent c56ef3cc27
commit f3a64f0b56
3 changed files with 8 additions and 10 deletions

View File

@ -93,7 +93,7 @@ exports.builder = function(yargs) {
return updateValue(host, 'services/' + argv.service, 'data.attributes.parameters.' + argv.key, argv.value)
})
})
.command('service filters <service> [filters...]', 'Alter filters of a service', function(yargs) {
.command('service-filters <service> [filters...]', 'Alter filters of a service', function(yargs) {
return yargs.epilog('The order of the filters given as the second parameter will also be the order ' +
'in which queries pass through the filter chain. If no filters are given, all ' +
'existing filters are removed from the service.' +
@ -102,7 +102,7 @@ exports.builder = function(yargs) {
'will set the filter chain for the service `my-service` so that A gets the ' +
'query first after which it is passed to B and finally to C. This behavior is ' +
'the same as if the `filters=A|B|C` parameter was defined for the service.')
.usage('Usage: alter service filters <service> [filters...]')
.usage('Usage: alter service-filters <service> [filters...]')
}, function(argv) {
maxctrl(argv, function(host) {
return setFilters(host, argv)