aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/common/exceptions.py
AgeCommit message (Collapse)AuthorFilesLines
2018-05-03Replace nova get flavor with shade client.Shobhi Jain1-0/+4
Rename get_flavor_by_name with get_flavor. Function get_flavor now uses shade client. JIRA: YARDSTICK-1088 Change-Id: Ic82127e475baf39643be0a254b177f3058b85748 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-03Replace nova get server with shade client.Shobhi Jain1-0/+4
Rename get_server_by_name with get_server. Function get_server now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I69c59145cefdb565f3ece27baaaf932905e1b757 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-05-02Merge "Replace nova attach volume to server with shade client."Rodolfo Alonso Hernandez1-0/+4
2018-04-30Replace nova attach volume to server with shade client.Shobhi Jain1-0/+4
Function attach_volume_to_server now uses shade client instead of nova client. JIRA: YARDSTICK-1088 Change-Id: Id00df672c2c195b5c338cbbc30ddf2742a4e4d29 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-27Add active wait functionRodolfo Alonso Hernandez1-0/+8
Added function "wait_until_true". This function will make an active wait until the predicate passed as an argument returns True. If the timeout expires, the function will raise a generic exception or a user defined one passed as an argument. This function will be used in YARDSTICK-1127. JIRA: YARDSTICK-1128 Change-Id: I9854e465ac6b586bf4be39ab4b266d5625b39e30 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-26Merge "Replace nova delete keypair with shade client."Rodolfo Alonso Hernandez1-0/+4
2018-04-26Merge "Replace nova client create keypair with shade."Rodolfo Alonso Hernandez1-0/+4
2018-04-26Merge "Replace nova delete instance with shade client."Rodolfo Alonso Hernandez1-0/+4
2018-04-26Merge "Replace nova create instance with shade client."Rodolfo Alonso Hernandez1-0/+4
2018-04-23Replace nova delete keypair with shade client.Shobhi Jain1-0/+4
Function delete_keypair now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I46b895748c5c44b0bf7d5b035395676ebff48d7f Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova client create keypair with shade.Shobhi Jain1-0/+4
Function create_keypair now uses shade client instead of nova client. JIRA: YARDSTICK-1088 Change-Id: I060580504d6969c5ba859ed4494082feb998d37d Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova delete instance with shade client.Shobhi Jain1-0/+4
Function delete_instance now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I5772a74c6dc2d103edd410042a8eaf721d1bcc5c Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-23Replace nova create instance with shade client.Shobhi Jain1-0/+4
Remove redundant functions: *get_instances *get_instance_status *get_instance_by_name Function create_instance_and_wait_for_active now uses shade client. JIRA: YARDSTICK-1088 Change-Id: I766da333dabbb1b83a7b4ede4bf73567ec70eb8c Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-21Merge "Improve "Libvirt.create_snapshot_qemu" function"Rodolfo Alonso Hernandez1-0/+11
2018-04-19Merge "Update neutron delete_neutron_net function."Emma Foley1-0/+4
2018-04-18Merge "Replace neutron create security group full with shade."Rodolfo Alonso Hernandez1-0/+4
2018-04-16Improve "Libvirt.create_snapshot_qemu" functionRodolfo Alonso Hernandez1-0/+11
Improved "Libvirt.create_snapshot_qemu" function: - Check if the base image is present in the remote host. If not, try to copy from the execution host. - Check the execution status. In case the command fails, raise an exception. JIRA: YARDSTICK-944 Change-Id: I78bd0d3ed6a1f35ed772c0d192bb240009a580ed Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-04-16Update neutron delete_neutron_net function.Shobhi Jain1-0/+4
Update the changes done in patch [1]. JIRA: YARDSTICK-890 [1] https://gerrit.opnfv.org/gerrit/#/c/52361/ Change-Id: Iccbf16d0a2e72919d5092366241ff41686f01a58 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-16Replace neutron create security group full with shade.Shobhi Jain1-0/+4
Function create_security_group_full now uses shade client. Remove openstack util's private 'get_security_groups', 'get_security_group_id' & 'create_security_group' functions as 'create_security_group_full' now uses 'get_security_group' & 'create_security_group' function defined in shade client library. JIRA: YARDSTICK-890 Change-Id: Ibd5b9ca9b7ce99b3e40c5dcc545f2af672ce2203 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-04-13Add MQ consumer, producer and payload base classesRodolfo Alonso Hernandez1-0/+5
Added MessagingProducer base class. A class implementing this base class can send a cast message using the MQ service installed in the Yardstick jumphost (RabbitMQ by default, other MQ could be implemented). The producer will send messages to an specific topic. Added MessagingConsumer base class. A class implementing this base class will be able to receive any message sent by a MessagingPorducer class publishing messages in the topic subscribed. By default both Producer and Consumer "fanout" is True. That means every Consumer will create a fanout Queue attached to the MQ Exchange topic. All Consumers attached to this topic will receive the message sent by the Producer [1]. Added Payload base class. To send data through the message queue service, a Payload derived object should be created. This base class allows to define the attributes container in the class, convert the object to a dict and retrieve the object from a dict. Added a new library, "oslo.messaging", to implement the RPC client and server. [1]http://blog.thedigitalcatonline.com/blog/2013/08/21/some-tips-about-amqp-direct-exchanges/ JIRA: YARDSTICK-1074 Change-Id: I63932b5fb3de2bdc1270fc83295630a2a349e2a6 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-27Merge "Improve "Libvirt.virsh_create_vm" function"Rodolfo Alonso Hernandez1-0/+4
2018-03-27Merge "Improve OVS-DPDK boot process"Rodolfo Alonso Hernandez1-0/+26
2018-03-27Replace neutron floating ip deletion with shade.Shobhi Jain1-0/+4
Function delete_floating_ip now uses shade client. JIRA: YARDSTICK-890 Change-Id: I960630926b664266afbe7be00bb1352243b41be0 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-21Improve "Libvirt.virsh_create_vm" functionRodolfo Alonso Hernandez1-0/+4
Read the command exit code and raise an exception in case the VM boot process went wrong. JIRA: YARDSTICK-941 Change-Id: Ibabaae8983213a33799ad00fa4d9541bbabea857 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-21Improve OVS-DPDK boot processRodolfo Alonso Hernandez1-0/+26
Check if hugepages are present in the system. Check if every command executed during the boot up process exits correctly. JIRA: YARDSTICK-917 Change-Id: Ic0c8a72199ad80e3a65488cc88d0692863751284 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
2018-03-20Replace neutron floating ip creation with shade.Shobhi Jain1-0/+4
Function create_floating_ip now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I3defd691dad998cebf98442b52f0555b176f1af4 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-20Replace neutron router interface deletion with shade.Shobhi Jain1-0/+4
Function remove_interface_router now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I6bd36e35a339cce64dfa8b69c1e7b56cd70af956 Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
2018-03-20Replace neutron router creation with shade.Shobhi Jain1-0/+4
Function create_neutron_router now uses shade client instead of neutron client. JIRA: YARDSTICK-890 Change-Id: I819d26f4edb3af5e50f777e8ddbadf4d24820b7f Signed-off-by: Shobhi Jain <shobhi.jain@intel.com>
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>