Exemple #1
0
    def __init__(self, xmlNode, name=None, cardinalityMin=None, cardinalityMax=None, description=None, typeParameter=None, genericParameter=None):
        self.listOptionItemList = []

        if xmlNode==None:
            self.name = name
            self.cardinalityMin = cardinalityMin
            self.cardinalityMax = cardinalityMax
            self.description = description
            self.typeParameter = typeParameter
            self.genericParameter = genericParameter
        else:
            self.name = xmlNode.attributes['name'].value
            self.cardinalityMin = xmlNode.attributes['cardinalityMin'].value
            self.cardinalityMax = xmlNode.attributes['cardinalityMax'].value
            self.genericParameter = xmlNode.attributes['guid'].value
            try:
                self.description = xmlNode.attributes['description'].value
                self.typeParameter = xmlNode.attributes['typeParameter'].value
            except:
                self.description = ""
                self.typeParameter = ""

            #load list option items
            allListOptionItems = xmlNode.getElementsByTagName('ListOptionItem')
            for node in allListOptionItems:
                listOptionItem = ListOptionItem(node)
                self.addListOptionItem(listOptionItem)

        from IOSReference import printLog
        printLog("Created "+self.__str__())
Exemple #2
0
    def __init__(self, xmlNode, cardinalityMin=None, cardinalityMax=None):
        self.atomicTermList = []

        if xmlNode==None:
            self.cardinalityMin = cardinalityMin
            self.cardinalityMax = cardinalityMax
        else:
            self.cardinalityMin = xmlNode.attributes['cardinalityMin'].value
            self.cardinalityMax = xmlNode.attributes['cardinalityMax'].value
            #load atomic terms
            allAtomicTerms = xmlNode.childNodes
            for node in allAtomicTerms:
                if node.nodeType != node.ELEMENT_NODE:
                    continue
                atomicTerm = None
                if node.tagName=="CiscoKeyword":
                    atomicTerm = CiscoKeyword(node)
                if node.tagName=="CiscoParameter":
                    atomicTerm = CiscoParameter(node)
                if node.tagName=="TermOrTerm":
                    atomicTerm = TermOrTerm(node)
                if atomicTerm!=None:
                    self.addAtomicTerm(atomicTerm)

        from IOSReference import printLog
        printLog("Created "+self.__str__())
    def __init__(self, xmlNode, uid=None, genericName=None):
        self.ciscoCommandsVersionList = []
        self.genericParameterList = []
        self.auxiliarCommandList = []

        if xmlNode==None:
            self.uid = uid
            self.genericName = genericName
        else:
            self.uid = xmlNode.attributes['uid'].value
            self.genericName = xmlNode.attributes['genericName'].value
            #load generic parameters
            allGenericParameters = xmlNode.getElementsByTagName('GenericParameter')
            for node in allGenericParameters:
                genericParameter = GenericParameter(node)
                self.addGenericParameter(genericParameter)
            #load cisco commands version
            allCiscoCommandsVersion = xmlNode.getElementsByTagName('CiscoCommandsVersion')
            for node in allCiscoCommandsVersion:
                ciscoCommandsVersion = CiscoCommandsVersion(node)
                self.addCiscoCommandsVersion(ciscoCommandsVersion)
            #load auxiliar commands
            allAuxiliarCommands = xmlNode.getElementsByTagName('AuxiliarCommand')
            for node in allAuxiliarCommands:
                auxiliarCommand = AuxiliarCommand(node)
                self.addAuxiliarCommand(auxiliarCommand)

        from IOSReference import printLog
        printLog("Created "+self.__str__())
Exemple #4
0
    def __init__(self, xmlNode, value=None):
        if xmlNode==None:
            self.value = value
        else:
            self.value = xmlNode.nodeValue

        from IOSReference import printLog
        printLog("Created "+self.__str__())
Exemple #5
0
    def __init__(self, xmlNode, word=None):
        if xmlNode==None:
            self.word = word
        else:
            self.word = xmlNode.attributes['word'].value

        from IOSReference import printLog
        printLog("Created "+self.__str__())
    def __init__(self, xmlNode, uid=None, name=None):
        if xmlNode==None:
            self.name = name
            self.uid = uid
        else:
            self.uid = xmlNode.attributes['uid'].value
            self.name = xmlNode.attributes['name'].value

        from IOSReference import printLog
        printLog("Created "+self.__str__())
Exemple #7
0
    def __init__(self, xmlNode):
        self.syntaxTermList = []

        if xmlNode!=None:
            #load syntax terms (separated by a "or")
            allSsyntaxTerm = xmlNode.getElementsByTagName('SyntaxTerm')
            for node in allSsyntaxTerm:
                syntaxTerm = SyntaxTerm(node)
                self.addSyntaxTerm(syntaxTerm)

        from IOSReference import printLog
        printLog("Created "+self.__str__())
    def __init__(self, xmlNode, versionMin=None, versionMax=None, genericCommandNeeded=None):
        if xmlNode==None:
            self.versionMin = versionMin
            self.versionMax = versionMax
            self.genericCommandNeeded = genericCommandNeeded
        else:
            self.versionMin = xmlNode.attributes['versionMin'].value
            self.versionMax = xmlNode.attributes['versionMax'].value
            self.genericCommandNeeded = xmlNode.attributes['guid'].value

        from IOSReference import printLog
        printLog("Created "+self.__str__())
    def __init__(self, xmlNode, negatable=None):
        self.syntaxTermList = []
        if xmlNode==None:
            self.negatable = negatable
        else:
            self.negatable = xmlNode.attributes['negatable'].value
            #load syntax terms
            allSyntaxTerms = xmlNode.getElementsByTagName('SyntaxTerm')
            for node in allSyntaxTerms:
                syntaxTerm = SyntaxTerm(node)
                self.addSyntaxTerm(syntaxTerm)

        from IOSReference import printLog
        printLog("Created "+self.__str__())
    def __init__(self, xmlNode, versionMin=None, versionMax=None, deviceType=None):
        self.ciscoSyntaxList = []

        if xmlNode==None:
            self.versionMin = versionMin
            self.versionMax = versionMax
            self.deviceType = deviceType
        else:
            self.versionMin = xmlNode.attributes['versionMin'].value
            self.versionMax = xmlNode.attributes['versionMax'].value
            self.deviceType = xmlNode.attributes['deviceType'].value
            #load cisco syntaxes
            allCiscoSyntaxes = xmlNode.getElementsByTagName('CiscoSyntax')
            for node in allCiscoSyntaxes:
                ciscoSyntax = CiscoSyntax(node)
                self.addCiscoSyntax(ciscoSyntax)

        from IOSReference import printLog
        printLog("Created "+self.__str__())