def immdump():
    print '<?xml version="1.0"?>'
    print '<imm:IMM-contents>'
    for c in immom.getclassnames():
        immom.dumpclass(c)
    for o in immom.getsubtree(''):
        immom.dumpobj(o)
    print '</imm:IMM-contents>'
Exemplo n.º 2
0
def immdump():
    print '<?xml version="1.0"?>'
    print '<imm:IMM-contents>'
    for c in immom.getclassnames():
        immom.dumpclass(c)
    for o in immom.getsubtree(''):
        immom.dumpobj(o)
    print '</imm:IMM-contents>'
def getimplementers():
    """Returns a list of all active implmenters.
    """
    implementers = []
    for dn in immom.getsubtree(''):
        i = getimplementer(dn)
        if i and not i in implementers:
            implementers.append(i)
    return implementers
Exemplo n.º 4
0
def getimplementers():
    """Returns a list of all active implmenters.
    """
    implementers = []
    for dn in immom.getsubtree(''):
        i = getimplementer(dn)
        if i and not i in implementers:
            implementers.append(i)
    return implementers
Exemplo n.º 5
0
    def test0020_ObjectTree(self):
        immom.ccb_initialize()
        immom.createobject(self.topobject, 'TestClass', [])
        for n in xrange(1,5):
            dn = "TestClassId=%d,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        immom.ccb_apply()
        immom.ccb_finalize()
        c = immom.getchildobjects(self.topobject)
        self.assertEqual(
            c, [
            'TestClassId=1,TestClassId=1',
            'TestClassId=2,TestClassId=1',
            'TestClassId=3,TestClassId=1',
            'TestClassId=4,TestClassId=1'
            ])

        immom.ccb_initialize()
        for n in xrange(30,35):
            dn = "TestClassId=%d,TestClassId=3,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        for n in xrange(20,23):
            dn = "TestClassId=%d,TestClassId=2,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        immom.ccb_apply()
        immom.ccb_finalize()

        c = immom.getsubtree(self.topobject)
        self.assertEqual(
            c, [
            'TestClassId=1,TestClassId=1',
            'TestClassId=2,TestClassId=1',
            'TestClassId=3,TestClassId=1',
            'TestClassId=4,TestClassId=1',
            'TestClassId=20,TestClassId=2,TestClassId=1',
            'TestClassId=21,TestClassId=2,TestClassId=1',
            'TestClassId=22,TestClassId=2,TestClassId=1',
            'TestClassId=30,TestClassId=3,TestClassId=1',
            'TestClassId=31,TestClassId=3,TestClassId=1',
            'TestClassId=32,TestClassId=3,TestClassId=1',
            'TestClassId=33,TestClassId=3,TestClassId=1',
            'TestClassId=34,TestClassId=3,TestClassId=1'
            ])

        immom.ccb_initialize()
        immom.deletesubtree(self.topobject)
        immom.getobject(self.topobject)
        immom.ccb_apply()
        immom.ccb_finalize()
        self.assertRaises(immom.AisException,
                          immom.getobject, self.topobject)
Exemplo n.º 6
0
    def test0020_ObjectTree(self):
        immom.ccb_initialize()
        immom.createobject(self.topobject, 'TestClass', [])
        for n in xrange(1, 5):
            dn = "TestClassId=%d,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        immom.ccb_apply()
        immom.ccb_finalize()
        c = immom.getchildobjects(self.topobject)
        self.assertEqual(c, [
            'TestClassId=1,TestClassId=1', 'TestClassId=2,TestClassId=1',
            'TestClassId=3,TestClassId=1', 'TestClassId=4,TestClassId=1'
        ])

        immom.ccb_initialize()
        for n in xrange(30, 35):
            dn = "TestClassId=%d,TestClassId=3,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        for n in xrange(20, 23):
            dn = "TestClassId=%d,TestClassId=2,%s" % (n, self.topobject)
            immom.createobject(dn, 'TestClass', [])
        immom.ccb_apply()
        immom.ccb_finalize()

        c = immom.getsubtree(self.topobject)
        self.assertEqual(c, [
            'TestClassId=1,TestClassId=1', 'TestClassId=2,TestClassId=1',
            'TestClassId=3,TestClassId=1', 'TestClassId=4,TestClassId=1',
            'TestClassId=20,TestClassId=2,TestClassId=1',
            'TestClassId=21,TestClassId=2,TestClassId=1',
            'TestClassId=22,TestClassId=2,TestClassId=1',
            'TestClassId=30,TestClassId=3,TestClassId=1',
            'TestClassId=31,TestClassId=3,TestClassId=1',
            'TestClassId=32,TestClassId=3,TestClassId=1',
            'TestClassId=33,TestClassId=3,TestClassId=1',
            'TestClassId=34,TestClassId=3,TestClassId=1'
        ])

        immom.ccb_initialize()
        immom.deletesubtree(self.topobject)
        immom.getobject(self.topobject)
        immom.ccb_apply()
        immom.ccb_finalize()
        self.assertRaises(immom.AisException, immom.getobject, self.topobject)