Commit graph

165 commits

Author SHA1 Message Date
Angus Salkeld
6a5e8b7e86 Add doc/Makefile to help with building docs
Change-Id: I8894705891a02c06919e1b1c816ceb5137609b81
Partial-bug: #1153824
2013-10-29 20:29:30 +11:00
Kui Shi
30032302f3 Fix the testname of scenario
Duplicated testname in scenarios will result duplicated testname
by testscenarios, they can not be sorted in PY33 env, and will
induce TypeError:
TypeError: unorderable types: StackManagerNoPaginationTest() <
StackManagerNoPaginationTest()

Close-Bug #1243096

Change-Id: I4c02c9f3868495ec4399f795e864f26afc3d26b7
2013-10-24 18:07:30 +08:00
Jenkins
ca72a42ad9 Merge "align the order of parameters for urlencode()" 2013-10-23 18:52:48 +00:00
Kui Shi
c27fc77fe2 remove python 2.5 support for parse_sql
Python 2.5 is not supported anymore, remove the obsolete code for parse_sql.

Close-Bug #1243418

Change-Id: Ib87bde26a9b44555a36e3831f6aa33a6b3a4ba21
2013-10-23 05:47:29 +08:00
Kui Shi
e169704084 align the order of parameters for urlencode()
In Python 3.3, hash randomization is enabled by default. It causes the
iteration order of dicts and sets to be unpredictable and differ across
Python runs.

In the test case, the fixed expecting string will not match the test
result, it is relying on the dict order.

This change transforms the input dict to a sequence of two-element list,
with fixed order, and exchange the order of "limit" and "marker" for
expecting string.

Partial implement: blueprint py33-support

Change-Id: If9c25fb0d457b31034111e7e879f1f95a576a78f
2013-10-23 05:45:13 +08:00
Kui Shi
6681e72d83 Replace urllib/urllib2 with urlutils
The update of urlutils is same as follows:
https://review.openstack.org/#/c/52875/

Partial implement: blueprint py33-support

Change-Id: Iac43acd616504ede12bcdb4df15e32bb636a09c6
2013-10-23 05:38:11 +08:00
Kui Shi
6ae8c07d5c Transform print statement to print function
Partial implement: blueprint py33-support

Change-Id: Ieed61447746bc5f598dcdfa89362aaa93f7c0dec
2013-10-23 05:19:37 +08:00
Kui Shi
d07ec04e19 Use the six library for compatability
Replace dict.iteritems() with six.iteritems(dict)
Import six for StringIO
Import urlutils for urlencode

Partial implement: blueprint py33-support

Change-Id: Ieae1299915168ef10ff54e0a9e9a346350e9d1fb
2013-10-22 16:03:53 +08:00
Kui Shi
e274a23dfc Import urlutils from openstack common
Import urlutils for compatability issue
Remove obsolete code of Python 2.5 support

Partial implement: blueprint py33-support

Change-Id: I53515aa0f6f5c936e0d1a4f44b0ebf4998c59492
2013-10-22 15:41:47 +08:00
OpenStack Jenkins
5e145a5b1e Updated from global requirements
Change-Id: Ib9080a3f924d23fe203d27cc23a4b8f666cbf5b4
2013-10-17 22:23:44 +00:00
Kui Shi
c39ce1f20c Import httplib from six.moves
Partial implement: blueprint py33-support

Change-Id: I4e2a7020c726717fa1e28926a04d97066bdf79ec
2013-10-16 06:29:05 +08:00
Kui Shi
8c61700fad Replace mox with mox3
Mox3 is an unofficial port of the Google mox framework
(http://code.google.com/p/pymox/) to Python 3.
https://pypi.python.org/pypi/mox3

Align with global-requirement and update the importing clause.

Partial implement: blueprint py33-support

Change-Id: I5d46d30b72b8504977d8d1891b3b0c81714e9099
2013-10-16 06:26:19 +08:00
Jenkins
ecec0b1ead Merge "Allow env registry paths to be relative to env file" 2013-10-12 08:20:10 +00:00
Steve Baker
8b35d094ba Allow env registry paths to be relative to env file
The default base_url is now derived from the location
of the environment file, so now resource registry paths
can be relative instead of absolute URLs.

This change also includes the following:
* more complete test coverage
* refactor of _process_environment_and_files and
  _get_file_contents to make test coverage easier
* use the full URL instead of just the file name in the
  'files' field to avoid key clashes
* make _get_file_contents less specific to the resource registry
  so it can be used for other inclusion tasks
* stop calling _get_file_contents recursively so that deep URLs
  do not get loaded, instead call _get_file_contents on
  resource_registry and resource_registry.resources.*
Closes-Bug: #1233912

Change-Id: Ic729cbcd1711b89e91daf0d645f4f56bae2accf3
2013-10-08 13:36:10 +13:00
OpenStack Jenkins
1051c27b5a Updated from global requirements
Change-Id: I3897837748e4fbcd23128b235079f8e73400a56d
2013-10-01 16:14:44 +00:00
Jenkins
96dbb0911c Merge "Allow -P to be invoked multiple times" 2013-09-27 04:27:41 +00:00
Steve Baker
795d52c641 Allow -P to be invoked multiple times
If --parameters is specified more than once it is assumed
that each one contains only one parameter key=value.

This means semicolons are ignored if there is more than one -P
specified.

This should be fully backwared compatible, a single -P will
be assumed to be semicolon delimited.

Change-Id: Ic202ff3e0596b786cd5b07c53509f97a95d41585
Closes-Bug: #1224825
Closes-Bug: #1229030
2013-09-25 16:10:32 +12:00
ZhiQiang Fan
455b1cb4e8 Replace OpenStack LLC with OpenStack Foundation
Change-Id: I8f2697ca99192078d5db2adb4db98287520d9895
Fixes-Bug: #1214176
2013-09-20 04:21:21 +08:00
Jenkins
978e3f4542 Merge "Add handler for heatclient.common.http" 2013-09-11 20:48:34 +00:00
Jenkins
120efdb9cf Merge "Stack instance identifier property" 2013-09-11 17:22:57 +00:00
ZhiQiang Fan
ebb57f1095 Add handler for heatclient.common.http
If no handler is found, add StreamHandler to LOG

Closes-Bug: #1220532
Change-Id: I32d541d242845b7311fd6810a5e87f07fafd8efd
2013-09-04 14:39:31 +08:00
ZhiQiang Fan
5cb3fc07d5 Support --version for heatclient
Closes-Bug: #1220524
Change-Id: Id78f7c7c78d31c0126b43f7a846f02f2542b0b7c
2013-09-04 14:29:56 +08:00
Jenkins
e2cbb45036 Merge "Be backward compatible after a renaming in API" 2013-09-04 03:35:34 +00:00
Jenkins
a7ffcd76d0 Merge "Fix and enable Hacking H501 warning" 2013-09-04 03:12:33 +00:00
Steve Baker
3146d22b70 Stack instance identifier property
The identifier property formats the stack name and ID for
REST API request paths.

This has the following consequences for each action method:
- get, same behaviour but using the identifier property
- delete, using the full identifier avoids one http redirect
- update, this method was non-functional before this change, and is
  now fixed

Change-Id: Ib2b12826243e25772acccb8ca56039e54d3857d5
2013-09-04 12:44:07 +12:00
Alex Gaynor
9d19772089 Added support for running the tests under PyPy with tox
This is a precursor to having them run under check and gate.

This also fixes a single test which fails on PyPy, the test failes at
because it assumes a ``dict`` has a particular order for its keys when
it is printed out, on PyPy dicts have a different order sometimes, the
exact ordering is not a guarnteed property of Python.

Change-Id: Ie86726a0221e5e9aa68f7303d8ca8c7acd878f65
2013-09-03 17:32:09 -07:00
Dirk Mueller
d48d3587bd Fix and enable Hacking H501 warning
Enable Gating on H501. Fix the only two cases
that trigger.

Change-Id: Ib309b989df6556d7436e718e1497ce4dcacc83d6
2013-09-02 21:39:21 +02:00
Swann Croiset
b95657fd15 Be backward compatible after a renaming in API
The need was introduced with the renaming of field logical_resource_id
to resource_name, so let heatclient display the good one for the two
Heat versions.

Fixes bug #1216903

Change-Id: I3e86f482a1b814a27b15be3c102727c44153221f
2013-08-29 16:37:45 +02:00
Jenkins
a5d71080ef Merge "Add X-Region-Name parameter in HTTP request" 2013-08-27 15:35:58 +00:00
Swann Croiset
6f99131805 Rename event logical_resource_id to resource_name
Required by Heat change (https://review.openstack.org/#/c/43391/)

fixe bug #1216903

Change-Id: I77201348df401d5bafc7109bb4d032dd071468d8
2013-08-26 15:19:37 +02:00
Jenkins
0b2122eae1 Merge "Do not obscure Unauthorized error messages" 2013-08-25 23:21:18 +00:00
Nachi Ueno
1426237c38 Add X-Region-Name parameter in HTTP request
In order to specify region_name, we let client send
the OS_REGION_NAME in header file

Fixes bug 1213291

Change-Id: Ie44f700ca7e412c2504b6b8faac3fd65d4fd744b
2013-08-22 15:18:54 -07:00
Nachi Ueno
e540b68416 Apply OS_REGION_NAME for endpoint selection
Even if we got OS_REGION_NAME on CLI, the value is not used.
In this commit, we apply OS_REGION_NAME for endpoint
selection.

Fixes bug 1215588

Change-Id: Ib2e2f655282b2730a9a3b7337e56993253972ce1
2013-08-22 12:24:15 -07:00
Steve Baker
e81f590ea9 Do not obscure Unauthorized error messages
All Unauthorized exceptions are currently trapped and
the following message is printed:
    Invalid OpenStack Identity credentials.

This is unhelpful now that heat-api is providing structured
errors with (sometimes) helpful context for authorization failures.

This change removes this error trapping and prints the intended
error message.

Change-Id: Ibd943deb1f365e5f212225be1e675beb14accf97
2013-08-21 10:26:21 +12:00
Jenkins
c0457ff0d4 Merge "Generate a template from a resource" 2013-08-13 20:57:02 +00:00
JUN JIE NAN
2d1592e934 Fix heat event list sorted order incorrect
The order is correct already if python heat client does not recorder
it. Add option to make print_list not to reorder possible, and call it
in do_event_list.

Change-Id: I3f0990aff27df39371c583d5aae3edd106542ad1
Fixes: bug #1209506
2013-08-08 16:40:17 +08:00
Monty Taylor
cf4b5c82c4 Updated from global requirements
Change-Id: I1687d51bddb873549163dcf488fc40cdd9edcb29

Change-Id: Ic4a43955526fcde313ad2f2afec8fafeb87f37a6

Change-Id: Ic4a43955526fcde313ad2f2afec8fafeb87f37a6

Change-Id: Ic4a43955526fcde313ad2f2afec8fafeb87f37a6

Change-Id: If137689e5b9008c51cea16d41e648f0df490a247
2013-08-07 19:02:44 -03:00
Andrew Plunk
68999ba81f Generate a template from a resource
Setup the command line options and calls for generating
a template from an installed resource.

blueprint resource-template

Change-Id: If533bd90b1ec73bbe2603b55a0a7621879d355ec
2013-08-07 09:47:40 -05:00
Steve Baker
2c05c73a6b Remove unused Stack data method
Change-Id: Ia3fce29a58957b84f2eba33ac1b2ecfb04543939
2013-08-07 12:57:03 +12:00
Steve Baker
79dea076db Do not paginate stack list unless page_size is set
Pagination on the server has not yet been implemented, however
the client assumes it is, causing infinite recursion when paginate
is called.

With this change, no pagination is attempted unless page_size is
specified. However the 'limit' parameter is still honored, so it
is still possible to cap the total number of results returned.

heatclient users should not set page_size until pagination has been
implemented on the server. The stack list in Horizon currently
does not attempt to paginate, so is not affected.

Fixes: bug #1207839
Change-Id: I4087d3a8af48206d6ebe3edc441469464e4a401a
2013-08-07 12:56:58 +12:00
Steve Baker
ea0e957978 Custom Stack get method to avoid lookup redirects
Change-Id: I15dd4e9168cba6fd05371fed097d52cbf33cb15d
2013-08-07 10:40:13 +12:00
Steve Baker
6f7239f67b Fix Stack instance delete method
The current instance delete method assumes that a Stack
instance can be passed to the manager delete method, however
the manager delete method only accepts a stack identifier.

Change-Id: I87c30be1ea43695b7e13953531ea282fd8d386f8
2013-08-07 10:37:58 +12:00
Steve Baker
18e110dbf0 Add mock as a test requirement
A project-wide concensus is forming that mox should be phased
out and mock should be encouraged for writing new tests.

This change allow mock to be used for new tests.

Change-Id: I3cdf77bbeadd419b811bddcc31f048c1c6ec38bb
2013-08-07 10:36:34 +12:00
Monty Taylor
9104cb00a1 Sync with global requirements
Change-Id: Iad82b688da07f3aa83a9850b5ea9fe2beb51019e
2013-08-05 18:43:13 -03:00
Steve Baker
529d429d49 Implement Stack status and action properties
This splits the stack_status back to an action and status,
as it is represented internally in heat-engine.

It assumes there will not be an action which contains an _.

This change is needed for code (such as tempest) which assumes a
convention of all openstack client resources having a status property.

Change-Id: If00db5508bf8469b1106cac20b8fc10f7e1a854d
2013-08-02 14:45:25 +12:00
Jenkins
cae2c0fd7b Merge "Parse error object (in json format) returned by heat-api" 2013-07-30 05:09:12 +00:00
Jianing YANG
2b83260feb Parse error object (in json format) returned by heat-api
With this fix, heatclient will display a clear error message when
encounter an server-side error. Additionally, the corresponding
traceback will be displayed when "--verbose" is set.

Change-Id: I99b828465f61478a3c63fcf549d044a62523be1f
2013-07-26 20:52:04 +08:00
Jenkins
e5d68a48af Merge "Set credentials headers if there is no auth token." 2013-07-22 17:23:49 +00:00
Jenkins
34993c6b69 Merge "Validate heat url is supplied for --os-no-client-auth." 2013-07-22 17:22:48 +00:00
Steve Baker
78c98ee91b Set credentials headers if there is no auth token.
Credentials will be set instead of a token for all invocations where
--os-no-client-auth is specified.

Change-Id: I35a81a9518833ce9758228266deb36c8073f9fb8
2013-07-19 14:09:34 +12:00