tempest/scenario/manager.py
def _create_loginable_secgroup_rule_neutron(self, client=None,
                                                secgroup=None):
        """These rules are intended to permit inbound ssh and icmp
        traffic from all sources, so no group_id is provided.
        Setting a group_id would only permit traffic from ports
        belonging to the same security group.
        """

        if client is None:
            client = self.network_client
        rules = []
        rulesets = [
            dict(
                # ssh
                protocol='tcp',
                port_range_min=22,
                port_range_max=22,
            ),
            dict(
                # ping
                protocol='icmp',
            )
        ]
        for ruleset in rulesets:
            for r_direction in ['ingress', 'egress']:
                ruleset['direction'] = r_direction
                try:
                    sg_rule = self._create_security_group_rule(
                        client=client, secgroup=secgroup, **ruleset)
                except exc.NeutronClientException as ex:
                    # if rule already exist - skip rule and continue
                    if not (ex.status_code is 409 and 'Security group rule'
                            ' already exists' in ex.message):
                        raise ex
                else:
                    self.assertEqual(r_direction, sg_rule.direction)
                    rules.append(sg_rule)

        return rules
These rules are intended to permit inbound ssh and icmp
        traffic from all sources, so no group_id is provided.
        Setting a group_id would only permit traffic from ports
        belonging to the same security group.
        
These rules are intended to permit inbound ssh and icmp
traffic from all sources, so no group_id is provided.
Setting a group_id would only permit traffic from ports
belonging to the same security group.
These rules are intended to permit inbound ssh and icmp traffic from all sources so no group_id is provided . Setting a group_id would only permit traffic from ports belonging to the same security group .
def _create_loginable_secgroup_rule_neutron(self, client=None,
                                                secgroup=None):
        if client is None:
            client = self.network_client
        rules = []
        rulesets = [
            dict(
                protocol='tcp',
                port_range_min=22,
                port_range_max=22,
            ),
            dict(
                protocol='icmp',
            )
        ]
        for ruleset in rulesets:
            for r_direction in ['ingress', 'egress']:
                ruleset['direction'] = r_direction
                try:
                    sg_rule = self._create_security_group_rule(
                        client=client, secgroup=secgroup, **ruleset)
                except exc.NeutronClientException as ex:
                    if not (ex.status_code is 409 and 'Security group rule'
                            ' already exists' in ex.message):
                        raise ex
                else:
                    self.assertEqual(r_direction, sg_rule.direction)
                    rules.append(sg_rule)
        return rules
def _create_loginable_secgroup_rule_neutron ( self , client = None , secgroup = None ) : if client is None : client = self . network_client rules = [ ] rulesets = [ dict ( protocol = 'tcp' , port_range_min = 22 , port_range_max = 22 , ) , dict ( protocol = 'icmp' , ) ] for ruleset in rulesets : for r_direction in [ 'ingress' , 'egress' ] : ruleset [ 'direction' ] = r_direction try : sg_rule = self . _create_security_group_rule ( client = client , secgroup = secgroup , ** ruleset ) except exc . NeutronClientException as ex : if not ( ex . status_code is 409 and 'Security group rule' ' already exists' in ex . message ) : raise ex else : self . assertEqual ( r_direction , sg_rule . direction ) rules . append ( sg_rule ) return rules
These rules are intended to permit inbound ssh and icmp
traffic from all sources, so no group_id is provided.
These rules are intended to permit inbound ssh and icmp traffic from all sources so no group_id is provided .
"""These rules are intended to permit inbound ssh and icmp
        traffic from all sources, so no group_id is provided.
        Setting a group_id would only permit traffic from ports
        belonging to the same security group.
        """ # ssh # ping # if rule already exist - skip rule and continue
self
client
secgroup