Keystone session can be used directly in user function to access OpenStack services. Include openstack clients in python requirements as well. Add a python function example. Implements: blueprint qinling-openstack-clients Change-Id: I4798c404cb57bafe14049f57ba8db7c7125106c7changes/10/479610/2
parent
992c90e044
commit
786f83d182
@ -0,0 +1,12 @@
|
||||
import swiftclient
|
||||
|
||||
|
||||
def stat_object(context, container, object):
|
||||
conn = swiftclient.Connection(
|
||||
session=context['os_session'],
|
||||
os_options={'region_name': 'RegionOne'},
|
||||
)
|
||||
|
||||
obj_header = conn.head_object(container, object)
|
||||
|
||||
return obj_header
|
@ -1,3 +1,6 @@
|
||||
Flask>=0.11.1
|
||||
httplib2
|
||||
requests>=2.7.0
|
||||
Flask>=0.10,!=0.11,<1.0 # BSD
|
||||
python-openstackclient>=3.3.0,!=3.10.0 # Apache-2.0
|
||||
python-neutronclient>=6.3.0 # Apache-2.0
|
||||
python-swiftclient>=3.2.0 # Apache-2.0
|
||||
python-ceilometerclient>=2.5.0 # Apache-2.0
|
||||
keystoneauth1>=2.21.0 # Apache-2.0
|
||||
|
Loading…
Reference in new issue