Repository navigation
Conversation
When the ``static`` option was used outside the context of the ``batch`` option
the output would appear thusly:
```bash
salt -s 'seed*ord' test.ping --out json
```
```json
{
"seed-02.pgsql.revsys.000.lab.rackspace.ord": true,
"seed-01.pgsql.revsys.000.lab.rackspace.ord": true,
"seed-03.pgsql.revsys.000.lab.rackspace.ord": true
}
{
"seed-03.pgsql.revsys.000.lab.rackspace.ord": true
}
{
"seed-02.pgsql.revsys.000.lab.rackspace.ord": true
}
{
"seed-01.pgsql.revsys.000.lab.rackspace.ord": true
}
```
Using the default outputter results in minion responses being displayed twice.
If it is used with the ``batch`` option, it Does The Right Thing. Since
``batch`` needs logic to take care of the presense of ``static``, it made
sense to me to remove the `if options.static:` bits from the else half
of the `if options.batch:`, extending it to `if options.batch or
options.static:` and adding
`if not options.batch: self.config['batch'] = '100%'` to make cli.batch.Batch()
happy.
jfindlay
added a commit
that referenced
this pull request
May 5, 2015
…static__salt_CLI/v2015.2 Fix for double output with static salt cli/v2015.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resubmitted to the correct branch
Fix for incorrect output with salt CLI --static option
When the
staticoption was used outside the context of thebatchoptionthe output would appear thusly:
salt -s 'seed*ord' test.ping --out json{ "seed-02.pgsql.revsys.000.lab.rackspace.ord": true, "seed-01.pgsql.revsys.000.lab.rackspace.ord": true, "seed-03.pgsql.revsys.000.lab.rackspace.ord": true } { "seed-03.pgsql.revsys.000.lab.rackspace.ord": true } { "seed-02.pgsql.revsys.000.lab.rackspace.ord": true } { "seed-01.pgsql.revsys.000.lab.rackspace.ord": true }Using the default outputter results in minion responses being displayed twice.
If it is used with the
batchoption, it Does The Right Thing. Sincebatchneeds logic to take care of the presense ofstatic, it made sense to me to remove theif options.static:bits from the else half of theif options.batch:, extending it toif options.batch or options.static:and addingif not options.batch: self.config['batch'] = '100%'to make cli.batch.Batch() happy.