bugfix: get_security_group_by_id always return first element 83/34883/2
authorMorgan Richomme <morgan.richomme@orange.com>
Wed, 17 May 2017 08:29:20 +0000 (10:29 +0200)
committerspisarski <s.pisarski@cablelabs.com>
Wed, 17 May 2017 15:51:05 +0000 (09:51 -0600)
commit956acc7da293b931c3e21e64fa0a9011f995c11c
treefdc3690743dfebb92f185a5481531f8fe2399858
parent10c665d7c831cf198ac9e675654693860e602bf9
bugfix: get_security_group_by_id always return first element

add check on id before return value
fixed kwarg into the neutron.list_security_groups to the correct one 'id'
added unit test to ensure this function always works as designed

JIRA: SNAPS-82

Change-Id: I965e1dd54fd1efa8c2d7f6efb87c78ab24cca0e5
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
snaps/openstack/utils/neutron_utils.py
snaps/openstack/utils/tests/neutron_utils_tests.py