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>'
Пример #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 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
Пример #4
0
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
Пример #5
0
 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)
Пример #6
0
 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()
Пример #8
0
def configclasses():
    """Returns a set of all CONFIG classes.
    """
    return set(immom.getclassnames()) - runtimeclasses()
Пример #9
0
 def do_lsclasses(self, args):
     """List existing classes
     """
     for n in immom.getclassnames():
         print n