aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/orchestrator
AgeCommit message (Collapse)AuthorFilesLines
2017-04-18Add SRIOV supportJing Zhang1-8/+23
A generic provider network solution is introduced. To identify whether a network specified in the test case is a provider network new attributes are introduced in the test case network section: networks: test-net: cidr: '192.168.1.0/24' provider: "sriov" physical_network: 'physnet1' If the "provider" attribute is present, the network is an existing provider network. If the value is "sriov", binding:vnic_type=direct is added to the interface in the heat deployment template. In orchestrator/heat.py, the interface creating functions are given a new parameter that tells if the network in use is a provider network. The benchmark/contexts/model.py is changed to store the value of the provider attribute from the test case and function calls to port creation is updated with the provider parameter. The same change is made in contexts/heat.py as well. Also calls for creating a new tenant network is replaced for creating a new provider network if the provider attribute is present. Update-1: Change test_model.py Update-2: Per comment, change comment style to """" Update-3: Change test_heat.py Update-4: Add unit test cases to pass coverage test Update-5: Add SRIOV provider network example in opnfv_yardstick_tc008.yaml Update-6: Per comment, remove empty line in orchestrator/test_heat.py Update-7: Per comment, change comment lines in orchestrator/test_heat.py Update-8: Add more unit test cases to pass coverage test Update-9: Change to create SRIOV provider network on the fly so as to support co-current test runs Update-10: Per comment, init physical_network to 'physnet1' Change-Id: I76004c4fcc9bffcfd8ed021fd647e0cecb346ef4 JIRA: YARDSTICK-612 Signed-off-by: Jing Zhang <jing.c.zhang@nokia.com>
2017-03-10Bugfix: heat: don't json encode templateRoss Brattain1-4/+1
heatclient.common.http.SessionClient automatically json.dumps the data in kwargs. If we json dump ourselves we end up double-decoding which is invalid. heatclient.common.http.py: class SessionClient(adapter.LegacyJsonAdapter): """HTTP client based on Keystone client session.""" def request(self, url, method, **kwargs): redirect = kwargs.get('redirect') kwargs.setdefault('user_agent', USER_AGENT) if 'data' in kwargs: kwargs['data'] = jsonutils.dumps(kwargs['data']) kwargs['data'] includes the template, so this is double-decoding in JSON JIRA: YARDSTICK-584 Change-Id: I663af42f7e92e285b540b614ceda87f17da5f22d Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-02-26heat context support affinity and anti-affinityrexlee87761-0/+10
JIRA: YARDSTICK-566 Current Heat context support affinity and availability arguments but not support affinity and anti-affinity. Enhance Heat context to support affinity and anti-affinity: 1. can create heat server group with affinity/anti-affinity 2. each server could be specified which server group they are in Change-Id: I46e7376fd116c6e109cb5dcb1c168460918e6d43 Signed-off-by: rexlee8776 <limingjiang@huawei.com>
2017-02-14Merge "heat: close file before parsing template"Rex Lee1-1/+1
2017-01-17heat: close file before parsing templateRoss Brattain1-1/+1
we don't need to keep the file open once we have read it Change-Id: I7234fe91d2080d357c7a6506543cef067a9c2aac Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-16Use """ to replace ''' in docstringchenjiankun1-27/+27
JIRA: YARDSTICK-525 For consistency, we always use """triple double quotes""" around docstrings. Change-Id: I47a20bbd8b55bc544b4841ea4006929af0a044ac Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2017-01-12Add support for Python 3Ross Brattain1-18/+24
Porting to Python3 using Openstack guidelines: https://wiki.openstack.org/wiki/Python3 This passes unittests on Python 3.5 and passes opnfv_smoke suite Updates: use six for urlparse and urlopen fix exception.message attribute removal run unittests on python3 use unitest.mock on python 3 fix open mock for vsperf fix float division by using delta/eplison comparison use unicode in StringIO use plugin/sample_config.yaml relative path from test case fixed apexlake unittests upgraded to mock 2.0.0 to match python3 unittest.mock features fixed flake8 issues implement safe JSON decode with oslo_serialization.jsonutils.dump_as_bytes() implement safe unicode encode/decode with oslo_utils.encodeutils heat: convert pub key file from bytes to unicode pkg_resources returns raw bytes, in python3 we have to decode this to utf-8 unicode so JSON can encode it for heat template JIRA: YARDSTICK-452 Change-Id: Ib80dd1d0c0eb0592acd832b82f6a7f8f7c20bfda Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-12heat: fix key_uuid formatRoss Brattain1-3/+10
The .format() won't work, since it can't slice the uuid We have to convert the uuid to string before we slice it. I thought .format() would implicitly call __str__() before applying width, but that is not the case. 'files/yardstick_key-{:.{width}}'.format(self.key_uuid, width=8)) We also need to define a constant short uuid lenght, we can't hardcode the length to 8 everywhere. Create a helper function to standardize the generation of the short key uuid and use that helper function everywhere Change-Id: I59e051bfe697587e967f93f5b8f209e0e7daa5c7 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-01-10associate an uuid to yardstick_key and yardstick_key.pubJingLu51-3/+8
JIRA: YARDSTICK-527 This work is to support yardstick parallel tasks in the future. Currently, the RSA key we generated and used to access the VM is named 'yardstick_key'. If more than two tasks are running paralleled, the later 'yardstick_key' will cover the former. We want associate an uuid to identify differnets for each tasks. So the key files won't conflict. The first 8 digits will be used, as there is no need to used a full-length uuid. Change-Id: If8eaf47ae527cf9b3bd50f37ab3051fbdccf5f03 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-12-13Add support for OpenSrack NewtonJingLu51-23/+8
JIRA: YARDSTICK-410 This patch uses keystoneauth1.session to initialize the client for Heat The keystoneauth1.session.Session class was introduced into keystoneauth1 as an attempt to bring a unified interface to the various OpenStack clients that share common authentication and request parameters between a variety of services. Change-Id: Ie6287b50a36cf03950fa1174791df826e9bdafd3 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-06-01Change floating ip association methodAkos Farago1-6/+6
Change-Id: I694fbce4470a14893310334a39e15b61fbe8905a Signed-off-by: Akos Farago <akos.farago@ericsson.com>
2016-02-18Add heat template workaround for odl-l3Jo¶rgen Karlsson1-8/+26
Change-Id: I476fdd4d0e0e97cb1457ae15f92442c42aa77b4e Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2016-02-04HEAT HTTPS SSL Supportrsritesh1-1/+2
Currently yardstick does not provide the support for OS_CACERT option. The addition OS_CACERT options makes the user to use certificate to communicate with the HEAT. Closes-Bug: #YARDSTICK-227 Change-Id: I045c3f4b94dba9dfb6fd0e2706d758647d3fe4af Signed-off-by: rsritesh <p.ritesh@tcs.com>
2016-01-15HeatContext model update to match heat code updateQiLiang1-2/+5
In Heat Liberty release OS::Nova::Server will always use the user pre-configured in the image (e.g. "fedora" for stock Fedora cloud images, "ubuntu" for stock Ubuntu cloud images, "cloud-user" for stock CentOS cloud images etc) Change all ec2-user -> ubuntu Add admin-user in Heat model for backwards compatibility. Refer below links for detalis: https://etherpad.opnfv.org/p/yardstick_release_b_troubleshooting https://github.com/openstack/heat/commit/e423bec7f10b0f5d07f05d195b3b7860f6bceb00 http://blog.scottlowe.org/2015/04/23/ubuntu-openstack-heat-cloud-init/ JIRA: - Change-Id: I6b8b2b21daf113a3a86aee1126b0c3e74737ef4f Signed-off-by: QiLiang <liangqi1@huawei.com>
2015-12-08Fix network property validation errorJo¶rgen Karlsson1-1/+1
Fix for the validation error on port.properties.network when deploying using OS Kilo or later. Change-Id: I761cc958573d6eb8c909a08f186486f3ac93e816 JIRA: - Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
2015-06-15Add support for external HOT templateHans Feldt1-10/+29
An external HOT template is a separate yaml file in native Heat format HOT. The external template is referenced in the task file and used as template for a "context". Parameters required at template instantiation are also configured in the task file. See new sample file ping-hot.yaml Change-Id: Ie2b7ea96ea90b75ca4e08a29e2223ceeb1474724 JIRA: YARDSTICK-24 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-06-09Add support for multiple contexts(stacks)Hans Feldt1-8/+11
A list of contexts can be specified, cross referencing between contexts is supported and shown in the added sample file. TBD can placement group work between stacks? Change-Id: I26dbe94e52ba0be5e49f50fd70540a57de2204cb JIRA: YARDSTICK-31 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
2015-05-22add orchestrator package with heat moduleHans Feldt2-0/+429
The heat module contains two classes, Template and Stack. Resources are added to a Template instance and then deployed. This returns a Stack instance that holds the output values from the deployment and that also has a method to undeploy - delete the stack. Change-Id: Ief3f75bbb015e5d43023b8d8e8ece49673572b13 JIRA: - Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>