Check a rule existence for a specific security group 27/32527/1
authortomsou <soth@intracom-telecom.com>
Mon, 27 Mar 2017 15:56:02 +0000 (15:56 +0000)
committerJose Lausuch <jose.lausuch@ericsson.com>
Thu, 30 Mar 2017 14:51:05 +0000 (14:51 +0000)
commitb01c75fdc203cf9e4606de8455dfc37d6eaddea8
tree32c0b67fde31572c977fa363cd2b2aa8b0bf2154
parent9043013decb7211fd274aeaffd098b1d421133b7
Check a rule existence for a specific security group

    Implement a functionality to check if a rule concerning
    a specific security group exists
    - function get_security_group_rules(neutron_client, sg_id)
      returns the list of the security rules for a specific security group
    - function check_security_group_rules(neutron_client,
                                          sg_id, direction,
                                          protocol,
                                          port_min=None,
                                          port_max=None)
      checks if a specific rule for a specific security group exists
      and returns True or False
    - implement unit tests for the two new functions

     This new functionality is needed for sdnvpn project

Change-Id: Ib930bc9a76141932f4164d88e2640b49f3df4d77
Signed-off-by: tomsou <soth@intracom-telecom.com>
(cherry picked from commit 41b103d9a6804a97ca85e2b09b628cea06219faf)
functest/tests/unit/utils/test_openstack_utils.py
functest/utils/openstack_utils.py