aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/exceptions.py
AgeCommit message (Collapse)AuthorFilesLines
2018-03-15Create API to get SUT informationchenjiankun1-0/+8
JIRA: YARDSTICK-1072 We need to show SUT information in GUI. Change-Id: I40bcd513f3c6a443c82764687637ac5258b99584 Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
2018-03-12Replace neutron router deletion with shade.Shobhi Jain1-0/+4
Function delete_neutron_router now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I5b557b640396f343b85b5f5eff415384decc083c Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-12Replace neutron subnet creation with shade.Shobhi Jain1-0/+4
Function 'create_neutron_subnet' now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I8eb5295cecd73742bfb5a7d0764af6f45ef0685e Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-12Replace neutron network creation with shade.Shobhi Jain1-0/+4
Function create_neutron_net now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I456078e98550901c1f736640c9f9bd0d5f9c3df6 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-05Error in string format in HeatTemplateError messageRodolfo Alonso Hernandez1-1/+1
There is a missing "s" in HeatTemplateError message [1]. [1]https://github.com/opnfv/yardstick/blob/8400c1895c49cb0c7802692f75d820fb5b8b7dc4/yardstick/common/exceptions.py#L70 JIRA: YARDSTICK-1047 Change-Id: Ieb6fbf0af35d624015dbf34f34de7c7cc9145dd5 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-02Merge "Prohibit the importation of a list of libraries"Ross Brattain1-0/+5
2018-03-01Add "render-only" option to "task" commandRodolfo Alonso Hernandez1-0/+12
This new option provides to the user the ability to output the rendered input files. This option could be useful in case the input files are Jinja2 templates, depending on input arguments. The user can preview the rendered input tasks files without executing them. JIRA: YARDSTICK-1020 Change-Id: Ib15ade7e1adcb29beae5e635fb5d02045c4432bb Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-01Merge changes from topics 'feat/keep_vnf', 'YARDSTICK-886'Ross Brattain1-0/+8
* changes: Add _create_new_stack method Update TaskParser to deal with qualified name in Context Add qualified name to Context
2018-03-01Add _create_new_stack methodEmma Foley1-0/+4
The logic for creating a new stack in contexts/heat.py:HeatContext can added to a method to make the code eassier to read and test. This is in preparation for an update to deploy() that would allow an existing stack to be reused, or a new stack created. By having the create_new_stack logic in a new method, deploy() becomes easier to read and test. JIRA: YARDSTICK-886 Change-Id: I7af01e2209a3460658f8db0249b7c620743cced0 Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-01Update TaskParser to deal with qualified name in ContextEmma Foley1-0/+4
The context name depends on the defined name in the testcase input file, the task ID and the flags of the context. If the context is going to be undeployed at the end of the test, the task ID is suffixed to the name to avoid interferences with previous deployments. If the context needs to be deployed at the end of the test, the name assigned is kept. This patch makes this process transparent to the developer. This patch modifies how TaskParser determines the correct context name, taking into account that the name might change based on context flags. JIRA: YARDSTICK-886 Change-Id: I44da30dac562c1a4166e084645ae91c17798651d Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> Signed-off-by: Emma Foley <emma.l.foley@intel.com>
2018-03-01Import "traffic_profile" modules only onceRodolfo Alonso Hernandez1-0/+5
"traffic_profile" modules should be imported only once. Every time TrafficProfile.get is called, the modules under "yardstick.network_services.traffic_profiles" are loaded [1]. Instead of this, the modules should be registered only once the first time "yardstick.network_services.traffic_profiles.base" is loaded. This will reduce the execution time and will avoid unnecessary calls. [1] https://github.com/opnfv/yardstick/blob/d2c7cc4e9768ed003257a95c92cdb278d516761b/yardstick/network_services/traffic_profile/base.py#L36-L37 JIRA: YARDSTICK-951 Change-Id: Ia3565378ba3a1377fcb0aea8bda50ef8189414fd Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-17Fix error in address input format in "_ip_range_action_partial"Rodolfo Alonso Hernandez1-0/+3
IP address format introduced in [1] should be unicode instead of string. "ipaddress.IPv4Address(min_value)" doesn't parse correctly the input parameter unless the parameter is in unicode format; this is valid both for Python version 2 and 3. Execution error if the parameter is a string: >>> int(ipaddress.IPv4Address('10.0.3.2')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/ipaddress.py", line 1391, in __init__ self._check_packed_address(address, 4) File "/usr/local/lib/python2.7/dist-packages/ipaddress.py", line 554, in _check_packed_address expected_len, self._version)) ipaddress.AddressValueError: '10.0.3.2' (len 8 != 4) is not permitted as an IPv4 address. Did you pass in a bytes (str in Python 2) instead of a unic [1]https://github.com/opnfv/yardstick/blob/e5775e7efbc55f116b4d4ac11ff87b8d8553247e/yardstick/network_services/traffic_profile/traffic_profile.py#L87-L88 JIRA: YARDSTICK-996 Change-Id: Ic727a79044834b181c99789f0f5efc21c68f0ff2 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-15Prohibit the importation of a list of librariesRodolfo Alonso Hernandez1-0/+5
Some modules can't be imported and used in Yardstick. For example, "ansible" has GPLv3 license and can't be used as a library in this project without modifying Yardstick license. JIRA: YARDSTICK-896 Change-Id: I9d6bec0493ac50f1051235cc77e81059dfc3e01c Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-12Remove tool provisioning from DpdkVnfSetupEnvHelper._setup_dpdkRodolfo Alonso Hernandez1-0/+4
Both "uio" and "igb_uio" drivers are present in the VM image generated using "./nsb_setup.sh" script. "igb_uio" driver is compiled along with the DPDK library compilation. Tool "nsb_setup.sh" provisioning and execution should be removed from this function because there is not needed anymore. In case "igb_uio" driver is not loaded, an exception should be raised. JIRA: YARDSTICK-999 Change-Id: I89174f84ac36d8231587402c96751746cb18e290 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-02-09Replace "python-heatclient" with "shade" clientRodolfo Alonso Hernandez1-0/+6
Replaced "python-heatclient" with "shade" client. The "python-heatclient" library is removed from requirements file. "shade" client version 1.22.2 is the required one for OpenStack Pike release. shade is the recommended client to interact with OpenStack clouds [1] [1] https://github.com/openstack-infra/shade JIRA: YARDSTICK-880 Change-Id: Ibbdfc42a543d2d9ed4cf70d78de3de8cbecd0076 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-01-03Make GenericVNF an abstract classRodolfo Alonso Hernandez1-0/+40
GenericVNF class is now an abstract class. Only optional methods are implemented. Mandatory methods: - instantiate - wait_for_instantiate - terminate - scale - collect_kpi. JIRA: YARDSTICK-866 Change-Id: Ia8766f9f98816e11894d1e72b0f3bd573d091d99 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2017-12-22Replace subprocess "check_output" with "Popen"Rodolfo Alonso Hernandez1-0/+19
"check_output" is a blocking wrapper for "Popen" which returns the output of the command execution or raises an exception in case of error. "Popen" is a non-blocking function that allows to create asynchronous tasks. It returns any possible execution error but doesn't raise an exception; this is delegated to the developer. This code is used in the Yardstick CLI base test class. Change-Id: Ie3e1228b2d40cb306354447653678bf581bc9697 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>