Update the README a bit

Cleaned up example references to now-not-existing HP Public Cloud. Also
added a named-cloud entry to the make_client section.

Change-Id: I398c438e22eb84d6079a5c45f068753c3bcaa216
This commit is contained in:
Monty Taylor 2016-02-22 06:37:13 -08:00
parent 7a4993da41
commit 03d5659d8b

View File

@ -88,23 +88,21 @@ An example config file is probably helpful:
.. code-block:: yaml .. code-block:: yaml
clouds: clouds:
mordred: mtvexx:
profile: hp profile: vexxhost
auth: auth:
username: mordred@inaugust.com username: mordred@inaugust.com
password: XXXXXXXXX password: XXXXXXXXX
project_name: mordred@inaugust.com project_name: mordred@inaugust.com
region_name: region-b.geo-1 region_name: ca-ymq-1
dns_service_type: hpext:dns dns_api_version: 1
compute_api_version: 1.1 mordred:
monty: region_name: RegionOne
auth: auth:
auth_url: https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0 username: 'mordred'
username: monty.taylor@hp.com password: XXXXXXX
password: XXXXXXXX project_name: 'shade'
project_name: monty.taylor@hp.com-default-tenant auth_url: 'https://montytaylor-sjc.openstack.blueboxgrid.com:5001/v2.0'
region_name: region-b.geo-1
dns_service_type: hpext:dns
infra: infra:
profile: rackspace profile: rackspace
auth: auth:
@ -221,14 +219,14 @@ are connecting to OpenStack can share a cache should you desire.
server: 5 server: 5
flavor: -1 flavor: -1
clouds: clouds:
mordred: mtvexx:
profile: hp profile: vexxhost
auth: auth:
username: mordred@inaugust.com username: mordred@inaugust.com
password: XXXXXXXXX password: XXXXXXXXX
project_name: mordred@inaugust.com project_name: mordred@inaugust.com
region_name: region-b.geo-1 region_name: ca-ymq-1
dns_service_type: hpext:dns dns_api_version: 1
IPv6 IPv6
@ -247,13 +245,14 @@ environment variable.
client: client:
force_ipv4: true force_ipv4: true
clouds: clouds:
mordred: mtvexx:
profile: hp profile: vexxhost
auth: auth:
username: mordred@inaugust.com username: mordred@inaugust.com
password: XXXXXXXXX password: XXXXXXXXX
project_name: mordred@inaugust.com project_name: mordred@inaugust.com
region_name: region-b.geo-1 region_name: ca-ymq-1
dns_api_version: 1
monty: monty:
profile: rax profile: rax
auth: auth:
@ -316,7 +315,7 @@ Get a named cloud.
import os_client_config import os_client_config
cloud_config = os_client_config.OpenStackConfig().get_one_cloud( cloud_config = os_client_config.OpenStackConfig().get_one_cloud(
'hp', region_name='region-b.geo-1') 'internap', region_name='ams01')
print(cloud_config.name, cloud_config.region, cloud_config.config) print(cloud_config.name, cloud_config.region, cloud_config.config)
Or, get all of the clouds. Or, get all of the clouds.
@ -366,6 +365,14 @@ will get you a fully configured `novaclient` instance.
nova = os_client_config.make_client('compute') nova = os_client_config.make_client('compute')
If you want to do the same thing but on a named cloud.
.. code-block:: python
import os_client_config
nova = os_client_config.make_client('compute', cloud='mtvexx')
If you want to do the same thing but also support command line parsing. If you want to do the same thing but also support command line parsing.
.. code-block:: python .. code-block:: python