def test_add_prefix(self):
        schema = {'id': self.schema_attrs['id']}
        # we need a bloody pool first!
        pool = self.nipap.list_pool(self.auth, schema, { 'id': self.pool_attrs['id'] })
        # first make sure our pool exists
        self.assertNotEqual(pool[0], [], 'Pool must exist!')
        pfxs = [
                '10.0.0.0/24',
                '10.0.1.0/24',
                '10.0.2.0/24',
                '10.0.3.0/24',
                '10.0.4.0/24'
                ]
        for p in pfxs:
            prefix_attrs = {
                    'authoritative_source': 'nipap-test',
                    'prefix': p,
                    'type': 'reservation',
                    'description': 'test prefix',
                    'pool_id': self.pool_attrs['id'],
                    'comment': 'test comment, please remove! ;)'
                    }
            self.nipap.add_prefix(self.auth, schema, prefix_attrs)

        # get an address based on from-prefix
        prefix_attrs = {
                'type': 'assignment',
                'authoritative_source': 'nipap-test',
                'description': 'test prefix',
                'comment': 'test comment, please remove! ;)'
                }
        res = self.nipap.add_prefix(self.auth, schema, prefix_attrs, { 'from-prefix': ['10.0.0.0/24'], 'prefix_length': 30 })
        p = self.nipap.list_prefix(self.auth, schema, { 'id': res })
        self.assertEqual(p[0]['prefix'], '10.0.0.0/30', "New prefix differ from what it should be!")

        self.nipap.add_schema(self.auth, { 'name': 'testtest', 'description': 'another test schema!' })
        # pass different schemas in attr and args
        # TODO: Find something similar?
        #self.assertRaises(NipapInputError, self.nipap.add_prefix, schema, { 'authoritative_source': 'nipap-test', 'description': 'tjong' }, { 'from-prefix': ['10.0.0.0/24'], 'prefix_length': 30 })
Test we can delete an existing image stored as SLO, static large object
dataset/ETHPy150Open SpriteLink/NIPAP/tests/nipapbase.py/NipapTest.test_add_prefix--crossover with--dataset/ETHPy150Open openstack/glance_store/glance_store/tests/unit/test_swift_store.py/SwiftTests.test_delete_slo