Example #1
0
 def depend_ipv6addr(self):
     """Check that an interface has a bindable ipv6 address (not loopback,
        not link-local)
     """
     if test_suite_utils.get_bindable_ipv6_addr():
         return True
     return False
Example #2
0
 def depend_ipv6addr(self):
     """Check that an interface has a bindable ipv6 address (not loopback,
        not link-local)
     """
     if test_suite_utils.get_bindable_ipv6_addr():
         return True
     return False
    def generator(self):
        """Determines bindable address and yields the scenario list
        """
        using_addr = test_suite_utils.get_bindable_ipv6_addr()

        if not using_addr:
            LOGGER.error("Failed to find a usable address for the test.")
            return

        using_addr = "[%s]" % using_addr

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

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

        return
Example #4
0
    def generator(self):
        """Determines bindable address and yields the scenario list
        """
        using_addr = test_suite_utils.get_bindable_ipv6_addr()

        if not using_addr:
            LOGGER.error("Failed to find a usable address for the test.")
            return

        using_addr = "[%s]" % using_addr

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

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

        return