def generator(self):
        """Determines bindable address and yields the scenario list
        """
        using_addr = test_suite_utils.get_bindable_ipv4_addr()

        if not using_addr:
            LOGGER.error("Failed to find a suitable IPv4 address.")
            return

        LOGGER.info("Selected ipv4 address: %s" % using_addr)

        yield {'scenarios': [
            {
                'key-args': {
                    'scenario': 'register-noauth-permitted.xml',
                    '-i': using_addr,
                    '-p': '5061',
                    '-s': 'alice'
                }
            },
            {
                'key-args': {
                    'scenario': 'register-noauth-permitted.xml',
                    '-i': using_addr,
                    '-p': '5062',
                    '-s': 'bob', '-t': 't1'
                }
            },
            {
                'key-args': {
                    'scenario': 'register-noauth-denied.xml',
                    '-i': '127.0.0.1',
                    '-p': '5063',
                    '-s': 'charlie'
                }
            },
            {
                'key-args': {
                    'scenario': 'register-noauth-denied.xml',
                    '-i': '127.0.0.1',
                    '-p': '5064',
                    '-s': 'carol', '-t': 't1'
                }
            }
        ]}

        return
Пример #2
0
    def generator(self):
        """Determines bindable address and yields the scenario list
        """
        using_addr = test_suite_utils.get_bindable_ipv4_addr()

        if not using_addr:
            LOGGER.error("Failed to find a suitable IPv4 address.")
            return

        LOGGER.info("Selected ipv4 address: %s" % using_addr)

        yield {
            'scenarios': [{
                'key-args': {
                    'scenario': 'register-noauth-permitted.xml',
                    '-i': using_addr,
                    '-p': '5061',
                    '-s': 'alice'
                }
            }, {
                'key-args': {
                    'scenario': 'register-noauth-permitted.xml',
                    '-i': using_addr,
                    '-p': '5062',
                    '-s': 'bob',
                    '-t': 't1'
                }
            }, {
                'key-args': {
                    'scenario': 'register-noauth-denied.xml',
                    '-i': '127.0.0.1',
                    '-p': '5063',
                    '-s': 'charlie'
                }
            }, {
                'key-args': {
                    'scenario': 'register-noauth-denied.xml',
                    '-i': '127.0.0.1',
                    '-p': '5064',
                    '-s': 'carol',
                    '-t': 't1'
                }
            }]
        }

        return
Пример #3
0
 def depend_ipv4addr(self):
     """Check that an interface has a bindable ipv4 address (not loopback)
     """
     if test_suite_utils.get_bindable_ipv4_addr():
         return True
     return False
Пример #4
0
 def depend_ipv4addr(self):
     """Check that an interface has a bindable ipv4 address (not loopback)
     """
     if test_suite_utils.get_bindable_ipv4_addr():
         return True
     return False