Sort requirement files in alphabetical order

This makes code more readable, and can check whether specific library
in the requirement files easily. We also enforce the check in pep8.

Change-Id: I08434dd56d41a82045e4119e547b7b3f60d66698
Closes-Bug: #1285478
Python 3: Fix YamlEnvironmentTest tests

In Python 3, this happens:

>>> 'foo' in ValueError('foo')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: argument of type 'ValueError' is not iterable

We have to cast the Exception to make the tests work.

Change-Id: Ifc06c9860412030dc697b264812a6bf78e10eb8b
Output warnings for deprecated commands

There are various options which have been deprecated for a long
time but with no user-visble indication of the deprecated status.
So log a warning to encourage the user to switch to the new
interfaces instead of just having a strongly-worded docstring ;)

Hopefully this means we can, at some future point, justifiably
remove the duplicate deprecated functions.

Change-Id: Ia5d791de99e7238645beb7d7650d811225d9d9c6
Python 3: decode bytes before feeding them to jsonutils.loads()

urlopen(...).read() returns bytes in Python 3, so we cannot call
jsonutils.loads() on the output: we first have to decode() it.

Change-Id: I39504059a8c82347476dd88dfcbd060d58df13d0
Using common methods from oslo cliutils

Synchronize the cliutils from oslo to heatclient and use
the common methods.

used common methods:
+arg
+env
+print_list

partially implements blueprint common-client-library-2

Change-Id: If79d58794257325a47b9938a172a87097fc93e1b
Merge "Python 3: Fix YamlEnvironmentTest tests"
Merge "Using common methods from oslo cliutils"
Merge "Sort requirement files in alphabetical order"
Updated from global requirements

Change-Id: I24a254b13a88a69ea397f8b159d2f795a5737bd7
Merge "Output warnings for deprecated commands"
Python3: fix a bytes/str issue

test_curl_log_i18n_headers, introduced in
0b730e82b4bf63be1c3acd924a77a684a31db709, does not work with Python 3, because
Python 3, the headers must also be bytes,

Change-Id: I7baf737b3d9e2763a43eb593ca8ea733274a1107
Do not use the '+' operation with dict_items()

This operation is undefined in Python3, list() must be called first.

Change-Id: Ia8e06d5be6a0bd4426ad5ea5028fbe7d85fa12e2
Resolve files in resource types

This adds a new step resolving files in Resource type, allowing to embed
templates directly in stack files and referencing them in types.

Change-Id: I147894e51505b01ebfc3e1de982f20a45471c5cd
Closes-Bug: #1291445
get_file: do not read same url once again

Since for same url, the content is same. We just need to reuse the
content get_file read first time. No need to read it again.

Change-Id: I08bdb3e953e5ed44674d6adb18efb7ac2fbcd18e
get_file: encode non utf-8 encoding files via base64

So get_file can support binary file(zip, tgz), non utf-8 encoding
text(gb18030, utf16) files and utf-8 encoding files.

zip and tgz files may be used in chef cookbooks support.

Closes-Bug: #1284501

Change-Id: I72d9bc366f5a94c3c297cb8915ae7b0aa63a34d7
Merge "Updated from global requirements"
Merge "get_file: do not read same url once again"
Merge "get_file: encode non utf-8 encoding files via base64"
Skip timeout_mins when not specify

Don't pass timeout_mins to API calls when it's not provided by the user.

Change-Id: Ie50126e77e53caabb8e8ec5c3afbde9c4c623590
Closes-Bug: #1297723
Merge "Resolve files in resource types"