summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorCerberus <matt.dietz@rackspace.com>2011-04-22 10:39:35 -0500
committerCerberus <matt.dietz@rackspace.com>2011-04-22 10:39:35 -0500
commitc03e9805328afe1d03fa65ac93d2b91ba04c229e (patch)
tree7234fe551b9f6e32b80e91753dbf91a2181d4b9a /tools
parent14718afef1cc79b4d41f490be677caf3e4191e2b (diff)
parent8af2a2d720b97ef17565d57a9b8b028d449a9c84 (diff)
downloadnova-c03e9805328afe1d03fa65ac93d2b91ba04c229e.tar.gz
nova-c03e9805328afe1d03fa65ac93d2b91ba04c229e.tar.xz
nova-c03e9805328afe1d03fa65ac93d2b91ba04c229e.zip
Merge from trunk
Diffstat (limited to 'tools')
-rw-r--r--tools/esx/guest_tool.py2
-rwxr-xr-xtools/euca-get-ajax-console6
-rw-r--r--tools/eventlet-patch24
-rw-r--r--tools/install_venv.py6
-rw-r--r--tools/pip-requires2
5 files changed, 38 insertions, 2 deletions
diff --git a/tools/esx/guest_tool.py b/tools/esx/guest_tool.py
index bbf3ea908..13b0f8d33 100644
--- a/tools/esx/guest_tool.py
+++ b/tools/esx/guest_tool.py
@@ -209,7 +209,7 @@ def _execute(cmd_list, process_input=None, check_exit_code=True):
obj = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
result = None
- if process_input != None:
+ if process_input is not None:
result = obj.communicate(process_input)
else:
result = obj.communicate()
diff --git a/tools/euca-get-ajax-console b/tools/euca-get-ajax-console
index 3df3dcb53..a67c79d90 100755
--- a/tools/euca-get-ajax-console
+++ b/tools/euca-get-ajax-console
@@ -35,6 +35,7 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
import boto
import nova
from boto.ec2.connection import EC2Connection
+import euca2ools
from euca2ools import Euca2ool, InstanceValidationError, Util
usage_string = """
@@ -93,8 +94,13 @@ def override_connect_ec2(aws_access_key_id=None,
aws_secret_access_key, **kwargs)
# override boto's connect_ec2 method, so that we can use NovaEC2Connection
+# (This is for Euca2ools 1.2)
boto.connect_ec2 = override_connect_ec2
+# Override Euca2ools' EC2Connection class (which it gets from boto)
+# (This is for Euca2ools 1.3)
+euca2ools.EC2Connection = NovaEC2Connection
+
def usage(status=1):
print usage_string
diff --git a/tools/eventlet-patch b/tools/eventlet-patch
new file mode 100644
index 000000000..c87c5f279
--- /dev/null
+++ b/tools/eventlet-patch
@@ -0,0 +1,24 @@
+# HG changeset patch
+# User Soren Hansen <soren@linux2go.dk>
+# Date 1297678255 -3600
+# Node ID 4c846d555010bb5a91ab4da78dfe596451313742
+# Parent 5b7e9946c79f005c028eb63207cf5eb7bb21d1c3
+Don't attempt to wrap GreenPipes in GreenPipe
+
+If the os module is monkeypatched, Python's standard subprocess module
+will return greenio.GreenPipe instances for Popen objects' stdin, stdout,
+and stderr attributes. However, eventlet.green.subprocess tries to wrap
+these attributes in another greenio.GreenPipe, which GreenPipe refuses.
+
+diff -r 5b7e9946c79f -r 4c846d555010 eventlet/green/subprocess.py
+--- a/eventlet/green/subprocess.py Sat Feb 05 13:05:05 2011 -0800
++++ b/eventlet/green/subprocess.py Mon Feb 14 11:10:55 2011 +0100
+@@ -27,7 +27,7 @@
+ # eventlet.processes.Process.run() method.
+ for attr in "stdin", "stdout", "stderr":
+ pipe = getattr(self, attr)
+- if pipe is not None:
++ if pipe is not None and not type(pipe) == greenio.GreenPipe:
+ wrapped_pipe = greenio.GreenPipe(pipe, pipe.mode, bufsize)
+ setattr(self, attr, wrapped_pipe)
+ __init__.__doc__ = subprocess_orig.Popen.__init__.__doc__
diff --git a/tools/install_venv.py b/tools/install_venv.py
index 4e3941210..30ec85374 100644
--- a/tools/install_venv.py
+++ b/tools/install_venv.py
@@ -103,6 +103,12 @@ def install_dependencies(venv=VENV):
pthfile = os.path.join(venv, "lib", "python2.6", "site-packages", "nova.pth")
f = open(pthfile, 'w')
f.write("%s\n" % ROOT)
+ # Patch eventlet (see FAQ # 1485)
+ patchsrc = os.path.join(ROOT, 'tools', 'eventlet-patch')
+ patchfile = os.path.join(venv, "lib", "python2.6", "site-packages", "eventlet",
+ "green", "subprocess.py")
+ patch_cmd = "patch %s %s" % (patchfile, patchsrc)
+ os.system(patch_cmd)
def print_help():
diff --git a/tools/pip-requires b/tools/pip-requires
index 4ab9644d8..2f4136732 100644
--- a/tools/pip-requires
+++ b/tools/pip-requires
@@ -17,7 +17,6 @@ redis==2.0.0
routes==1.12.3
WebOb==0.9.8
wsgiref==0.1.2
-zope.interface==3.6.1
mox==0.5.0
-f http://pymox.googlecode.com/files/mox-0.5.0.tar.gz
greenlet==0.3.1
@@ -30,4 +29,5 @@ sqlalchemy-migrate
netaddr
sphinx
glance
+nova-adminclient
suds==0.4