def _fillWriteTagValues (self, tagValueList):
        self.myInitGuard.isInitOrCrash()
        for logFunc in self._log('fill-write-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList)

        
        if self.hasName():
            valName = Value()
            if self.name is not None:
                valName.setString(self.name)
            else:
                valName.setEmpty()
            tagValueList.push(("name", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valName)
        
        if self.hasDestination():
            valDestination = Value()
            if self.destination is not None:
                valDestination.setString(self.destination)
            else:
                valDestination.setEmpty()
            tagValueList.push(("destination", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valDestination)
        
        if self.hasCommunity():
            valCommunity = Value()
            if self.community is not None:
                valCommunity.setString(self.community)
            else:
                valCommunity.setEmpty()
            tagValueList.push(("community", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valCommunity)
        
        if self.hasVersion():
            valVersion = Value()
            if self.version is not None:
                valVersion.setEnum(self.version.getValue())
            else:
                valVersion.setEmpty()
            tagValueList.push(("version", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valVersion)
        
        if self.hasType_():
            valType_ = Value()
            if self.type_ is not None:
                valType_.setEnum(self.type_.getValue())
            else:
                valType_.setEmpty()
            tagValueList.push(("type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valType_)
        
        if self.hasPort():
            valPort = Value()
            if self.port is not None:
                valPort.setUint16(self.port)
            else:
                valPort.setEmpty()
            tagValueList.push(("port", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valPort)
        

        

        return ReturnCodes.kOk
Example #2
0
    def _fillWriteTagValues(self, tagValueList):
        self.myInitGuard.isInitOrCrash()
        for logFunc in self._log('fill-write-tag-values').debug3Func():
            logFunc('called: tagValueList=%s', tagValueList)

        if self.hasName():
            valName = Value()
            if self.name is not None:
                valName.setString(self.name)
            else:
                valName.setEmpty()
            tagValueList.push(
                ("name",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valName)

        if self.hasDestination():
            valDestination = Value()
            if self.destination is not None:
                valDestination.setString(self.destination)
            else:
                valDestination.setEmpty()
            tagValueList.push(
                ("destination",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valDestination)

        if self.hasCommunity():
            valCommunity = Value()
            if self.community is not None:
                valCommunity.setString(self.community)
            else:
                valCommunity.setEmpty()
            tagValueList.push(
                ("community",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valCommunity)

        if self.hasVersion():
            valVersion = Value()
            if self.version is not None:
                valVersion.setEnum(self.version.getValue())
            else:
                valVersion.setEmpty()
            tagValueList.push(
                ("version",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valVersion)

        if self.hasType_():
            valType_ = Value()
            if self.type_ is not None:
                valType_.setEnum(self.type_.getValue())
            else:
                valType_.setEmpty()
            tagValueList.push(
                ("type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valType_)

        if self.hasPort():
            valPort = Value()
            if self.port is not None:
                valPort.setUint16(self.port)
            else:
                valPort.setEmpty()
            tagValueList.push(
                ("port",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"),
                valPort)

        return ReturnCodes.kOk