Adding support to generate/store Run ID

Change-Id: I3ab83d22f46e5b27c85766a0388b1fa23c573204
This commit is contained in:
Yichen Wang 2015-03-05 17:32:28 -08:00
parent 2643907c64
commit 39268687bc
4 changed files with 13 additions and 4 deletions

View File

@ -8,8 +8,8 @@ VMTP is a data path performance tool for OpenStack clouds.
Features 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? 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?
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: 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) * 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. See the usage page for the description of all the command line arguments supported by VMTP.
Pre-requisite Pre-requisite
------------- -------------
@ -117,5 +118,6 @@ Links
* Documentation: http://vmtp.readthedocs.org/en/latest * Documentation: http://vmtp.readthedocs.org/en/latest
* Source: http://git.openstack.org/cgit/stackforge/vmtp * 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

View File

@ -54,7 +54,7 @@ Submit Review
7. Submit the review:: 7. Submit the review::
$ git review $ git review <TOPIC-BRANCH>
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. 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.

View File

@ -162,6 +162,7 @@ Create one configuration file for your specific cloud and use the *-c* option to
* Step 3) * 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:: 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://<url_to_the_image> python vmtp.py -r admin-openrc.sh -p admin --vm_image_url http://<url_to_the_image>
**Note:** Currently, VMTP only supports the Linux image in qcow2 format. **Note:** Currently, VMTP only supports the Linux image in qcow2 format.

View File

@ -15,6 +15,7 @@
import argparse import argparse
import datetime import datetime
import hashlib
import json import json
import os import os
import pprint import pprint
@ -149,6 +150,10 @@ class ResultsCollector(object):
self.results['args'] = args 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): def save(self, cfg):
'''Save results in json format file.''' '''Save results in json format file.'''
print('Saving results in json file: ' + cfg.json_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: if config.json_file or config.pns_mongod_ip:
rescol.get_controller_info(config, vmtp.net) rescol.get_controller_info(config, vmtp.net)
rescol.mask_credentials() rescol.mask_credentials()
rescol.generate_runid()
if config.json_file: if config.json_file:
rescol.save(config) rescol.save(config)