summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2011-08-08 13:20:44 -0700
committertermie <github@anarkystic.com>2011-08-08 13:25:29 -0700
commit536be15a8777963d9151f36bfdecc85b39b9656b (patch)
treed59a8946ab93b572dcde445fb2aa6d9df070efe6
parent2d785404eda907ea39fe6928491d87bff49bcd94 (diff)
downloadpython-novaclient-536be15a8777963d9151f36bfdecc85b39b9656b.tar.gz
whitespace cleanups
-rw-r--r--LICENSE6
-rw-r--r--README.rst22
-rw-r--r--docs/api.rst26
-rw-r--r--docs/index.rst2
-rw-r--r--novaclient/utils.py1
-rw-r--r--novaclient/v1_0/accounts.py1
-rw-r--r--tests/fakes.py7
-rw-r--r--tests/test_base.py1
-rw-r--r--tests/test_http.py1
-rw-r--r--tests/test_shell.py1
-rw-r--r--tests/v1_0/test_accounts.py1
-rw-r--r--tests/v1_0/test_auth.py1
-rw-r--r--tests/v1_0/test_backup_schedules.py1
-rw-r--r--tests/v1_0/test_flavors.py1
-rw-r--r--tests/v1_0/test_images.py1
-rw-r--r--tests/v1_0/test_ipgroups.py1
-rw-r--r--tests/v1_0/test_servers.py1
-rw-r--r--tests/v1_0/test_shell.py1
-rw-r--r--tests/v1_1/test_flavors.py1
-rw-r--r--tests/v1_1/test_images.py1
-rw-r--r--tests/v1_1/test_servers.py1
-rw-r--r--tests/v1_1/test_shell.py1
-rw-r--r--tests/v1_1/test_zones.py1
23 files changed, 31 insertions, 50 deletions
diff --git a/LICENSE b/LICENSE
index e30ab553..1d8bc82c 100644
--- a/LICENSE
+++ b/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.
diff --git a/README.rst b/README.rst
index 02ce10d8..acf6980e 100644
--- a/README.rst
+++ b/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?
diff --git a/docs/api.rst b/docs/api.rst
index 4652b002..1d46c2fd 100644
--- a/docs/api.rst
+++ b/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
diff --git a/docs/index.rst b/docs/index.rst
index fb8825c4..64db466a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -21,7 +21,7 @@ Contents:
.. toctree::
:maxdepth: 2
-
+
shell
api
ref/index
diff --git a/novaclient/utils.py b/novaclient/utils.py
index 08fb70ca..0f592dcf 100644
--- a/novaclient/utils.py
+++ b/novaclient/utils.py
@@ -1,4 +1,3 @@
-
import prettytable
diff --git a/novaclient/v1_0/accounts.py b/novaclient/v1_0/accounts.py
index be162d9b..73d5f4aa 100644
--- a/novaclient/v1_0/accounts.py
+++ b/novaclient/v1_0/accounts.py
@@ -1,4 +1,3 @@
-
from novaclient import base
from novaclient.v1_0 import base as local_base
diff --git a/tests/fakes.py b/tests/fakes.py
index 0ba6d927..93709b8c 100644
--- a/tests/fakes.py
+++ b/tests/fakes.py
@@ -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):
diff --git a/tests/test_base.py b/tests/test_base.py
index 1dda3086..c53c3aa8 100644
--- a/tests/test_base.py
+++ b/tests/test_base.py
@@ -1,4 +1,3 @@
-
import mock
from novaclient import base
diff --git a/tests/test_http.py b/tests/test_http.py
index 18315652..77f2de15 100644
--- a/tests/test_http.py
+++ b/tests/test_http.py
@@ -1,4 +1,3 @@
-
import httplib2
import mock
diff --git a/tests/test_shell.py b/tests/test_shell.py
index d2c5a0cd..c24b4a4e 100644
--- a/tests/test_shell.py
+++ b/tests/test_shell.py
@@ -1,4 +1,3 @@
-
import os
import mock
import httplib2
diff --git a/tests/v1_0/test_accounts.py b/tests/v1_0/test_accounts.py
index 72d77b17..5c001ec2 100644
--- a/tests/v1_0/test_accounts.py
+++ b/tests/v1_0/test_accounts.py
@@ -1,4 +1,3 @@
-
import StringIO
from tests.v1_0 import fakes
diff --git a/tests/v1_0/test_auth.py b/tests/v1_0/test_auth.py
index 71671ee3..3f103fb9 100644
--- a/tests/v1_0/test_auth.py
+++ b/tests/v1_0/test_auth.py
@@ -1,4 +1,3 @@
-
import httplib2
import mock
diff --git a/tests/v1_0/test_backup_schedules.py b/tests/v1_0/test_backup_schedules.py
index ebf5dad4..5833aced 100644
--- a/tests/v1_0/test_backup_schedules.py
+++ b/tests/v1_0/test_backup_schedules.py
@@ -1,4 +1,3 @@
-
from novaclient.v1_0 import backup_schedules
from tests.v1_0 import fakes
from tests import utils
diff --git a/tests/v1_0/test_flavors.py b/tests/v1_0/test_flavors.py
index 30cf84c4..a1064001 100644
--- a/tests/v1_0/test_flavors.py
+++ b/tests/v1_0/test_flavors.py
@@ -1,4 +1,3 @@
-
from novaclient import exceptions
from novaclient.v1_0 import flavors
from tests.v1_0 import fakes
diff --git a/tests/v1_0/test_images.py b/tests/v1_0/test_images.py
index 41c1399f..ccbe476c 100644
--- a/tests/v1_0/test_images.py
+++ b/tests/v1_0/test_images.py
@@ -1,4 +1,3 @@
-
from novaclient.v1_0 import images
from tests.v1_0 import fakes
from tests import utils
diff --git a/tests/v1_0/test_ipgroups.py b/tests/v1_0/test_ipgroups.py
index 3ab308b4..29d37444 100644
--- a/tests/v1_0/test_ipgroups.py
+++ b/tests/v1_0/test_ipgroups.py
@@ -1,4 +1,3 @@
-
from novaclient.v1_0 import ipgroups
from tests.v1_0 import fakes
from tests import utils
diff --git a/tests/v1_0/test_servers.py b/tests/v1_0/test_servers.py
index 68853db2..95f72272 100644
--- a/tests/v1_0/test_servers.py
+++ b/tests/v1_0/test_servers.py
@@ -1,4 +1,3 @@
-
import StringIO
from novaclient.v1_0 import servers
diff --git a/tests/v1_0/test_shell.py b/tests/v1_0/test_shell.py
index 33948493..0cad2004 100644
--- a/tests/v1_0/test_shell.py
+++ b/tests/v1_0/test_shell.py
@@ -1,4 +1,3 @@
-
import os
import mock
diff --git a/tests/v1_1/test_flavors.py b/tests/v1_1/test_flavors.py
index bc30cda1..c48c8d18 100644
--- a/tests/v1_1/test_flavors.py
+++ b/tests/v1_1/test_flavors.py
@@ -1,4 +1,3 @@
-
from novaclient import exceptions
from novaclient.v1_1 import flavors
from tests.v1_1 import fakes
diff --git a/tests/v1_1/test_images.py b/tests/v1_1/test_images.py
index c2c78ed6..bf61a338 100644
--- a/tests/v1_1/test_images.py
+++ b/tests/v1_1/test_images.py
@@ -1,4 +1,3 @@
-
from novaclient.v1_1 import images
from tests.v1_1 import fakes
from tests import utils
diff --git a/tests/v1_1/test_servers.py b/tests/v1_1/test_servers.py
index 20c08edb..9926d540 100644
--- a/tests/v1_1/test_servers.py
+++ b/tests/v1_1/test_servers.py
@@ -1,4 +1,3 @@
-
import StringIO
from novaclient.v1_1 import servers
diff --git a/tests/v1_1/test_shell.py b/tests/v1_1/test_shell.py
index c6d47cf8..f82ec011 100644
--- a/tests/v1_1/test_shell.py
+++ b/tests/v1_1/test_shell.py
@@ -1,4 +1,3 @@
-
import os
import mock
diff --git a/tests/v1_1/test_zones.py b/tests/v1_1/test_zones.py
index a10382c6..9fbe12f2 100644
--- a/tests/v1_1/test_zones.py
+++ b/tests/v1_1/test_zones.py
@@ -1,4 +1,3 @@
-
import StringIO
from novaclient.v1_1 import zones