
This change creates two directories of content, based on who they're relevant to: users and contributors. Files which were in the top-level folder were moved, as well as some within folders in that top-level. This is one change of a multi-step process, so it only deals with renamings in order to make further changes cleaner. Change-Id: I3c9bb7da4f283e2696e7bcea84824c778bbcecfb Partial-Bug: 1416553
25 lines
761 B
ReStructuredText
25 lines
761 B
ReStructuredText
=====
|
|
Usage
|
|
=====
|
|
|
|
To use python-openstacksdk in a project::
|
|
|
|
from openstack import connection
|
|
from openstack import user_preference
|
|
# First, specify your preferences
|
|
pref = user_preference.UserPreference()
|
|
pref.set_region('network', 'zion')
|
|
# Second, create your authorization arguments
|
|
auth_args = {
|
|
'auth_url': 'http://172.20.1.108:5000/v3',
|
|
'project_name': 'hacker',
|
|
'user_name': 'neo',
|
|
'password': 'bluepill',
|
|
}
|
|
# Third, create a connection
|
|
conn = connection.Connection(preference=pref, **auth_args)
|
|
# Finally, access your desired services
|
|
network = conn.network.find_network("matrix")
|
|
if network is None:
|
|
network = conn.network.create_network({"name": "matrix"})
|