aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/vping
AgeCommit message (Collapse)AuthorFilesLines
2023-03-21Stop bashing functest scriptsguillaume.lambert1-1/+1
Though bash is a good interactive user shell and apart portability concerns, many UN*X systems and GNU+Linux distributions now prefers Almquist or Kornshell variants for scripting in order to improve the system performance and maintenability. https://wiki.ubuntu.com/DashAsBinSh https://mywiki.wooledge.org/Bashism https://en.wikipedia.org/wiki/Almquist_shell Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I32c5490f9eab54e6cac594f3eac1e392edf8b272
2021-11-15Update linters and fix all new issuesCédric Ollivier2-10/+9
It mostly add encoding in open calls and leverage f-strings. Change-Id: Ifead18fc724a452c1067dcf91dc577032edc9c59 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-08-18Update to Alpine 3.14Cédric Ollivier2-6/+6
It also fixes lots of new pylint warnings. Change-Id: I3376aee5649596c53bc2941ad4d8e0674a2967fe Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-08-17Boot a VM to run jujuCédric Ollivier1-2/+2
It allows running juju_epc vs arm32 and arm64. It stops offering juju in functest-vnf and rather installs it in a VM. It also adds a couple of missing output decode() Change-Id: I2218742b2824c8328823051bde32422e56784e90 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-03-27Check the login prompt in console in SingleVm1Cédric Ollivier1-0/+2
It also checks the second vm2 console log in case of vping_ssh. Change-Id: I13a5edfb3e19449a38d2f0478d549bd8fcc5cfa7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-01-24Update Alpine to 3.11Cédric Ollivier1-3/+3
It also updates Python to 3.8 (default version). It selects arm32v6 et arm64v8 repos and switches multiarch binfmt. https://alpinelinux.org/posts/Alpine-3.11.0-released.html Change-Id: Ib41cf0ab805ce2137658f3ff656b0a88c7b4ebf5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
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>