whitespace cleanups
This commit is contained in:
parent
2d785404ed
commit
536be15a87
6
LICENSE
6
LICENSE
@ -185,10 +185,10 @@ All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
|
22
README.rst
22
README.rst
@ -21,7 +21,7 @@ Development takes place on GitHub__. Bug reports and patches may be filed there.
|
||||
__ https://github.com/rackspace/python-client
|
||||
|
||||
This code a fork of `Jacobian's python-cloudservers`__ If you need API support
|
||||
for the Rackspace API soley or the BSD license, you should use that repository.
|
||||
for the Rackspace API soley or the BSD license, you should use that repository.
|
||||
python-client is licensed under the Apache License like the rest of OpenStack.
|
||||
|
||||
__ http://github.com/jacobian/python-cloudservers
|
||||
@ -36,7 +36,7 @@ Installing this package gets you a shell command, ``nova``, that you
|
||||
can use to interact with any Rackspace compatible API (including OpenStack).
|
||||
|
||||
You'll need to provide your OpenStack username and API key. You can do this
|
||||
with the ``--username``, ``--apikey`` and ``--projectid`` params, but it's easier to just
|
||||
with the ``--username``, ``--apikey`` and ``--projectid`` params, but it's easier to just
|
||||
set them as environment variables::
|
||||
|
||||
export NOVA_USERNAME=openstack
|
||||
@ -44,13 +44,13 @@ set them as environment variables::
|
||||
export NOVA_PROJECT_ID=myproject
|
||||
|
||||
You will also need to define the authentication url with ``--url`` and the
|
||||
version of the API with ``--version``. Or set them as an environment
|
||||
version of the API with ``--version``. Or set them as an environment
|
||||
variables as well::
|
||||
|
||||
export NOVA_URL=http://myserver:port/v1.0/
|
||||
export NOVA_VERSION=1.0
|
||||
|
||||
You'll find complete documentation on the shell by running
|
||||
|
||||
You'll find complete documentation on the shell by running
|
||||
``nova help``::
|
||||
|
||||
usage: nova [--username USERNAME] [--apikey APIKEY] [--projectid PROJECTID]
|
||||
@ -111,11 +111,11 @@ You'll find complete documentation on the shell by running
|
||||
--url AUTH_URL Defaults to env[NOVA_URL] or
|
||||
https://auth.api.rackspacecloud.com/v1.0
|
||||
if undefined.
|
||||
--version VERSION Accepts 1.0 or 1.1, defaults to
|
||||
--version VERSION Accepts 1.0 or 1.1, defaults to
|
||||
env[NOVA_VERSION].
|
||||
|
||||
See "nova help COMMAND" for help on a specific command.
|
||||
|
||||
|
||||
Python API
|
||||
----------
|
||||
|
||||
@ -132,13 +132,13 @@ By way of a quick-start::
|
||||
>>> nt.servers.list()
|
||||
[...]
|
||||
>>> s = nt.servers.create(image=2, flavor=1, name='myserver')
|
||||
|
||||
|
||||
... time passes ...
|
||||
|
||||
|
||||
>>> s.reboot()
|
||||
|
||||
|
||||
... time passes ...
|
||||
|
||||
|
||||
>>> s.delete()
|
||||
|
||||
What's new?
|
||||
|
26
docs/api.rst
26
docs/api.rst
@ -3,7 +3,7 @@ The :mod:`novaclient` Python API
|
||||
|
||||
.. module:: novaclient
|
||||
:synopsis: A client for the OpenStack Nova API.
|
||||
|
||||
|
||||
.. currentmodule:: novaclient
|
||||
|
||||
Usage
|
||||
@ -17,28 +17,28 @@ First create an instance of :class:`OpenStack` with your credentials::
|
||||
Then call methods on the :class:`OpenStack` object:
|
||||
|
||||
.. class:: OpenStack
|
||||
|
||||
|
||||
.. attribute:: backup_schedules
|
||||
|
||||
|
||||
A :class:`BackupScheduleManager` -- manage automatic backup images.
|
||||
|
||||
|
||||
.. attribute:: flavors
|
||||
|
||||
|
||||
A :class:`FlavorManager` -- query available "flavors" (hardware
|
||||
configurations).
|
||||
|
||||
|
||||
.. attribute:: images
|
||||
|
||||
|
||||
An :class:`ImageManager` -- query and create server disk images.
|
||||
|
||||
|
||||
.. attribute:: ipgroups
|
||||
|
||||
|
||||
A :class:`IPGroupManager` -- manage shared public IP addresses.
|
||||
|
||||
|
||||
.. attribute:: servers
|
||||
|
||||
|
||||
A :class:`ServerManager` -- start, stop, and manage virtual machines.
|
||||
|
||||
|
||||
.. automethod:: authenticate
|
||||
|
||||
For example::
|
||||
@ -63,5 +63,5 @@ For more information, see the reference:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
ref/index
|
||||
|
@ -21,7 +21,7 @@ Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
|
||||
shell
|
||||
api
|
||||
ref/index
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import prettytable
|
||||
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient import base
|
||||
from novaclient.v1_0 import base as local_base
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
A fake server that "responds" to API methods with pre-canned responses.
|
||||
|
||||
All of these responses come from the spec, so if for some reason the spec's
|
||||
wrong the tests might raise AssertionError. I've indicated in comments the
|
||||
places where actual behavior differs from the spec.
|
||||
wrong the tests might raise AssertionError. I've indicated in comments the places where actual
|
||||
behavior differs from the spec.
|
||||
"""
|
||||
|
||||
import novaclient.client
|
||||
@ -17,8 +17,7 @@ def assert_has_keys(dict, required=[], optional=[]):
|
||||
except AssertionError:
|
||||
allowed_keys = set(required) | set(optional)
|
||||
extra_keys = set(keys).difference(set(required + optional))
|
||||
raise AssertionError("found unexpected keys: %s" %
|
||||
list(extra_keys))
|
||||
raise AssertionError("found unexpected keys: %s" % list(extra_keys))
|
||||
|
||||
|
||||
class FakeClient(object):
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import mock
|
||||
|
||||
from novaclient import base
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import httplib2
|
||||
import mock
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import os
|
||||
import mock
|
||||
import httplib2
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import StringIO
|
||||
|
||||
from tests.v1_0 import fakes
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import httplib2
|
||||
import mock
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient.v1_0 import backup_schedules
|
||||
from tests.v1_0 import fakes
|
||||
from tests import utils
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient import exceptions
|
||||
from novaclient.v1_0 import flavors
|
||||
from tests.v1_0 import fakes
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient.v1_0 import images
|
||||
from tests.v1_0 import fakes
|
||||
from tests import utils
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient.v1_0 import ipgroups
|
||||
from tests.v1_0 import fakes
|
||||
from tests import utils
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import StringIO
|
||||
|
||||
from novaclient.v1_0 import servers
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import os
|
||||
import mock
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient import exceptions
|
||||
from novaclient.v1_1 import flavors
|
||||
from tests.v1_1 import fakes
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
from novaclient.v1_1 import images
|
||||
from tests.v1_1 import fakes
|
||||
from tests import utils
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import StringIO
|
||||
|
||||
from novaclient.v1_1 import servers
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import os
|
||||
import mock
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
import StringIO
|
||||
|
||||
from novaclient.v1_1 import zones
|
||||
|
Loading…
Reference in New Issue
Block a user