Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: I24daffca6667325bd7710e02e0b6a057935e9ac9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Run the sixer program to catch most common Python 3 issues and make
the code compatible with Python 2 and Python 3.
* Replace it.next() with next(it)
* Replace dict.keys()[0] with list(dict.keys())[0], since
dict.keys() now returns an dictview on Python 3. Same change
for dict.values()[0].
* Replace urlparse with six.moves.urllib.parse
* Replace __builtin__ with six.moves.builtins
Blueprint: murano-python-3-support
Change-Id: I9b95c3eee14c2de0010e9a3bbdffdda76496a03c
Python’s default arguments are evaluated once when the
function is defined, not each time the function is called.
This means that if you use a mutable default argument
and mutate it, you will and have mutated that object for
all future calls to the function as well.
more details about this wrong usage here:
http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments
Change-Id: Ic8eb1328852eb8a3180a08466bf18b72fd1f7956
It allows for Puppet as configuration language in the execution plans.
In addition, it creates a base class (ChefPuppetExecutorBase) for
sharing common methods between Puppet and Chef executors.
Change-Id: I65ae656117aa26fc7dff4f83a2be1b4d2c3cb58b