Uses os.sep instead of unix-style paths in the test
Uses salt.utils.path.islink() to detect symlinks instead of
os.path.islink(). os.path.islink() does not correctly detect symlinks in
Windows
Put grp and pwd imports inside a try/except block
Moves the `get_colors` and `get_color_theme` out of `salt.utils.py`
and into a new file named `salt.utils.color.py`.
This PR moves the original functions, adds a deprecation warning to
the old function paths, and updates any references to the functions
in Salt code to the new location. This includes moving a test as well.
Through merge forwards, some of the old-style paths have made their
way into develop. This PR corrects some of these instances on the more
popular functions.
`iptables-save` can return rules like this one:
```
-A PREROUTING -m connmark ! --mark 0x0/0xffff0000 -j CONNMARK \
--restore-mark --nfmask 0xffff0000 --ctmask 0xffff0000
```
which leads to the following behavior:
```
$ salt '*' iptables.get_rules
minion:
Minion did not return. [No response]
```
This commit fixes the behavior of `iptables.get_rules` in this case,
which also fixes the `iptables.append` state when such a rule already
exists on the minion.
add support for unicode symbols in vm names.
fix for '''UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 5: ordinal not in range(128)'''
This makes the following changes:
1. Renames the valid_providers param in GitBase to git_providers,
allowing for a dictionary mapping provider names to their associated
classes. This allows for alternate providers to be used with a
GitBase subclass.
2. Renames the get_provider function to verify_provider to reduce
confusion with git_providers.
3. Uses super() to run a parent class' dunder init instead of invoking
the parent class directly.
At my $DAYJOB, OpenStack catalog contains identity endpoints v2 and v3.
In order to differentiate between them, admins came up with identityv3
service type. This patch allows me to write:
provider-id:
driver: nova
identity_service_type: identityv3
to make use of identityv3 endpoint in this setup.