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 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 runtimeclasses():
    """Returns a set of all RUNTIME classes.
    """
    rtset = set()
    for cn in immom.getclassnames():
        (c, a) = immom.getclass(cn)
        if c == 'RUNTIME':
            rtset.add(cn)
    return rtset
def runtimeclasses():
    """Returns a set of all RUNTIME classes.
    """
    rtset = set()
    for cn in immom.getclassnames():
        (c,a) = immom.getclass(cn)
        if c == 'RUNTIME':
            rtset.add(cn)
    return rtset
 def test0050_Class(self):
     # Clean-up
     testclass = 'TestClassBasic'
     try:
         immom.deleteclass(testclass)
     except:
         pass
     classes = immom.getclassnames()
     self.assertTrue(classes)
     self.assertTrue('SaImmMngt' in classes)
     attrs = [('TestClassBasicId', 'SANAMET', ['CONFIG', 'RDN'], [])]
     immom.createclass(testclass, 'CONFIG', attrs)
     classes = immom.getclassnames()
     self.assertTrue(testclass in classes)
     self.assertRaises(immom.AisException, immom.createclass, testclass,
                       'CONFIG', attrs)
     immom.deleteclass(testclass)
     self.assertRaises(immom.AisException, immom.deleteclass, testclass)
 def test0050_Class(self):
     # Clean-up
     testclass = 'TestClassBasic'
     try:
         immom.deleteclass(testclass)
     except:
         pass
     classes = immom.getclassnames()
     self.assertTrue(classes)
     self.assertTrue('SaImmMngt' in classes)
     attrs = [('TestClassBasicId', 'SANAMET', [ 'CONFIG', 'RDN' ], [])]
     immom.createclass(testclass, 'CONFIG', attrs)
     classes = immom.getclassnames()
     self.assertTrue(testclass in classes)
     self.assertRaises(immom.AisException, 
                       immom.createclass, testclass, 'CONFIG', attrs)
     immom.deleteclass(testclass)
     self.assertRaises(immom.AisException,
                       immom.deleteclass, testclass)
def configclasses():
    """Returns a set of all CONFIG classes.
    """
    return set(immom.getclassnames()) - runtimeclasses()
def configclasses():
    """Returns a set of all CONFIG classes.
    """
    return set(immom.getclassnames()) - runtimeclasses()
 def do_lsclasses(self, args):
     """List existing classes
     """
     for n in immom.getclassnames():
         print n