14 Commits

Author SHA1 Message Date
tengqm
63b8839741 Fix client constructor for ease of use
This patch optimizes the client constructor so that caller doesn't have
to provide user_preferences or user_agent arguments. It would be a
convenience for projects such as senlin-dashboard.

Change-Id: I0e98fb055441a941ad7c9da6e36b4a388ae0a75a
2015-09-30 04:45:26 -04:00
yanyanhu
b38061528d Sync ProfileAction implementation with latest SDK code
Change-Id: Ia84b785833460af4fc569a8b27d23f55f83d2448
2015-08-14 04:12:21 -04:00
tengqm
d355c0b65a Fix list operation based on sdk interface
The SDK provides an additional parameter 'paginated' for specifying
whether the result will be paginated at server side. This feature saves
us from hacking the list function.

Also, the latest SDK revision has consolidated all kwargs in to a single
parameter named 'params'. This patch also fixes this problem.

Change-Id: Ib4ce1d03d18fe38cb655c541547faf41f3312a26
2015-07-18 01:55:59 -04:00
yanyanhu
223f7b8698 Replace sdk user_reference module with profile
user_reference module has been replaced by profile module in latest
release of python-openstacksdk. This patch makes some modifications
in client to follow this change.

Change-Id: Ia10f77fafe0401afe6c36a767db81d5445e81f4e
2015-05-22 02:07:23 -04:00
tengqm
bf4f39564d Try please flake8 for imports grouping
Flake8 is now complaining about the grouping of imports. This patch try
please it by moving imports around.

Change-Id: I65a0ee03d8fcc78de597d06424f647e0a2d2beae
2015-05-15 03:32:10 -04:00
tengqm
1558e75dee Add --details argument to node-show
This new parameter is used to show details of a physical node.

Change-Id: Ifad04a2ce9c352f48ad21bf07bebbbdf677a422c
2015-04-21 09:56:51 -04:00
yanyanhu
e711680767 Add webhook support
Change-Id: Ia34a449eeb22b41e9725500b4eb80a437ffd8c3c
2015-04-17 04:08:56 -04:00
tengqm
fec355ebc6 Revised cluster-create and cluster-show commands 2015-02-04 10:35:08 +08:00
tengqm
e1df85331e Make at least profile-create API work 2015-02-03 22:52:13 +08:00
tengqm
d3c4b191db Fixed flake8 errors 2015-01-25 19:50:02 +08:00
tengqm
a8beb00ca3 Added function to create connection via SDK
Connection creation may invole SDK layer exception throwing, we
wrap this exception handling into a utility function.
2015-01-25 18:58:11 +08:00
tengqm
b4110e3e80 Added customization of create() method
The create method will return a response.  This patch avoids hiding that
response from the create() return values.
2015-01-23 16:02:42 +08:00
tengqm
3d5fffd7a3 Revised sdk interface
This module is used to interface with openstacksdk.  The main problem we
encountered is that the default list() operation carries DB session.
There are cases where our list generation is from in-memory data.  To
overcome that we provide a list_short() method to Resource class.

The SenlinConnection class is not useful at the moment.

The UserPreferences is a standard way to specify desired API version,
region name, an API visibility (public, private, admin). We provide a
subclass here to deal with the respective requirements.
2015-01-16 15:15:20 +08:00
tengqm
432ef53b3d Placeholder for openstacksdk interface
Will transit to this interface in future.  The current http.py based
implementation will deprecate soon.
2015-01-12 15:40:04 +08:00