summaryrefslogtreecommitdiffstats
path: root/sfc/lib/openstack_utils.py
AgeCommit message (Collapse)AuthorFilesLines
2018-05-21Improve logging and unify how to read from yamlManuel Buil1-4/+6
vnffgd and vnfd are being parsed in different ways, we should parse them in the same way. We could do it directly with safe_load, however, the returned object is not easy to read. If we use read() instead, the resturned object is easy to read/log. Therefore, this patch combines both options Change-Id: I3416933801569a6f57962cd9906726229923136d Signed-off-by: Manuel Buil <mbuil@suse.com> (cherry picked from commit e122e00cb02adc65870cbb05f394dfc9a0cf55b2)
2018-05-09Add more logs to the codeManuel Buil1-1/+11
It is hard to understand what is going on in the SFC executions Change-Id: I5c9688e68b03c59d6d39290faee8683513a60440 Signed-off-by: Manuel Buil <mbuil@suse.com> (cherry picked from commit 5f8eb6bf01ca3ef240cfcdee297327b21b33f35a)
2018-05-08Bug fix: Use opnfv.logger objectManuel Buil1-11/+3
JIRA: SFC-125 If we don't use the opnfv.logger from functest, logs are not printed when exeucting tests through the functest framework Change-Id: I6d58ff3977fd94221720eea978e0efde07a576a2 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-04-09Update symmetric chain test caseJaime Caamaño Ruiz1-34/+91
Update the symmetric chain test case aligning it with updates available from ODL Oxygen: - ODL networking-sfc implementation now supports symmetric paths. It is no longer needed to configure the ACL or chain directly through the ODL rest api. It can now be fully relied on tacker for this. - ODL networking-sfc implementation now supports different ingress and egress ports for port pairs. The test case exercises this by setting up a VNF with two distinct ports. Note that this requires an updated VNF image that supports two nics and bundles a vxlan_tool capable of using them. Change-Id: Ie711abb93109943dcbf699ece7b2b570500a3711 Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com> (cherry picked from commit 8e85daee26c523cd181f5884858646b7589c50af)
2018-04-03Fix flake8 problemsManuel Buil1-1/+1
There was a bug in releng and pylint was not ran, some issues got merged in master because of that Change-Id: Icf3fa882f4f2b0593fa0b85edce46e49dcc303c9 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-03-22Fix tacker resource collection requestJaime Caamaño Ruiz1-6/+6
Looks like using tacker_client.get to request a resource collection causes connection drops and subsequent requests to fail, probably because of incomplete pagination handling. Use tacker_client.list instead. Change-Id: I79ba39759b61f57774e65b5e49686edb6bf05c13 Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
2018-03-11Remove SNAPs deprecated methodManuel Buil1-4/+3
SNAPs is not supporting get_vm_info() anymore, we should remove it from our lib https://gerrit.opnfv.org/gerrit/#/c/53263/4 Change-Id: Idad1bb60b86c45256bb0a95b6c554e83e6bfae35 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-03-05Update SNAPs usage of libraryManuel Buil1-2/+7
JIRA:SFC-120 Snaps updated two methods which now require more parameters: https://github.com/opnfv/snaps/blob/master/snaps/openstack/utils/heat_utils.py#L260 https://github.com/opnfv/snaps/blob/master/snaps/openstack/create_instance.py#L781 Change-Id: I164c51298afd7b80ee88312f3a09abe7f09282a0 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-03-02Remove glance_utils as we don't use it anymoreManuel Buil1-2/+1
Change-Id: I44d0dd4fdabd38f09e6113c28668f11a40c6ba86 Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-02-28Bug fix: Problem with SNAPs integrationManuel Buil1-4/+10
SNAPs changed the API: https://github.com/opnfv/snaps/commit/c711acf8ae3e4ad6f746500747857bcc9fd6f7be#diff-0b922a3e087121238d5a8b08ef5b894aR480 Now we require to pass keystone client to get the neutron port Change-Id: I93fa4b127255c1a078aa3644773b7c8b886cea6d Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-02-22Switch from CONST to CONFCédric Ollivier1-3/+3
CONST is not the right Functest object to get config data. It also updates the way to get constants as proposed by Functest [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/52389/ Depends-On: Ie23c0ef90efc839d60f0f3a9754c58746b1f3a00 Change-Id: I6cfa832466dcefd737314633d807512e46267a69 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-21Switch to os.environ for getting OpenStack env varsCédric Ollivier1-4/+4
CONST shouldn't be selected to get env vars. Now it may raise KeyErrors if env is not well configured. Change-Id: I5e3f525640809778c5349fdc1c3796227894d0cd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-02-21Take into account last Functest config updatesCédric Ollivier1-2/+2
It follows the next changes (Functest) which renamed the related config entry [1]. [1] https://gerrit.opnfv.org/gerrit/#/c/51283/5/functest/ci/config_functest.yaml Change-Id: Ieae5baff13bb70aa35b01c2358ab4865cdb9dfb0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2018-01-29Fix problem to fetch the compute name of client VMManuel Buil1-2/+9
When migrating to SNAPs a bug was introduced and could be seen in logs as: Error when waiting for classification rules: 'module' object has no attribute 'get_compute_client' The cause is that get_compute_client is not a global function anymore but a method inside a class. Besides, due to SNAPs, we need to fetch the compute name in another way Change-Id: I32007c83894281ba9514a121b7939b5bfe52f4bc Signed-off-by: Manuel Buil <mbuil@suse.com>
2018-01-26Fix cleanup functionManuel Buil1-0/+1
A floating ip remains when executing the clean up function. That floating ip belongs to the Tacker VNF and thus we should add that creator to the list Change-Id: Ic15574bf93f30a26f81a4944d742307dda4bfe6d Signed-off-by: Manuel Buil <mbuil@suse.com>
2017-12-21Migrate to SNAPs openstack libraryManuel Buil1-176/+187
Functest is deprecating its openstack library which we were using extensively We need then to move to an alternative and the best appears to be SNAPs Change-Id: Icaa0b9f1ec580545b9d0faa88be2080a310deaf7 Signed-off-by: Manuel Buil<mbuil@suse.com>
2017-12-12Clean up our utils.pyManuel Buil1-0/+616
Utils.py was getting messy. This patch divides it into three different files: * test_utils.py * odl_utils.py * openstack_utils.py The tacker library is integrated into openstack_utils.py Change-Id: I310949d1cee49b6aa1c9b3396bf6d6ca458cbaac Signed-off-by: Manuel Buil <mbuil@suse.com>