aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/epc/juju_epc.py
AgeCommit message (Collapse)AuthorFilesLines
2021-11-15Update linters and fix all new issuesCédric Ollivier1-31/+27
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-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-171/+171
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-05-02Avoid useless ssh in juju_epcCédric Ollivier1-10/+3
scp + ssh calls are replaced by the right scp call. Change-Id: Iac2be63fb380486393af65dda8f7fd80bdd41d5f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2020-04-20Protect password in juju_epcCédric Ollivier1-3/+3
It sometimes fails according to the special chars selected [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-hunter-juju_epc-run/333/console Change-Id: Ie0af3f2fe8d28225296788a8fce73e6d2ec2a304 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-12-02Return result = 0 if failure in juju_epcCédric Ollivier1-0/+1
Else it's falsy successfull [1] [1] https://build.opnfv.org/ci/job/airship-opnfv-functest-vnf-latest-juju_epc-run/42/console Change-Id: Ic9f7c37db998904833c90ae3ee912e9908617abd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-28Remove former timeout -t argsCédric Ollivier1-7/+7
It completes the update to Alpine 3.10. Change-Id: I81793d4d17667b9bbab4b8659ebf90e1f79f3b5e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-07-27Switch to Python 3.7 and Alpine 3.10Cédric Ollivier1-2/+2
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-07-11Reuse same cidr in jujuCédric Ollivier1-1/+1
It seems fine with latest juju updates and eases setting no_proxy rules. Change-Id: I30e66568ec7339fc038b27e5ca47b26959842bf8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-25Set utf-8 in decode and encode callsCédric Ollivier1-20/+21
It eases backporting in iruya and hunter as a few logs can't be decoded as ascii [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-iruya-juju_epc-run/56/console Change-Id: I52a6f9a25130cbf62e8ce3b9972064ab73177665 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-05-24Decode Bytes in logging callsCédric Ollivier1-19/+19
It fixes a few incorrect types in log calls [1]. [1] https://build.opnfv.org/ci/view/functest/job/functest-latest-daily/163/ Change-Id: I01790f6454694f434d31366f9c1cf9d98ff5a9cf Signed-off-by: Cédric Ollivier <ollivier.cedric@gmail.com>
2019-05-13Update to Python3Cédric Ollivier1-1/+2
Functest containers leverage on Python3 instead of python2. https://mail.python.org/pipermail/python-dev/2018-March/152348.html It also updates robotframework librairies to latest release and Vmtp to master ([1] is needed) It patches cloudify rest client to support python3. Vmtp is currently disabled because it currently supports python2 only. [1] https://github.com/openstack/vmtp/commit/a5d062881d91bf4f547d92c6e289bea30feb5d6e#diff-b4ef698db8ca845e5845c4618278f29a Change-Id: I39964a212ec2d4dbf53c9ea7c63f02e0b6a05b48 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-04-20Build arm* functest-vnf containers via travis-ciCédric Ollivier1-0/+6
It doesn't build juju deps if arm* as they can't be cross-compiled. Then that deps won't be built in releng on native arm64 hosts It's worth mentioning that containers have never been executed in OPNFV gates. That change allows running all other VNFs on Raspberry PI and building containers without arm build servers. Change-Id: I836a72f049e7f0e6ae704f5b829914692d5b2c09 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-02-09Increase juju_epc timeoutCédric Ollivier1-1/+1
It fails 4 times in functest-virtual (out of 34) due to a possible slow bandwidth (e.g. [1]). [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-latest-juju_epc-run/24/console Change-Id: Ie1aa69464f8dd0fa1a15900e7d49576368187a44 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-28Wait for apps being active (juju_epc)Cédric Ollivier1-8/+14
It seems that juju-wait doesn't wait for all apps. Juju_epc passes in functest-virtual thanks to that additional tries. Change-Id: I161902c6308cfa6323c21e09140d16e036768ece Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-27Stop using urljoin when adding v3Cédric Ollivier1-3/+1
urljoin works here only if url ends by /. It replaces identity by v3 when running vs devstack. Change-Id: Id896f2b54dfcabadaad1137deef91b1cb07c697d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2019-01-20Force the right external network if jujuCédric Ollivier1-0/+1
It may select a falsy external network [1]. [1] https://build.opnfv.org/ci/job/functest-opnfv-functest-vnf-latest-juju_epc-run/4/console Change-Id: Ic403d0cfb4bc829275617d6b1338311e8e7ea894 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-12-06Remove duplicated code in vnfsCédric Ollivier1-35/+22
It mainly leverages on functest_utils instead of duplicating. Change-Id: I97dc9215a835d3e7f1527b565132f667f09f2b7e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-09-24Update juju agentsCédric Ollivier1-1/+1
It conforms with last juju update. Change-Id: I4941aac66e5ac96045090f10f197f6ee2712caac Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-08-06Change juju_epc cidrCédric Ollivier1-0/+2
juju cannot bootstrap if cidr already exists which now happens only if a shared network with the same cidr is defined (it should be considered as a bug about juju). By allocation its own cidr, it protects vs remaining rally or tempest remaining shared networks or vs parallel testing. juju_epc can already run twice in parallel as it creates a new project and a private network. Change-Id: I76c4971d631f763307315478e6cf5a383c91ed36 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-30Delete alt images before removing the accountCédric Ollivier1-1/+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-30Release floating ips used by juju_epcCédric Ollivier1-0/+6
It also cleans flavor_alt and image_alt. Change-Id: I62296075eca75c3c18caac4a3cddeef1fdb26e1b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-29Update juju_epc to leverage on new scenariosCédric Ollivier1-273/+100
It avoids duplicating codes across all OPNFV testcases. It also fixes the issues when starting mongodb [1] by upgrading juju agent. It stops supporting keystone v2 as the other testcases. [1] https://build.opnfv.org/ci/view/functest/job/functest-compass-baremetal-daily-master/lastFailedBuild/console Change-Id: I06cddddef1121292ffb695dcb73aa79a07c23192 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-20Allow overriding the default roleCédric Ollivier1-0/+7
It allows testing controllers which implements other RBAC policies. Defining NEW_USER_ROLE=admin will easily raise side effects for orchestrators such as Juju and Cloudify. Change-Id: Ia78a25381aeb8aa81fd1872661629e1c08432b8f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-07-10Force region to RegionOne if OS_REGION_NAME is unsetCédric Ollivier1-3/+5
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-07-031) Cleanup floating IPs that are assigned through Juju Deployment.soumaya1-10/+64
2) Add SCTP rule explicitly to the retrieved Security Group. Change-Id: I38e5b1267dbcdcf8e5aadb3c06dd784044e774d4 Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
2018-06-17Fix invalid method names in vnfsCédric Ollivier1-3/+3
Change-Id: Icff1a53ffd7b59d46543b79571b45872a9f243c3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-06-14Support py3 in uncovered packagesCédric Ollivier1-8/+9
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-05-16Merge "Fix UserConfig objects"Cedric Ollivier1-1/+1
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-16Fine-tuning the juju-epc codebase for better error-handlingsoumaya1-33/+68
The changes are mostly basic/cosmetic in nature. - Add some additional info in loggers. - Remove timeout from few commands(such as juju deploy) - Add exception logging for few commands(such as juju bootstrap). - Change rsync to cp for feature file transfer within ABot. Change-Id: Ibeaae17f1c25d04b7830ed42719b70e6c99228cf Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
2018-04-21Add timeouts in juju_epcCédric Ollivier1-11/+19
juju_epc still hangs if OpenStack isn't well deployed [1]. As releng doesn't publish logs if the job is aborted, timeout has to be added mostly everywhere. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-fraser/31/console Change-Id: I0296cd811bda0234aab98f184b3ab247a5b32017 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-19Use timeout to wrap juju-waitCédric Ollivier1-2/+4
It allows getting logs as releng doesn't push them if global timeout. Change-Id: I4bbb3818feff37d29b4ccd586f3e940380feef2e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-18Check app workload in juju_epcCédric Ollivier1-16/+16
It avoids interpreting rsync errors in case of deployment failures. Mysql is still unchecked. Change-Id: I01b4470b86637d0fc322c422f05240a928305158 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-17Get debug data before cleaning juju_epcCédric Ollivier1-0/+6
It could help us to detect the issue when testing Apex (nosdn). It should be only printed on exceptions instead but this proposal is safer and straightforward. Change-Id: I2cccc737e3b3572af72c2653bf32bc02f9ab9077 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-17Set scp debug flag in juju_epcCédric Ollivier1-3/+3
Change-Id: Ic57d05416ac7c8bc459363ea479237101c22f27e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-14Print the stack traceback when cleaning juju_epcCédric Ollivier1-2/+1
Change-Id: If32557a4384cafd67b7c294f8c0592ee2769b1a5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-11Take all cmd status into account in juju_epcCédric Ollivier1-67/+88
It also puts output in functest.log instead of /dev/stdout. Change-Id: I3a4b5f81edd20a529821c5a684b3ab269b7c6796 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-04-11Remove obsolete apex processing in juju_epcCédric Ollivier1-18/+5
It has been useless since [1] was merged [1] https://jira.opnfv.org/browse/APEX-570 Change-Id: Id89b75d8cad9e180a02189450e13fa1e61b1239c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-19Put TestResults.json in the right dirCédric Ollivier1-7/+3
https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/26/console Change-Id: Icfdc0030d517b1885a94c2815aeb35257fdfd590 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-17Mute log in vnfsCédric Ollivier1-18/+22
It also configures the nameserver when creating the subnet in juju_epc. Change-Id: I163ba99cd56f44ca3c3464398e182152b3ab74dd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-16Set project_name arg when creating usersCédric Ollivier1-1/+5
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-13Bypass APEX-570 when publishing image metadataCédric Ollivier1-1/+8
This temporarily fix aims at testing juju_epc vs a non default region name [1]. It must be removed as soon as APEX is fixed [2]. It completes the previous patch which only modified credentials [3]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/lastFailedBuild/console [2] https://jira.opnfv.org/browse/APEX-570 [3] https://gerrit.opnfv.org/gerrit/#/c/53465/ Change-Id: I3e1e64ad7147ee5cdf899eb2500f8b825b818619 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-03-11Bypass APEX-570 to allow gating juju_epcCédric Ollivier1-1/+9
This temporarily fix aims at testing juju_epc vs a non default region name [1]. It must be removed as soon as APEX is fixed [2]. [1] https://build.opnfv.org/ci/view/functest/job/functest-apex-baremetal-daily-master/lastFailedBuild/console [2] https://jira.opnfv.org/browse/APEX-570 Change-Id: I0724b694efb43709d43da6a30e11d1daafee47d8 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-26Add guid in neutron resource names in juju_epcCédric Ollivier1-5/+8
JIRA: FUNCTEST-937 Change-Id: Ia0912dfe2cdbecf4c169aecb6ba1b71774e0a02f Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-22Switch from CONST to CONFCédric Ollivier1-7/+7
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-21Unify security group operationsCédric Ollivier1-7/+7
It updates juju_epc to conform with cloudify_ims and cloudify_vrouter regarding security group operations. Change-Id: I2bc4a16ec17f2836564df82d3ceddd3bc73ece7a Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-21Leverage of snaps creds to get the right region nameCédric Ollivier1-7/+2
Else it gets the defaut value as it's unset in env. Change-Id: Ic2a9cdaed7891fe2723f960782c81c0cbb04e8f0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-15Removed os_utils and fully switched to snapssoumaya1-12/+39
JIRA: FUNCTEST-925 Change-Id: Ibcbf42c34b764fda09d4d49513b261aae296a68b Signed-off-by: soumaya <soumaya.nayek@rebaca.com>