From 39268687bc39e10a5a426868bbfa314d1540f171 Mon Sep 17 00:00:00 2001 From: Yichen Wang Date: Thu, 5 Mar 2015 17:32:28 -0800 Subject: [PATCH] Adding support to generate/store Run ID Change-Id: I3ab83d22f46e5b27c85766a0388b1fa23c573204 --- README.rst | 8 +++++--- doc/source/contributing.rst | 2 +- doc/source/usage.rst | 1 + vmtp.py | 6 ++++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 6f71bef..b67174c 100644 --- a/README.rst +++ b/README.rst @@ -8,8 +8,8 @@ VMTP is a data path performance tool for OpenStack clouds. Features -------- -Have you ever had the need for a quick, simple and automatable way to get VM-level or host-level single-flow throughput and latency numbers from any OpenStack cloud, and take into account various Neutron topologies? -Or check whether some OpenStack configuration option, Neutron plug-in performs to expectation or if there is any data path impact for upgrading to a different OpenStack release? +Have you ever had the need for a quick, simple and automatable way to get VM-level or host-level single-flow throughput and latency numbers from any OpenStack cloud, and take into account various Neutron topologies? Or check whether some OpenStack configuration option, Neutron plug-in performs to expectation or if there is any data path impact for upgrading to a different OpenStack release? + VMTP is a small python application that will automatically perform ping connectivity, round trip time measurement (latency) and TCP/UDP throughput measurement for the following East/West flows on any OpenStack deployment: * VM to VM same network (private fixed IP, flow #1) @@ -32,6 +32,7 @@ For VM-related flows, VMTP will automatically create the necessary OpenStack res See the usage page for the description of all the command line arguments supported by VMTP. + Pre-requisite ------------- @@ -117,5 +118,6 @@ Links * Documentation: http://vmtp.readthedocs.org/en/latest * Source: http://git.openstack.org/cgit/stackforge/vmtp -* Bugs: http://bugs.launchpad.net/vmtp +* Supports/Bugs: https://launchpad.net/vmtp +* Mailing List: vmtp-core@lists.launchpad.net diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index 7b4dd32..2b1bfe9 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -54,7 +54,7 @@ Submit Review 7. Submit the review:: - $ git review + $ git review The members in the VMTP team will get notified once the Jenkin verification is passed. So watch your email from the review site, as it will contain the updates for your submission. diff --git a/doc/source/usage.rst b/doc/source/usage.rst index e7255ca..be61007 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -162,6 +162,7 @@ Create one configuration file for your specific cloud and use the *-c* option to * Step 3) Upload the Linux image to the OpenStack controller node, so that OpenStack is able to spawning VMs. You will be prompted an error if the image defined in the config file is not available to use when running the tool. The image can be uploaded using either Horizon dashboard, or the command below:: + python vmtp.py -r admin-openrc.sh -p admin --vm_image_url http:// **Note:** Currently, VMTP only supports the Linux image in qcow2 format. diff --git a/vmtp.py b/vmtp.py index 5e85399..7e9d0a4 100755 --- a/vmtp.py +++ b/vmtp.py @@ -15,6 +15,7 @@ import argparse import datetime +import hashlib import json import os import pprint @@ -149,6 +150,10 @@ class ResultsCollector(object): self.results['args'] = args + def generate_runid(self): + key = self.results['args'] + self.results['date'] + self.results['version'] + self.results['run_id'] = hashlib.md5(key).hexdigest()[:7] + def save(self, cfg): '''Save results in json format file.''' print('Saving results in json file: ' + cfg.json_file + "...") @@ -829,6 +834,7 @@ if __name__ == '__main__': if config.json_file or config.pns_mongod_ip: rescol.get_controller_info(config, vmtp.net) rescol.mask_credentials() + rescol.generate_runid() if config.json_file: rescol.save(config)