aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping
AgeCommit message (Collapse)AuthorFilesLines
2019-07-27Switch to Python 3.7 and Alpine 3.10Cédric Ollivier1-1/+1
It also allows building docs as doc8 is broken due to latest OpenStack's upper-constraints. pylint is updated to 2.3.1 (lastest py3.7 version) It disables perm as umask is currently false on lf-virtual1. Change-Id: If09d4796d48b7d0591e7926621d3bbf5ca1b6c24 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-03Fix timeout (switch to synchronous calls)Cédric Ollivier1-1/+0
It completes "Switch create_server timeout to default value" [1] which forbids waiting more that 180s (create_server was asynchronous). [1] https://gerrit.opnfv.org/gerrit/#/c/60423/2 Change-Id: Icbf9ee48024fe9e10571c2bb7ca895d5828fb561 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-31Add fallback mechanism if vlanCédric Ollivier2-5/+12
private_v4 and public_v4 are incorrectly set when vlan is used as overlay. JIRA: FUNCTEST-996 Change-Id: I120a247e92e0fd295769b2a0eeb15ce82a0eabc8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-31Print stderr in logs when calling cmd over sshCédric Ollivier1-2/+3
Change-Id: I152ac898661a0e99a6232df86689c70c468ceaa5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Clean all possible resourcesCédric Ollivier2-9/+12
It checks all openstack resources before cleaning. It allows removing images even if the test fail quickly. Change-Id: I1763b8a70fa7ffeb03c435e8e775c7afd1a7adac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-11Check the status of inherited stepsCédric Ollivier1-1/+2
Change-Id: If63c228f2844194279b560515f4ab24a4ee88be0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-07Cover vping_sshCédric Ollivier1-2/+0
Change-Id: I37c52057a45d76e081a1a0145baee96041ca25a5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-24Improve scenarios to reduce duplicate codesCédric Ollivier3-289/+33
Change-Id: I71f79b9ac8314ac979d4b1009f662baa7c93a4fd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-13Abort vping_userdata test if IP address is missingJuha Kosonen1-0/+4
Do not start checking the result of ping test if the first instance has no IP address. JIRA: FUNCTEST-976 Change-Id: I2da3154e63a6a97f86efe8274be84abc437aa133 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-05-30Fix _do_execute() return code in vping_sshCédric Ollivier1-1/+1
Change-Id: I781e51bb56f6cdac8b347e7fd85e70c07eb69e23 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-28Print vping output instead of Paramiko objectCédric Ollivier1-1/+1
Change-Id: Iddc1abdf443e482e8748434a4ba7d85709d8cd0e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-10Add image extra properties back in vping_baseDelia Popescu1-1/+4
Image extra properties are missing for ARM Set image_url for ARM JIRA: ARMBAND-383 Change-Id: I0e2730c3f22214ad61d72424ea76173f1783d0ca Signed-off-by: Delia Popescu <delia.popescu@enea.com>
2018-05-07Improve ssh timeout in vping_sshCédric Ollivier1-6/+18
It seems that 10s is not enough for Fuel. Change-Id: I46d3d2c9091946befb0e056a8c8cc56c59087471 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-07Simplify vping_sshCédric Ollivier4-91/+26
It directly calls ping from the ssh socket. It fixes a possible missing security rule. It stops blocking if vpings are in failure. Change-Id: I64092a155bb134fa8b7d31d0d13f695e019540d1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-05Implement get_external_network via shadeCédric Ollivier1-1/+2
It fixes the current issues as EXTERNAL_NETWORK is mainly unset by all Installers [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-fuel-armband-baremetal-arm-daily-fraser/31/console Change-Id: I8ee62623701c15b9ff962d0a0e07a77934ff03ac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-29Rewrite vping_ssh and vping_userdataCédric Ollivier3-303/+200
They now leverage on shade to allow gating OpenStack master as asked by TSC. Switching to OpenStack master (openstacksdk) requires to change only one line. It deletes the related unit tests as they have to be fully rewritten. They will be added in another change. Change-Id: I0c60681d6e1c0944960770429ef972947dd85321 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-23Switch from deploy utils to the right objectsCédric Ollivier3-18/+28
It also prints the full exceptions and removes useless casts. Change-Id: I19ff1ae90670833f998c0d17592da82207235229 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-21Bypass NoneType errors when creating routerCédric Ollivier1-2/+2
It converts private subnet name to str as it's mandary till [1]. It could be reverted as soon as [2] is merged in snaps. [1] https://gerrit.opnfv.org/gerrit/#/c/56091/ [2] https://gerrit.opnfv.org/gerrit/#/c/56171/ Change-Id: I849944fa9d4d2be21fe1a37b76c4cfd231b6d56f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-02Control vping cleanup step via --nocleanLinda Wang3-46/+40
Change-Id: Ic43b100348e77fd96aab9abc5a9ec4a0b47a2f87 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-03-15Create 2 images and flavors for tempest testsLinda Wang1-7/+3
Also 1. remove the obsolete function: generate_test_accounts_file 2. Use patch mechanism to get config Change-Id: I455ac37de71519bcaf9a51e5f1de1b9bc83b9ba6 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2018-03-07Add a new env var for nameserverLinda Wang1-1/+2
We should still consider that the nameserver must be handled by all installers instead [1]: - by configuring one or more DNS resolvers in dhcp_agent.ini - by asking a local resolv It eases setting the nameserver in testcases and then allows gating them. 8.8.8.8 is still defined by default. [1] https://docs.openstack.org/neutron/pike/admin/config-dns-res.html Co-Authored-By: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: Id58dd5ebee612a0fce2ebc40f089769e60899416 Signed-off-by: Linda Wang <wangwulin@huawei.com> Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-02Leverage on XtestingCédric Ollivier3-19/+19
It removes all the files which have moved to Xtesting. Vnf inheritances and env management will be improved in other changes. It keeps the same tree thanks to a symlink to allow publishing artifacts. Change-Id: I551bbd3f344cdab0158a50b7b09e541576695631 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Switch from CONST to CONFCédric Ollivier2-27/+34
It also removes constants.CONST and env.Environment which are now useless. Depends-On: I764a0a2a24447c941d1e726f3116593b29dd1c1e Depends-On: I6cfa832466dcefd737314633d807512e46267a69 Change-Id: Ife41c59d9f2e6ec4e49df38af962039f99554bc5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-19Remove last CONST.__getattribute__()Cédric Ollivier1-5/+5
Change-Id: I82f6aa1e723c88eebd4c7410da4b9741a482e9bc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-16Get properly env vars or their default valuesCédric Ollivier1-1/+2
It defines env.get() as an unique way to get Functest env vars or their default values. It can be considered as a wrapper above os.environ. It enforces backward compatibility via CONST which mustn't be used for that purpose. It should be noted that it also stops using CONST for getting OpenStack env vars. Change-Id: I333dc1afbc0123166a7eaff8b551370098efa341 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-30Remove duplicated code related to snaps credsJuha Kosonen1-10/+1
Add support for providing credentials in snaps_utils. JIRA: FUNCTEST-916 Change-Id: I3e027229d213d3791a115920f7012309cc027712 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
2018-01-28Fix warnings in all snaps-related modulesCédric Ollivier3-45/+31
It also adds vping/__init__.py to stop skipping vping unit tests. It removes the useless import os which is not required for mock (here the mock patch was simply false). It should be noted that the code is partially duplicated between snaps_test_runner.py and vping_base_base.py. A small part of code has been rewritten to fix that without multi inheritance. Change-Id: I2e3e181ad7dab8aa41afb1e63d0b6795ff0d1610 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-11Set the ram of flavor 1024Linda Wang1-2/+4
The setting of hw:mem_page_size=large indicates larger page sizes for guest RAM, eg., either 2MB or 1GB on x86. When tested on compass, 1GB is required. Change-Id: Iefd2e8ff30e0a496157e0bd118e63ab3c402abab Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-06Fix the yamllint errors in functest/ciLinda Wang1-4/+2
And also, remove the params "tempest_use_custom_images" and "unique_names" of vping, rally and tempest. Change-Id: Ic4243ef2f5e965910e5befa87db8d585cad34fa2 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-12-05Fix pylint errors of vpingLinda Wang3-22/+25
Change-Id: I272f0eb6fb0f2a274484a3dcfacd8ed65e4a5b23 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-21Removal of deprecated SNAPS-OO classes.spisarski3-40/+39
JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-03Report duration and result when vping failsCédric Ollivier1-1/+3
It completes "Bug fix: vping_userdata test status was not properly reported" [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/43911/ Change-Id: I7e8be6cd564a24ca174e63cfc295861c51cae8ed Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-10-03Create a router in both vping scenariiCédric Ollivier2-19/+17
It fixes vping_userdata as it allows getting metadata due to the gateway defined for the subnet. It could be noted that DHCP can add the route needed if no gateway is defined and if force_metadata is set in dhcp_agent.ini. Change-Id: Ia62e0f00e3d2caee6262dd9cd9966d1f21fe40d5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-10-02Bug fix: vping_userdata test status was not properly reportedMorgan Richomme1-1/+1
vping_base is calling vping_userdata vping_user data could return only EX_TESTCASE_FAILED or EX_OK by default vping_base always returns EX_OK (based on self.result=100..) it returned EX_RUN_ERROR only if upper class report EX_RUN_ERROR that is why vping_userdata was always PASS even if the trace "Ping OK" cannot be retrieved from the Nova console it seems that when running the vping_userdata, we systematically got Failed to read iid from metadata Change-Id: If72441dd93bffada5c7a5399c87db68d7ebeebed Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
2017-09-30Fix userdata issue for vping and orchestraLinda Wang2-4/+4
1. When creating VM, the type of the param userdata should be str, to conform with that in snaps [1]. 2. Remove the infinite loop for vping in userdata 3. Fix the criteria for vping_userdata and vping_ssh [1]: https://git.opnfv.org/snaps/tree/snaps/openstack/utils/nova_utils.py#n92 Change-Id: I262a7ebb93ec90bb6f8f3acb5d564f210abcfc4b Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-28Obtain scenario by CONST instead of get functionLinda Wang1-2/+1
JIRA: FUNCTEST-763 Change-Id: Ic9fa3243b50a09de8a5e531fed8298997367dd84 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-25Fix the config of vping netLinda Wang1-3/+3
Change-Id: I71cea850985c67cf4c4e42a29600f9d63291fc94 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-24Merge "Added means to override the RC file credentials."Linda Wang1-1/+7
2017-08-22Specify physical_network when creating networkLinda Wang1-4/+23
When the network_type is vlan, it is necessary to specify physical_network and segmentation_id. JIRA: FUNCTEST-863 Change-Id: Ia1acb0181e4f78654ecf5500c4c0366b143a91f5 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-21Added means to override the RC file credentials.spisarski1-1/+7
This has been done primarily to support tests using SNAPS-OO JIRA: FUNCTEST-847 Change-Id: Icf02c085a95c20d4088e5aafd6380c70689a4ee0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-29Restrict ping only once in ping.shLinda Wang1-11/+8
Otherwise, it makes no sense to configure ping_timeout as 200 times. Change-Id: I6e15f5149f24a4316f6d5b70bcda9a46418d1522 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-07-18Merge "Change calls to SNAPS library exposing OpenStack instance objects."Jose Lausuch1-1/+1
2017-07-14Change calls to SNAPS library exposing OpenStack instance objects.spisarski1-1/+1
Openstack object structures can change when new API versions are released and SNAPS no longer is exposing OpenStack object implementations as this makes the library brittle. The only two SNAPS method calls affected are when functest needs to query for external networks and when vPing Userdata needs to obtain the console logs. JIRA: SNAPS-125 Change-Id: If6000e50eaa274713d9a6c964eabd1f73ded684e Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-11Add decorators in testcases for energy recording.Benoit HERARD1-29/+49
Test cases are: - rally (sanity and full) - refstack - cloudify_ims - vping_ssh It also fix a bug on "energy_recording" decorator of energy module. Change-Id: I625c214552ad1b89eaf7e196e706d7c69b37da33 Signed-off-by: Benoit HERARD <benoit.herard@orange.com>
2017-07-06Fix logger name in vping_base.pyCédric Ollivier1-1/+1
It conforms with logging.ini which requires qualnames. Change-Id: Ic2f849009c31a3a7bc406fc44c4917d19ccf2424 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-07-05bugfix: vping support not_hugepage_configured podSerenaFeng1-1/+1
this bug was fixed in https://gerrit.opnfv.org/gerrit/#/c/35181/ but was reverted in https://gerrit.opnfv.org/gerrit/#/c/35671/ Change-Id: I5cbbd61ac196dc39c073ffc69254d987e4807130 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
2017-07-02Apply restrictive file permissionsCédric Ollivier1-0/+0
It conforms with [1] by creating a new venv which checks the unix permissions. As jjobs call Functest console scripts [2], all perms can be 644. Dockerfiles are updated as well. [1] https://security.openstack.org/guidelines/dg_apply-restrictive-file-permissions.html [2] https://gerrit.opnfv.org/gerrit/#/c/36805/ Depends-On: I9209e6efa1b493e24135402a46df72aaa14115d1 Change-Id: I31bc7f12b775928845e23b6b40288b0a50b87219 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-30Define console_scriptsCédric Ollivier2-16/+3
Only prepare_env.py and run_tests.py remain executable to avoid breaking the gate. As soon as the jenkins jobs are updated to run them from $PATH, tox will be updated to protect against chmod a+x py files. Dockerfile will be simplified as well. Change-Id: Iac1a7ceb6b344e800177226ea39919826f6d3735 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-06-27Added unit tests for vping.spisarski2-100/+56
Also removed some instance variables and unnecessary methods. JIRA: FUNCTEST-813 Change-Id: I13895674a9fd3de16c6a19410661440c5380c2f8 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-26Fixed problem to vping userdata introducted by SNAPS-OO patch.spisarski1-1/+1
Changed get_vm_inst() to return a domain object forgot to change the call in vping_userdata.py. JIRA: SNAPS-92 Change-Id: I7585dcde483c39fa850e5184686f42bbf2e8f3c5 Signed-off-by: spisarski <s.pisarski@cablelabs.com>