def _create_ports_and_sgroups(self):
    sg_1 = ovsfw.SecurityGroup(1)
    sg_2 = ovsfw.SecurityGroup(2)
    sg_3 = ovsfw.SecurityGroup(3)
    port_a = create_ofport({'device': 'a'})
    port_b = create_ofport({'device': 'b'})
    self.map.ports = {'a': port_a, 'b': port_b}
    self.map.sec_groups = {1: sg_1, 2: sg_2, 3: sg_3}
    port_a.sec_groups = [sg_1, sg_2]
    port_b.sec_groups = [sg_2, sg_3]
    sg_1.ports = {port_a}
    sg_2.ports = {port_a, port_b}
    sg_3.ports = {port_b}
def _create_ports_and_sgroups(self):
    sg_1 = ovsfw.SecurityGroup(1)
    sg_2 = ovsfw.SecurityGroup(2)
    sg_3 = ovsfw.SecurityGroup(3)
    port_a = create_ofport({'device': 'a'})
    port_b = create_ofport({'device': 'b'})
    self.map.ports = {'a': port_a, 'b': port_b}
    self.map.sec_groups = {1: sg_1, 2: sg_2, 3: sg_3}
    port_a.sec_groups = [sg_1, sg_2]
    port_b.sec_groups = [sg_2, sg_3]
    sg_1.ports = {port_a}
    sg_2.ports = {port_a, port_b}
    sg_3.ports = {port_b}