def test_prefix_from_pool_vrf(self):

        # Add a VRF
        vrf_attr = {
            'name'          : 'vrf_1',
            'description'   : 'Test VRF #1',
            'rt'            : '123:123'
        }
        vrf = s.add_vrf({ 'auth': ad, 'attr': vrf_attr })

        # Add a pool
        pool_attr = {
            'name'          : 'pool_1',
            'description'   : 'Test pool for from-pool test',
            'default_type'  : 'assignment',
            'ipv4_default_prefix_length' : 24
        }
        pool = s.add_pool({ 'auth': ad, 'attr': pool_attr })

        # Add prefix to pool
        parent_prefix_attr = {
                'prefix': '1.3.0.0/16',
                'vrf_rt': '123:123',
                'type': 'reservation',
                'description': 'FOO',
                'pool_id': pool['id']
            }
        s.add_prefix({ 'auth': ad, 'attr': parent_prefix_attr })

        args = { 'from-pool': { 'name': 'pool_1' },
                'family': 4 }
        prefix_attr = {
                'description': 'BAR'
                }
        expected = {
                'prefix': '1.3.0.0/24',
                'display_prefix': '1.3.0.0/24',
                'description': 'BAR',
                'type': 'assignment',
                'comment': None,
                'country': None,
                'monitor': None,
                'node': None,
                'order_id': None,
                'customer_id': None,
                'pool_id': None,
                'pool_name': None,
                'vrf_id': vrf['id'],
                'vrf_rt': '123:123',
                'vrf_name': 'vrf_1',
                'expires': None,
                'external_key': None,
                'family': 4,
                'indent': 1,
                'alarm_priority': None,
                'authoritative_source': 'nipap',
                'avps': {},
                'vlan': None,
                'inherited_tags': [],
                'tags': [],
                'status': 'assigned'
                }
        child = s.add_prefix({ 'auth': ad, 'attr': prefix_attr, 'args': args })
        expected['id'] = child['id']
        p = s.list_prefix({ 'auth': ad, 'attr': { 'id': child['id'] } })[1]
        p = self._mangle_prefix_result(p)
        self.assertEquals(p, expected)
Declare a function to be called after all data has been loaded.
dataset/ETHPy150Open SpriteLink/NIPAP/tests/xmlrpc.py/NipapXmlTest.test_prefix_from_pool_vrf--crossover with--dataset/ETHPy150Open lsaffre/lino/lino/utils/dpy.py/Migrator.after_load