summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/actions/env.py3
-rw-r--r--requirements.txt18
-rwxr-xr-xtools/yardstick-img-modify2
-rw-r--r--yardstick/ssh.py12
4 files changed, 21 insertions, 14 deletions
diff --git a/api/actions/env.py b/api/actions/env.py
index 78f9b72ed..fa0f95d90 100644
--- a/api/actions/env.py
+++ b/api/actions/env.py
@@ -53,7 +53,8 @@ def _create_grafana():
def _create_dashboard():
url = 'http://admin:admin@%s:3000/api/dashboards/db' % api_conf.GATEWAY_IP
- data = json.load(file('../dashboard/ping_dashboard.json'))
+ with open('../dashboard/ping_dashboard.json') as dashboard_json:
+ data = json.load(dashboard_json)
HttpClient().post(url, data)
diff --git a/requirements.txt b/requirements.txt
index e391c9210..6b4edf3f0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -38,7 +38,7 @@ netaddr==0.7.18
netifaces==0.10.4
nose==1.3.7
openstacksdk==0.8.1
-os-client-config==1.16.0
+os-client-config==1.22.0
oslo.config==3.9.0
oslo.i18n==3.4.0
oslo.serialization==2.4.0
@@ -52,19 +52,19 @@ pycrypto==2.6.1
pyflakes==1.0.0
pyparsing==2.1.0
pyrsistent==0.11.12
-python-cinderclient==1.6.0
-python-glanceclient==2.0.0
-python-heatclient==1.0.0
-python-keystoneclient==2.3.1
+python-cinderclient==1.9.0
+python-glanceclient==2.5.0
+python-heatclient==1.5.0
+python-keystoneclient==3.6.0
python-mimeparse==1.5.1
-python-neutronclient==4.1.1
-python-novaclient==3.3.0
-python-openstackclient==2.2.0
+python-neutronclient==6.0.0
+python-novaclient==6.0.0
+python-openstackclient==3.3.0
python-subunit==1.2.0
python-swiftclient==3.0.0
pytz==2015.7
PyYAML==3.11
-requests==2.9.1
+requests==2.10.0
requestsexceptions==1.1.3
scp==0.10.2
simplejson==3.8.2
diff --git a/tools/yardstick-img-modify b/tools/yardstick-img-modify
index c28e2ad59..0033383ef 100755
--- a/tools/yardstick-img-modify
+++ b/tools/yardstick-img-modify
@@ -153,7 +153,7 @@ cleanup() {
mount | grep $mountdir && umount $mountdir
mount | grep "/mnt/vivid" && umount "/mnt/vivid"
if [ -f $raw_imgfile ]; then
- kpartx -dv $raw_imgfile || true
+ kpartx -dv $raw_imgfile
fi
rm -f $raw_imgfile
rm -rf $mountdir
diff --git a/yardstick/ssh.py b/yardstick/ssh.py
index 46d53b7d2..2ba6de92e 100644
--- a/yardstick/ssh.py
+++ b/yardstick/ssh.py
@@ -157,7 +157,7 @@ class SSH(object):
def run(self, cmd, stdin=None, stdout=None, stderr=None,
raise_on_error=True, timeout=3600,
- keep_stdin_open=False):
+ keep_stdin_open=False, pty=False):
"""Execute specified command on the server.
:param cmd: Command to be executed.
@@ -171,6 +171,10 @@ class SSH(object):
Default 1 hour. No timeout if set to 0.
:param keep_stdin_open: don't close stdin on empty reads
:type keep_stdin_open: bool
+ :param pty: Request a pseudo terminal for this connection.
+ This allows passing control characters.
+ Default False.
+ :type pty: bool
"""
client = self._get_client()
@@ -181,14 +185,16 @@ class SSH(object):
return self._run(client, cmd, stdin=stdin, stdout=stdout,
stderr=stderr, raise_on_error=raise_on_error,
timeout=timeout,
- keep_stdin_open=keep_stdin_open)
+ keep_stdin_open=keep_stdin_open, pty=pty)
def _run(self, client, cmd, stdin=None, stdout=None, stderr=None,
raise_on_error=True, timeout=3600,
- keep_stdin_open=False):
+ keep_stdin_open=False, pty=False):
transport = client.get_transport()
session = transport.open_session()
+ if pty:
+ session.get_pty()
session.exec_command(cmd)
start_time = time.time()