On the parsers cleanup branch, I though about making the available options as equal as possible. Since the log_file setting for the master and the minion could be separately set, I made the logfile option for the key also log_file. Yet, since there's no key specific config file, it shares master, one could only specify the log_file settings from the cli, it could not be hardcoded on the config file, unless, we made a separate config file just for key.
So, in order to reduce required changes, and keep it all as backwards compatible as possible, the key log file options is now, once again, `--key-logfile` which will allow us to hardcode it in the masters config file as `key_logfile`.
This will also, hopefully make travis behave better too.
Python has a specific function to join paths for a reason. Let's see some examples why:
```python
>>> import os
>>> p1 = '/'
>>> p2 = 'foo'
>>> os.path.join(p1, p2)
'/foo'
>>> os.sep.join([p1, p2])
'//foo'
>>> p2 = '/foo'
>>> os.sep.join([p1, p2])
'///foo'
>>> os.path.normpath(os.sep.join([p1, p2]))
'/foo'
>>> p2 = 'foo'
>>> os.path.normpath(os.sep.join([p1, p2]))
'//foo'
>>> p2 = '/foo'
>>> os.path.join(p1, p2)
'/foo'
>>>
```
Also, python docs also state the knowing the OS separator is not always enough to parse/join paths, see http://docs.python.org/library/os#os.sep
There are some posts on the internet which state that `os.sep.join` is faster that `os.path.join`, and, most likely it is, but is it THAT faster? Does that really make a difference in salt's context, specially since it's error prone as shown above?
When using `--no-clean` while running tests, some files/dirs still need to be removed, if not, test will fail. This commit tries to addresses those issues.
Now, when running the salt loader, we get dotted names for the loaded modules, states, etc.
Instead of, for example `foo_module`, `bar_state`, we now get `salt.loaded.module.foo` and `salt.loaded.state.bar`, etc.
This will greatly help using the granular log filtering.
Reused the output options and logging setup mix-ins.
Fixed a bug introduced in previous commit on `salt.utils.parsers.SaltCPOptionParser._mixin_after_parsed()`, function does not accept any arguments.
For this, the timeout mix-in and both the target and output parser group mix-ins were re-used. Way less code and logic to keep track of.
Added a simple test for this binary too.
* Created 2 mix-ins as option groups, the output options and the target options. This will allow adding some explanatory text besides separating these options from the parser's main options.
* All options on the parser, including the grouped options are now merged to the loaded configuration which will latter get passed on.
* Also created the timeout mix-in which will be used in other binaries.