You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by to...@apache.org on 2011/05/21 21:37:17 UTC
svn commit: r1125776 - in /incubator/libcloud/trunk:
libcloud/compute/drivers/opsource.py test/compute/test_elastichosts.py
test/compute/test_gogrid.py test/loadbalancer/test_gogrid.py
test/loadbalancer/test_rackspace.py
Author: tomaz
Date: Sat May 21 19:37:17 2011
New Revision: 1125776
URL: http://svn.apache.org/viewvc?rev=1125776&view=rev
Log:
pyflakes cleanup.
Modified:
incubator/libcloud/trunk/libcloud/compute/drivers/opsource.py
incubator/libcloud/trunk/test/compute/test_elastichosts.py
incubator/libcloud/trunk/test/compute/test_gogrid.py
incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py
incubator/libcloud/trunk/test/loadbalancer/test_rackspace.py
Modified: incubator/libcloud/trunk/libcloud/compute/drivers/opsource.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/compute/drivers/opsource.py?rev=1125776&r1=1125775&r2=1125776&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/compute/drivers/opsource.py (original)
+++ incubator/libcloud/trunk/libcloud/compute/drivers/opsource.py Sat May 21 19:37:17 2011
@@ -295,9 +295,6 @@ class OpsourceNodeDriver(NodeDriver):
# XXX: Node sizes can be adjusted after a node is created, but cannot be
# set at create time because size is part of the image definition.
- size = NodeSize(id=0, name='', ram=0, disk=None, bandwidth=None,
- price=0, driver=self.connection.driver)
-
password = None
if kwargs.has_key('auth'):
auth = kwargs.get('auth')
@@ -328,10 +325,10 @@ class OpsourceNodeDriver(NodeDriver):
ET.SubElement(server_elm, "administratorPassword").text = password
ET.SubElement(server_elm, "isStarted").text = str(ex_isStarted)
- data = self.connection.request_with_orgId('server',
- method='POST',
- data=ET.tostring(server_elm)
- ).object
+ self.connection.request_with_orgId('server',
+ method='POST',
+ data=ET.tostring(server_elm)
+ ).object
# XXX: return the last node in the list that has a matching name. this
# is likely but not guaranteed to be the node we just created
# because opsource allows multiple nodes to have the same name
Modified: incubator/libcloud/trunk/test/compute/test_elastichosts.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/compute/test_elastichosts.py?rev=1125776&r1=1125775&r2=1125776&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/compute/test_elastichosts.py (original)
+++ incubator/libcloud/trunk/test/compute/test_elastichosts.py Sat May 21 19:37:17 2011
@@ -25,7 +25,6 @@ from libcloud.compute.drivers.elastichos
from libcloud.common.types import InvalidCredsError, MalformedResponseError
from test import MockHttp
-from test.compute import TestCaseMixin
from test.file_fixtures import ComputeFileFixtures
class ElasticHostsTestCase(unittest.TestCase):
Modified: incubator/libcloud/trunk/test/compute/test_gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/compute/test_gogrid.py?rev=1125776&r1=1125775&r2=1125776&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/compute/test_gogrid.py (original)
+++ incubator/libcloud/trunk/test/compute/test_gogrid.py Sat May 21 19:37:17 2011
@@ -21,7 +21,7 @@ from libcloud.compute.base import NodeSt
from libcloud.common.types import LibcloudError, InvalidCredsError
from libcloud.common.gogrid import GoGridIpAddress
from libcloud.compute.drivers.gogrid import GoGridNodeDriver
-from libcloud.compute.base import Node, NodeImage, NodeSize, NodeLocation
+from libcloud.compute.base import Node, NodeImage, NodeSize
from test import MockHttp # pylint: disable-msg=E0611
from test.compute import TestCaseMixin # pylint: disable-msg=E0611
@@ -69,7 +69,7 @@ class GoGridTests(unittest.TestCase, Tes
node = Node(90967, None, None, None, None, self.driver)
try:
- ret = self.driver.reboot_node(node)
+ self.driver.reboot_node(node)
except Exception:
pass
else:
Modified: incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py?rev=1125776&r1=1125775&r2=1125776&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py (original)
+++ incubator/libcloud/trunk/test/loadbalancer/test_gogrid.py Sat May 21 19:37:17 2011
@@ -14,7 +14,6 @@
# limitations under the License.
import httplib
-import os.path
import sys
import unittest
from urlparse import urlparse, parse_qsl
Modified: incubator/libcloud/trunk/test/loadbalancer/test_rackspace.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/loadbalancer/test_rackspace.py?rev=1125776&r1=1125775&r2=1125776&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/loadbalancer/test_rackspace.py (original)
+++ incubator/libcloud/trunk/test/loadbalancer/test_rackspace.py Sat May 21 19:37:17 2011
@@ -14,10 +14,8 @@
# limitations under the License.
import httplib
-import os.path
import sys
import unittest
-from urlparse import parse_qsl
try:
import json
@@ -27,7 +25,7 @@ except ImportError:
from libcloud.loadbalancer.base import Member, Algorithm
from libcloud.loadbalancer.drivers.rackspace import RackspaceLBDriver
-from test import MockHttp, MockRawResponse
+from test import MockHttp
from test.file_fixtures import LoadBalancerFileFixtures
class RackspaceLBTests(unittest.TestCase):