aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/vnf/epc/juju_epc.py
AgeCommit message (Collapse)AuthorFilesLines
2018-09-25Update 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> (cherry picked from commit 1ab7a53dab08a6f67ff2cf54f33b70dea0e82bfb)
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>
2018-02-09Conform with OpenStackUser.get_os_creds() in juju_epcCédric Ollivier1-8/+4
UserSettings are not linked to any project then abot has to be passed as arg when calling get_os_creds. Else it returns the project registered in credentials instead of the one created by this testcase. Change-Id: Ia0658cc9af155df06de3d14e21e5288dad6367f9 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-07Remove dns server from juju_epc configCédric Ollivier1-4/+1
The dns server shoud be set by the Cloud provider via Neutron configs. Snaps is currently enforcing 8.8.8.8 as default too. Change-Id: I3e9a25d8bbfbab4cd1d44e394235b329df86e82e Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-03Fix JujuEpc prepare() and deploy_orchestrator()Cédric Ollivier1-173/+177
It bypasses a known unfixed Juju bug [1] by creating a second '_member_' user [1]. An 'admin' user is still required to create flavors and by snaps when listing virtual machines. It highlights a possible bug in user_creator.get_os_creds(). It partially rewrites the testcase by cleaning instance attributes and by taking several os.system() returns into account. It sets the new password automatically generated [2] and starts switching from openstack utils to snaps in vEPC. This patchset must be completed by unit tests and by another patch fully switching to snaps in the last methods. It should be noted that the testcase sets 8.8.8.8 as dns server which could raise side effects. [1] https://bugs.launchpad.net/juju/+bug/1710848 [2] https://gerrit.opnfv.org/gerrit/#/c/50747/ Change-Id: Id18b4b185aa1825196e91f6692338169f51faea8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-02Stop setting ext net in configCédric Ollivier1-3/+1
It simply relies on the related env var as expected. Change-Id: Ibbb1a2ab2cccdff8cafe6f409af383a24778b1f5 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-01Install vEPC dependencies in DockerfileCédric Ollivier1-17/+0
It also cleans sources and packages. Change-Id: Ie3a1a836c27af295b93386e8df63c0ae5accde84 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-30Removal of deprecated SNAPS-OO classes in juju_epcCédric Ollivier1-28/+21
It completes the first commit about that topic [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/47617/ Change-Id: I1a55b45f0535ae98681546d4d24bb424cf892aa8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-30Remove duplicated code related to snaps credsJuha Kosonen1-4/+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-29Enable epc unit testsCédric Ollivier1-2/+3
It adds the missing __init__.py to activate vepc unit tests. They are disabled because they are currently false (otherwise it would block next changes). Change-Id: I65b32490efde4cc8f6b3d9e6ee19257dcf02c2dd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-23Dynamic region name of juju cloudsoumaya1-9/+14
Region name in juju cloud has been made dynamic now, region name will be added in cloud file from os environment variable. It fixes the issues when runnit juju_epc vs Apex [1]. It also updates ubuntu images to xenial. [1] https://build.opnfv.org/ci/job/functest-apex-baremetal-daily-master/628/console Change-Id: I9422af3086141cd40b99e6482883a7081f58c2ea Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
2017-12-16Enforce a versioned public identity endpointCédric Ollivier1-12/+21
juju simply adds /auth/tokens to the public identity endpoint wich fails vs an unversioned endpoint as currently advised. It enforces a versioned endpoint till juju implements the right discovery. It may be improved to detect the right API version instead of forcing v3. But v2 is hugely deprecated and no longer used by all OPNFV installers. It also fixes errors/warnings listed by pylint. Change-Id: I6e8ba4b2122c19629426530d2d34e51e1bc609ba Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2017-12-13Change the name of flavor and disabled ssh-hostname verification.soumaya1-4/+10
Change-Id: Ia801e8a37288606a325b5dd010ab9f6acbfdadf4 Signed-off-by: soumaya <soumaya.nayek@rebaca.com>
2017-12-11vEPC tests with juju as an VNF managersoumaya1-0/+502
juju_epc testcase validate EPC setup with the help of ABoT which acting as test executor. Functest-abot-epc-bundle deploys OAI charms alongwith mysql and ABoT. JUJU is acting as a VNF manager. Change-Id: I45d7b37f21f6b8c7049ab2bf42a4678e30b67a72 Signed-off-by: soumaya <soumaya.nayek@rebaca.com>