aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/router/cloudify_vrouter.py
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15Update linters and fix all new issuesCédric Ollivier1-1/+1
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 Ollivier1-5/+5
It also fixes lots of new pylint warnings. Change-Id: I3376aee5649596c53bc2941ad4d8e0674a2967fe Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-08-01Increase check_console_loop to 12Cédric Ollivier1-0/+2
It failed once when deeply testing in parallel [1]. https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-jerma-vyos_vrouter-run/80/console Change-Id: Ia70c43d603302d1bed46d984541b0e71461be4c4 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>
2019-06-24Add warning messages in vyos_vrouterCédric Ollivier1-0/+8
Both Cloudify based testcases print the same warning messages if NEW_USER_ROLE is admin. An additional whitespace is removed too. Change-Id: Idf2a2ea4373efdc579f0ac3e0a69ec08a7fbf105 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-24Refactor modules to avoid duplicated codeCédric Ollivier1-40/+3
It also increases number of lines to warm about duplicated codes. Change-Id: I3914da8a90cbfe8fd024e9944c3adc8a617330d3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-25Remove useless vyos_vrouter output dirCédric Ollivier1-2/+1
It doesn't store any file. Change-Id: I94801508a11edb8f0bbff7e4319c4d50411ec715 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-24Update VyOS to 1.1.8Cédric Ollivier1-3/+3
It's worth mentionning that the filesystem is hugely reduced. Change-Id: Ic3e8a5d601a62f1762cbd491c228b7f053905e35 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-11Update and enable Cloudify-based testcasesCédric Ollivier1-4/+15
It switches from the Cloudify virtual machine to the community container which allows deploying vyos_vrouter and cloudify_ims. Last stable Cloudify OpenStack plugin (2.4.17) is now deployed. It also updates the Cloudify python package to latest release. It adds a delay before deleting the blueprint which may be improved in a second change (it allows enabling the testcase in the stable release). Change-Id: Ie48a2c9d2badab0d7ba0b9e7845f453fad335ef7 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-06Remove duplicated code in vnfsCédric Ollivier1-65/+5
It mainly leverages on functest_utils instead of duplicating. Change-Id: I97dc9215a835d3e7f1527b565132f667f09f2b7e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-07Remove one useless security groupCédric Ollivier1-5/+0
This rule breaks lookup when the user created is admin. Change-Id: I2fe3dba687bd5d151cd7e53217586a0bcb21815d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-30Delete alt images before removing the accountCédric Ollivier1-2/+1
Else it could raise unauthorized exceptions [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/188/console Change-Id: Ia9b857069f775e2c8ecc5e07cf39b3a1fb7e3540 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-30Allow backporting a pylint errorCédric Ollivier1-1/+1
Change-Id: I2df0964d63c80abbc5c5cc438e1fdd32f24fd52f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-30Fix clean() in cloudify ims and routerCédric Ollivier1-1/+5
It raised exceptions in both branches [1] [1] https://build.opnfv.org/ci/view/functest/job/functest-compass-baremetal-daily-master/209/console Change-Id: I87b33cedae768f92296efa4570d2a47cd9cdbdf2 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-28Leverage vyos_vrouter on CloudifyCédric Ollivier1-265/+88
It also stop rebooting the VMs. Change-Id: Ib0f9e1aac1dd8505378b0688930eb41a590a11f1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-10Force region to RegionOne if OS_REGION_NAME is unsetCédric Ollivier1-1/+2
tempest still selects the first one if unset [1]. JIRA: FUNCTEST-990 [1] https://docs.openstack.org/tempest/latest/sampleconf.html Change-Id: I238d47173c2c4aa1db694028e4d44b80b0e280f1 Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
2018-06-19Fix pylint errorsCédric Ollivier1-13/+7
They are highlighted by the last pylint version. Change-Id: I473212a413013492716993fb536903b13bff66ed Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-14Support py3 in uncovered packagesCédric Ollivier1-1/+4
It has to be noted that cloudify_rest_client doesn't support py3 then next unit tests vs cloudify-based testcases would be excluded. Change-Id: I0b0e64929d1238665c778ce51fd6abd5ccf06b6c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-10Update cloudify-rest-client to 4.3.2Cédric Ollivier1-1/+2
Change-Id: I8ac0becb57897233c2a12781dc022d9fdfd32f85 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-30Bypass Cloudify's upper-constraints issuesCédric Ollivier1-1/+2
It installs cmd2 via yum instead as last cmd2 release only supports python3. Change-Id: I495d71f11ed48ba47e1aa27965675d4bef7c141e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-23Leverage on _member_ userCédric Ollivier1-86/+83
It leverages on the _member_ user as much as possible. It also switches all flavor names to avoid conflicts. It also increases debug logs. Change-Id: Ica595b0aba81e845ddb1c858fd5d0deb69872319 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-16Fix UserConfig objectsCédric Ollivier1-1/+1
UserConfig is expecting domain_name as arg instead of domain. Else all vnfs cannot work against non Default domains. Change-Id: I4bb53df9d9c03524b19ec32f8d346d94ba78d188 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-05-11Install Cloudify descritors in functest-vnfCédric Ollivier1-11/+1
It completes [1] to fix gates [2] and stops getting thirdparty vnf master (dependencies). It also prints data to ease debugging. [1] https://github.com/Orange-OpenSource/opnfv-cloudify-clearwater/commit/abd39d772c77317a25745feaaf312165e7588346 [2] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-fraser/110/console Change-Id: Ib317a491e54820f4edb01fcecfca9d2a08b40c0f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-12Print the stack traceback when cleaningCédric Ollivier1-2/+2
Change-Id: I8279844f0e42378b4fe550696608054cd7418a12 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-19Remove unused code in vyos_vrouterCédric Ollivier1-6/+1
Change-Id: I0fcfa886bfb5133d5e4b3face1e649e4cf8b9fc0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-19Conform with vyos descritor updatesCédric Ollivier1-0/+4
The new inputs [1] must be set else the testcase simply fails [2]. JIRA: FUNCTEST-936 [1] https://github.com/oolorg/opnfv-vnf-vyos-blueprint/commit/794f8a0594ed4c461c7d1d08d6b0ef9fb12004e2 [2] https://build.opnfv.org/ci/view/functest/job/functest-daisy-baremetal-daily-master/12/console Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I1113581feac7d4dc901ba197caed4fddd5994929
2018-03-17Decrease log levels when trying to connectCédric Ollivier1-3/+3
Only the last attempt should be printed in console. Change-Id: Ic1ed5887195c98c64ade4558ac20ebd814e38bab Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-16Set project_name arg when creating usersCédric Ollivier1-0/+2
It also print snaps_creds to ease debugging [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-joid-baremetal-daily-master/22/console Change-Id: I5b0d0dcffe3e45d8fa7d1d7d8ce19172fc42aaa1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-07Add a new env var for nameserverLinda Wang1-1/+3
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-04Set user domain name when creating usersCédric Ollivier1-0/+1
It updates juju_epc.py and cloudify_vrouter.py. Change-Id: I8cf97e31d78a4d48ad815faadc8e4130581e1c21 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Switch from CONST to CONFCédric Ollivier1-2/+2
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-21Merge "Print stdout and stderr when calling commands over SSH"Cedric Ollivier1-10/+14
2018-02-21Print stdout and stderr when calling commands over SSHCédric Ollivier1-10/+14
It will help debugging possible issues vs APEX [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/792/console Change-Id: I610f5b0a7774440c51fa086fad4f61c9be0571dc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-21Create a second user in cloudify_vrouterCédric Ollivier1-5/+18
It mainly bypasses a bug when a similar network name has already been created. We can't apply the same operations for cloudify_vims because the key must be created by the _member_ user. Snaps haven't allowed that since [1] has been merged [1] https://gerrit.opnfv.org/gerrit/#/c/52157/ Change-Id: I90131487d0e08a4d95c684efb16a8009c3709a8e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-19Remove last CONST.__getattribute__()Cédric Ollivier1-2/+2
Change-Id: I82f6aa1e723c88eebd4c7410da4b9741a482e9bc Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-19Fix credentials in cloudify_vrouterCédric Ollivier1-76/+40
It completes [1] which partially fixes cloudify_vrouter [2]. It now handles region name too and formats long arg lists too. [1] https://gerrit.opnfv.org/gerrit/#/c/52175/ [2] https://gerrit.opnfv.org/gerrit/#/c/50747/ Change-Id: I592d12d7df6837531560acfc4afc0636f485c671 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-16Remove one debug printCédric Ollivier1-1/+0
Change-Id: I531d1e519fc0352525993c69142eea14b99a3f63 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-16Add suffixes in vnf keypair namesCédric Ollivier1-12/+14
Change-Id: Ia9c8ef535b16326a520367d2c7c98b7e8db4822c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-15Add suffixes to OpenStack resource namesCédric Ollivier1-26/+29
All vnf testcases have to add suffixes in OpenStack resources names simply because the password is now generated before any run [1]. Snaps mainly creates the resource only if unfound in all tenants [2]. Then one remaining resource could easily raise permissions denied. It avoid conflicts between vrouter and cloudify_ims which are using the same names. [1] https://gerrit.opnfv.org/gerrit/#/c/50747/ [2] https://jira.opnfv.org/browse/SNAPS-257 Depends-On: If56cc44fe35ca06bc9033af620ddd3c0586877fe Change-Id: I1800886e575189b64fdc580a5ee6b59c81fcde5c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Avoid duplicating get_parameter_from_yamlCédric Ollivier1-36/+23
It switches to this helper which was locally copied. Change-Id: Iaa30d83e8c0e2d4472f4ef8fe1da4943e424ebb3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-26Fix last Pylint error in FunctestCédric Ollivier1-17/+8
It also fixes all pylint warnings in router and the related unit tests. tox.ini is updated to ensure that no error is introduced. Change-Id: Iddd74b0dac7b6581d72b04369140006c9e19f998 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-14[vyos_vrouter] Support https endpointsShuyaNakama1-5/+3
JIRA: FUNCTEST-881 vyos_vrouter did not support https endpoints [1]. I fixed the following two points. 1. Modifying blueprint of Cloudify. 2. Changing nova client of utilvnf module. Point 1 I added command of support https endpoint to blueprint of vyos_vrouter. The Blueprint of vyos_vrouter is on our github repository [2]. I updated our repository. Point 2 I changed nova client of utilvnf module. Utilvnf module is utility module of vyos_vrouter. Nova client of utilvnf module did not support https endpoints. So, I changed to use nova client of snaps. After fixed the source code, I confirmed the vyos_vrouter was succeeded in the following two environments. 1. Our labs (Instoller:fuel, environment of https endpoints) 2. Orange POD (Instoller:compass, environment of http endpoints) [1] https://jira.opnfv.org/browse/FUNCTEST-881 [2] https://github.com/oolorg/opnfv-vnf-vyos-blueprint/blob/master/function-test-openstack-blueprint.yaml Change-Id: I468df0f2486a34bc558ad161eb7de44264549006 Signed-off-by: ShuyaNakama <shuya.nakama@okinawaopenlabs.org>
2017-11-25Remove os_utils call from cloudify ims and vrouterLinda Wang1-4/+6
Change-Id: I333551125616113484ad275820f2176dae79da6e Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-11-21Removal of deprecated SNAPS-OO classes.spisarski1-41/+44
JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-11Fix fail of vRouter on Orange PODroot1-2/+1
1. Functest docker container environment has no attribute 'OS_REGION_NAME' 2. vRouter was get the 'OS_REGION_NAME' but not used it. 3. Deleting use 'OS_REGION_NAME' part of vRouter. 4. Utility lib of vRouter use Nova client. 5. Modifying Nova client authentication step for auth api v3. 6. Doing test of modified vRouter on Orange POD. Change-Id: I062549e5ca48fb4825b53448a4e2ffc8c1f8ec40 Signed-off-by: root <shuya.nakama@okinawaopenlabs.org>
2017-09-25Fix creds still used by vrouterroot1-4/+4
1. 'CloudifyVrouter' object has no attribute 'creds' 2. 'CloudifyVrouter' object was still use 'creds' 3. Doing test of modified vyos_vrouter on our labs. Refer to following commit. https://gerrit.opnfv.org/gerrit/#/c/41249/ Change-Id: Id1b4dfa4c35aba9bbb4fd64ef58446d3e99468df Signed-off-by: root <shuya.nakama@okinawaopenlabs.org>
2017-09-07Fix creds used by vrouterAlex Yang1-12/+4
1. 'CloudifyVrouter' object has no attribute 'creds' 2. snaps_cred was set in VnfOnBoarding.prepare() Change-Id: I7d7ba60627f82c6e40d2c6190b110d6029740eb2 Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
2017-08-29Refactor the vyos_vrouter to adopt VNF abstractionShuya Nakama1-0/+542
JIRA: FUNCTEST-788 1.Modifying code of vyos_vrouter to inherit vnf abstraction class. 2.Adding vyos_vrouter code from our repo to functest. 3.Adding unit test of vyos_vrouter. 4.Doing test of modified vyos_vrouter codes on our labs. Change-Id: I77e4be8b2a140ea0176c607f2be736599f893ace Signed-off-by: Shuya Nakama <shuya.nakama@okinawaopenlabs.org>