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

        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled)
        
        if self.hasCid():
            valCid = Value()
            if self.cid is not None:
                valCid.setString(self.cid)
            else:
                valCid.setEmpty()
            tagValueList.push(("cid", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valCid)
        

        

        return ReturnCodes.kOk
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isEnabledRequested() and operData.hasEnabled():
            val = Value()
            val.setBool(operData.enabled)
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
Example #3
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system"), valEnabled)
        

        
        if self.nameServersObj:
            valBegin = Value()
            (tag, ns, prefix) = ("name-servers" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system", "qt-sys")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.nameServersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-name-servers-failed').errorFunc(): logFunc('nameServersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.searchListObj:
            valBegin = Value()
            (tag, ns, prefix) = ("search" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system", "qt-sys")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.searchListObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-search-failed').errorFunc(): logFunc('searchListObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasDummy():
            valDummy = Value()
            if self.dummy is not None:
                valDummy.setBool(self.dummy)
            else:
                valDummy.setEmpty()
            tagValueList.push(("dummy", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log"), valDummy)
        

        
        if self.thresholdsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("thresholds" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log", "qt-log")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.thresholdsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-thresholds-failed').errorFunc(): logFunc('thresholdsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.countersObj:
            valBegin = Value()
            (tag, ns, prefix) = ("counters" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log", "qt-log")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.countersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-counters-failed').errorFunc(): logFunc('countersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #5
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.hasColor():
            valColor = Value()
            if self.color is not None:
                valColor.setString(self.color)
            else:
                valColor.setEmpty()
            tagValueList.push(("color", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"), valColor)
        
        if self.hasPretty():
            valPretty = Value()
            if self.pretty is not None:
                valPretty.setBool(self.pretty)
            else:
                valPretty.setEmpty()
            tagValueList.push(("pretty", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"), valPretty)
        
        if self.hasNumOfLegs():
            valNumOfLegs = Value()
            if self.numOfLegs is not None:
                valNumOfLegs.setInt64(self.numOfLegs)
            else:
                valNumOfLegs.setEmpty()
            tagValueList.push(("num-of-legs", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"), valNumOfLegs)
        

        
        if self.statusObj:
            valBegin = Value()
            (tag, ns, prefix) = ("status" , "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example", "se")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.statusObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-status-failed').errorFunc(): logFunc('statusObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), valEnabled)
        
        if self.hasRaiseTestAlarm():
            valRaiseTestAlarm = Value()
            if self.raiseTestAlarm is not None:
                valRaiseTestAlarm.setBool(self.raiseTestAlarm)
            else:
                valRaiseTestAlarm.setEmpty()
            tagValueList.push(("raise-test-alarm", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), valRaiseTestAlarm)
        
        if self.hasPollInterval():
            valPollInterval = Value()
            if self.pollInterval is not None:
                valPollInterval.setInt64(self.pollInterval)
            else:
                valPollInterval.setEmpty()
            tagValueList.push(("poll-interval", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), valPollInterval)
        

        
        if self.thresholdsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("thresholds" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms", "qt-sys-alarms")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.thresholdsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-thresholds-failed').errorFunc(): logFunc('thresholdsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        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-content-line"), valType_)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled)
        
        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-content-line"), valName)
        

        
        if self.systemDefaultsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("system-defaults" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line", "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.systemDefaultsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-system-defaults-failed').errorFunc(): logFunc('systemDefaultsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasMaxActiveConnections():
            valMaxActiveConnections = Value()
            if self.maxActiveConnections is not None:
                valMaxActiveConnections.setInt64(self.maxActiveConnections)
            else:
                valMaxActiveConnections.setEmpty()
            tagValueList.push(("max-active-connections", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valMaxActiveConnections)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled)
        
        if self.hasMaxRedirectRate():
            valMaxRedirectRate = Value()
            if self.maxRedirectRate is not None:
                valMaxRedirectRate.setInt64(self.maxRedirectRate)
            else:
                valMaxRedirectRate.setEmpty()
            tagValueList.push(("max-redirect-rate", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valMaxRedirectRate)
        

        
        if self.blockerObj:
            valBegin = Value()
            (tag, ns, prefix) = ("blocker" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line", "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.blockerObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-blocker-failed').errorFunc(): logFunc('blockerObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isCountRequested() and operData.hasCount():
            val = Value()
            val.setInt64(operData.count)
            tagValueList.push(("count", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), val)
        
        if operData.isTemperatureWarningRequested() and operData.hasTemperatureWarning():
            val = Value()
            val.setBool(operData.temperatureWarning)
            tagValueList.push(("temperature-warning", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), val)
        
        if operData.isTemperatureCriticalRequested() and operData.hasTemperatureCritical():
            val = Value()
            val.setBool(operData.temperatureCritical)
            tagValueList.push(("temperature-critical", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), val)
        
        if operData.isTemperatureCriticalReasonRequested() and operData.hasTemperatureCriticalReason():
            val = Value()
            val.setEnum(operData.temperatureCriticalReason.getValue())
            tagValueList.push(("temperature-critical-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), val)
        
        if operData.isTemperatureWarningReasonRequested() and operData.hasTemperatureWarningReason():
            val = Value()
            val.setEnum(operData.temperatureWarningReason.getValue())
            tagValueList.push(("temperature-warning-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isLocalTimeStringRequested() and operData.hasLocalTimeString():
            val = Value()
            val.setString(operData.localTimeString)
            tagValueList.push(("local-time-string", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), val)
        
        if operData.isUtcTimeStringRequested() and operData.hasUtcTimeString():
            val = Value()
            val.setString(operData.utcTimeString)
            tagValueList.push(("utc-time-string", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), val)
        
        if operData.isDaylightSavingTimeRequested() and operData.hasDaylightSavingTime():
            val = Value()
            val.setBool(operData.daylightSavingTime)
            tagValueList.push(("daylight-saving-time", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), val)
        
        if operData.isEpochRequested() and operData.hasEpoch():
            val = Value()
            val.setInt64(operData.epoch)
            tagValueList.push(("epoch", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), val)
        
        if operData.isUtcOffsetMinutesRequested() and operData.hasUtcOffsetMinutes():
            val = Value()
            val.setInt64(operData.utcOffsetMinutes)
            tagValueList.push(("utc-offset-minutes", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
    def _fillWriteTagValues (self, tagValueList):
        self.myInitGuard.isInitOrCrash()
        for logFunc in self._log('fill-write-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList)

        
        if self.hasEstimatedDeliveryTrxPerConnection():
            valEstimatedDeliveryTrxPerConnection = Value()
            if self.estimatedDeliveryTrxPerConnection is not None:
                valEstimatedDeliveryTrxPerConnection.setInt64(self.estimatedDeliveryTrxPerConnection)
            else:
                valEstimatedDeliveryTrxPerConnection.setEmpty()
            tagValueList.push(("estimated-delivery-trx-per-connection", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEstimatedDeliveryTrxPerConnection)
        
        if self.hasSimulatedDiskSizeGb():
            valSimulatedDiskSizeGb = Value()
            if self.simulatedDiskSizeGb is not None:
                valSimulatedDiskSizeGb.setInt64(self.simulatedDiskSizeGb)
            else:
                valSimulatedDiskSizeGb.setEmpty()
            tagValueList.push(("simulated-disk-size-gb", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valSimulatedDiskSizeGb)
        
        if self.hasDeliveryMaxActiveConnections():
            valDeliveryMaxActiveConnections = Value()
            if self.deliveryMaxActiveConnections is not None:
                valDeliveryMaxActiveConnections.setInt64(self.deliveryMaxActiveConnections)
            else:
                valDeliveryMaxActiveConnections.setEmpty()
            tagValueList.push(("delivery-max-active-connections", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valDeliveryMaxActiveConnections)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled)
        
        if self.hasDeliveryMaxBwMbps():
            valDeliveryMaxBwMbps = Value()
            if self.deliveryMaxBwMbps is not None:
                valDeliveryMaxBwMbps.setInt64(self.deliveryMaxBwMbps)
            else:
                valDeliveryMaxBwMbps.setEmpty()
            tagValueList.push(("delivery-max-bw-mbps", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valDeliveryMaxBwMbps)
        

        

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

        
        if self.hasOsDevice():
            valOsDevice = Value()
            if self.osDevice is not None:
                valOsDevice.setString(self.osDevice)
            else:
                valOsDevice.setEmpty()
            tagValueList.push(("os-device", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valOsDevice)
        
        if self.hasImplementation():
            valImplementation = Value()
            if self.implementation is not None:
                valImplementation.setEnum(self.implementation.getValue())
            else:
                valImplementation.setEmpty()
            tagValueList.push(("implementation", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valImplementation)
        
        if self.hasRaidType():
            valRaidType = Value()
            if self.raidType is not None:
                valRaidType.setEnum(self.raidType.getValue())
            else:
                valRaidType.setEmpty()
            tagValueList.push(("raid-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valRaidType)
        
        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-storage-disk"), valName)
        
        if self.hasAutoInit():
            valAutoInit = Value()
            if self.autoInit is not None:
                valAutoInit.setBool(self.autoInit)
            else:
                valAutoInit.setEmpty()
            tagValueList.push(("auto-init", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valAutoInit)
        

        

        return ReturnCodes.kOk
Example #13
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.hasExecutable():
            valExecutable = Value()
            if self.executable is not None:
                valExecutable.setString(self.executable)
            else:
                valExecutable.setEmpty()
            tagValueList.push(("executable", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valExecutable)
        
        if self.hasShell():
            valShell = Value()
            if self.shell is not None:
                valShell.setBool(self.shell)
            else:
                valShell.setEmpty()
            tagValueList.push(("shell", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valShell)
        
        if self.hasExtraArgs():
            valExtraArgs = Value()
            if self.extraArgs is not None:
                valExtraArgs.setString(self.extraArgs)
            else:
                valExtraArgs.setEmpty()
            tagValueList.push(("extra-args", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valExtraArgs)
        
        if self.hasArgs():
            valArgs = Value()
            if self.args is not None:
                valArgs.setString(self.args)
            else:
                valArgs.setEmpty()
            tagValueList.push(("args", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valArgs)
        
        if self.hasValgrind():
            valValgrind = Value()
            if self.valgrind is not None:
                valValgrind.setBool(self.valgrind)
            else:
                valValgrind.setEmpty()
            tagValueList.push(("valgrind", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valValgrind)
        

        

        return ReturnCodes.kOk
Example #14
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(
                ("enabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valEnabled)

        return ReturnCodes.kOk
Example #15
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.hasDeliveryInterfaceFailover():
            valDeliveryInterfaceFailover = Value()
            if self.deliveryInterfaceFailover is not None:
                valDeliveryInterfaceFailover.setBool(self.deliveryInterfaceFailover)
            else:
                valDeliveryInterfaceFailover.setEmpty()
            tagValueList.push(("delivery-interface-failover", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valDeliveryInterfaceFailover)
        

        

        return ReturnCodes.kOk
Example #16
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.hasDeliveryInterfaceFailover():
            valDeliveryInterfaceFailover = Value()
            if self.deliveryInterfaceFailover is not None:
                valDeliveryInterfaceFailover.setBool(self.deliveryInterfaceFailover)
            else:
                valDeliveryInterfaceFailover.setEmpty()
            tagValueList.push(("delivery-interface-failover", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valDeliveryInterfaceFailover)
        

        

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

        
        if self.hasMuteReporting():
            valMuteReporting = Value()
            if self.muteReporting is not None:
                valMuteReporting.setBool(self.muteReporting)
            else:
                valMuteReporting.setEmpty()
            tagValueList.push(("mute-reporting", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), valMuteReporting)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), valEnabled)
        

        
        if self.simulationObj:
            valBegin = Value()
            (tag, ns, prefix) = ("simulation" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power", "qt-pltf-pwr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.simulationObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-simulation-failed').errorFunc(): logFunc('simulationObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasMuteReporting():
            valMuteReporting = Value()
            if self.muteReporting is not None:
                valMuteReporting.setBool(self.muteReporting)
            else:
                valMuteReporting.setEmpty()
            tagValueList.push(("mute-reporting", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valMuteReporting)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valEnabled)
        

        
        if self.simulationObj:
            valBegin = Value()
            (tag, ns, prefix) = ("simulation" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature", "qt-pltf-temperature")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.simulationObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-simulation-failed').errorFunc(): logFunc('simulationObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valEnabled)
        
        if self.hasPollIntervalSeconds():
            valPollIntervalSeconds = Value()
            if self.pollIntervalSeconds is not None:
                valPollIntervalSeconds.setInt64(self.pollIntervalSeconds)
            else:
                valPollIntervalSeconds.setEmpty()
            tagValueList.push(("poll-interval-seconds", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valPollIntervalSeconds)
        

        
        if self.thresholdsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("thresholds" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.thresholdsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-thresholds-failed').errorFunc(): logFunc('thresholdsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        if self.hasDummy():
            valDummy = Value()
            if self.dummy is not None:
                valDummy.setBool(self.dummy)
            else:
                valDummy.setEmpty()
            tagValueList.push(
                ("dummy",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log"),
                valDummy)

        if self.thresholdsObj:
            valBegin = Value()
            (tag, ns,
             prefix) = ("thresholds",
                        "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log",
                        "qt-log")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.thresholdsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-thresholds-failed').errorFunc():
                    logFunc(
                        'thresholdsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
Example #21
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.hasEyeNumber():
            valEyeNumber = Value()
            if self.eyeNumber is not None:
                valEyeNumber.setInt64(self.eyeNumber)
            else:
                valEyeNumber.setEmpty()
            tagValueList.push(("eye-number", "http://qwilt.com/model/family"),
                              valEyeNumber)

        if self.hasTransparentField():
            valTransparentField = Value()
            if self.transparentField is not None:
                valTransparentField.setBool(self.transparentField)
            else:
                valTransparentField.setEmpty()
            tagValueList.push(
                ("transparent-field", "http://qwilt.com/model/family"),
                valTransparentField)

        if self.hasId():
            valId = Value()
            if self.id is not None:
                valId.setString(self.id)
            else:
                valId.setEmpty()
            tagValueList.push(("id", "http://qwilt.com/model/family"), valId)

        if self.hasHasTail():
            valHasTail = Value()
            if self.hasTail is not None:
                valHasTail.setBool(self.hasTail)
            else:
                valHasTail.setEmpty()
            tagValueList.push(("has-tail", "http://qwilt.com/model/family"),
                              valHasTail)

        return ReturnCodes.kOk
Example #22
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.hasEyeNumber():
            valEyeNumber = Value()
            if self.eyeNumber is not None:
                valEyeNumber.setInt64(self.eyeNumber)
            else:
                valEyeNumber.setEmpty()
            tagValueList.push(("eye-number", "http://qwilt.com/model/family"), valEyeNumber)
        
        if self.hasTransparentField():
            valTransparentField = Value()
            if self.transparentField is not None:
                valTransparentField.setBool(self.transparentField)
            else:
                valTransparentField.setEmpty()
            tagValueList.push(("transparent-field", "http://qwilt.com/model/family"), valTransparentField)
        
        if self.hasId():
            valId = Value()
            if self.id is not None:
                valId.setString(self.id)
            else:
                valId.setEmpty()
            tagValueList.push(("id", "http://qwilt.com/model/family"), valId)
        
        if self.hasHasTail():
            valHasTail = Value()
            if self.hasTail is not None:
                valHasTail.setBool(self.hasTail)
            else:
                valHasTail.setEmpty()
            tagValueList.push(("has-tail", "http://qwilt.com/model/family"), valHasTail)
        

        

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

        
        if self.hasSystemProtected():
            valSystemProtected = Value()
            if self.systemProtected is not None:
                valSystemProtected.setBool(self.systemProtected)
            else:
                valSystemProtected.setEmpty()
            tagValueList.push(("system-protected", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-linux-variables"), valSystemProtected)
        
        if self.hasInitPhase():
            valInitPhase = Value()
            if self.initPhase is not None:
                valInitPhase.setEnum(self.initPhase.getValue())
            else:
                valInitPhase.setEmpty()
            tagValueList.push(("init-phase", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-linux-variables"), valInitPhase)
        
        if self.hasDescription():
            valDescription = Value()
            if self.description is not None:
                valDescription.setString(self.description)
            else:
                valDescription.setEmpty()
            tagValueList.push(("description", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-linux-variables"), valDescription)
        
        if self.hasValue():
            valValue = Value()
            if self.value is not None:
                valValue.setString(self.value)
            else:
                valValue.setEmpty()
            tagValueList.push(("value", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-linux-variables"), valValue)
        

        

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

        
        if self.hasCommandWarningTimeout():
            valCommandWarningTimeout = Value()
            if self.commandWarningTimeout is not None:
                valCommandWarningTimeout.setInt64(self.commandWarningTimeout)
            else:
                valCommandWarningTimeout.setEmpty()
            tagValueList.push(("command-warning-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandWarningTimeout)
        
        if self.hasCommandTimeout():
            valCommandTimeout = Value()
            if self.commandTimeout is not None:
                valCommandTimeout.setInt64(self.commandTimeout)
            else:
                valCommandTimeout.setEmpty()
            tagValueList.push(("command-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandTimeout)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valEnabled)
        
        if self.hasSimulationFile():
            valSimulationFile = Value()
            if self.simulationFile is not None:
                valSimulationFile.setString(self.simulationFile)
            else:
                valSimulationFile.setEmpty()
            tagValueList.push(("simulation-file", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valSimulationFile)
        

        

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

        
        if self.hasController():
            valController = Value()
            if self.controller is not None:
                valController.setString(self.controller)
            else:
                valController.setEmpty()
            tagValueList.push(("controller", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module"), valController)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module"), valEnabled)
        
        if self.hasDescription():
            valDescription = Value()
            if self.description is not None:
                valDescription.setString(self.description)
            else:
                valDescription.setEmpty()
            tagValueList.push(("description", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module"), valDescription)
        
        if self.hasLocationType():
            valLocationType = Value()
            if self.locationType is not None:
                valLocationType.setEnum(self.locationType.getValue())
            else:
                valLocationType.setEmpty()
            tagValueList.push(("location-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module"), valLocationType)
        

        

        return ReturnCodes.kOk
Example #26
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.hasEmployed():
            valEmployed = Value()
            if self.employed is not None:
                valEmployed.setBool(self.employed)
            else:
                valEmployed.setEmpty()
            tagValueList.push((
                "employed",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/list-example"
            ), valEmployed)

        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/ut/sys/blinky/example/python/list-example"
            ), valName)

        if self.hasHeight():
            valHeight = Value()
            if self.height is not None:
                valHeight.setInt64(self.height)
            else:
                valHeight.setEmpty()
            tagValueList.push((
                "height",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/list-example"
            ), valHeight)

        return ReturnCodes.kOk
Example #27
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.hasIgnore():
            valIgnore = Value()
            if self.ignore is not None:
                valIgnore.setBool(self.ignore)
            else:
                valIgnore.setEmpty()
            tagValueList.push(("ignore", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valIgnore)
        

        
        if self.actionObj:
            valBegin = Value()
            (tag, ns, prefix) = ("action" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content", "qtc")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.actionObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-action-failed').errorFunc(): logFunc('actionObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #28
0
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isPowerSupplyFailureRequested() and operData.hasPowerSupplyFailure():
            val = Value()
            val.setBool(operData.powerSupplyFailure)
            tagValueList.push(("power-supply-failure", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), val)
        
        if operData.isPowerSupplyFailureReasonRequested() and operData.hasPowerSupplyFailureReason():
            val = Value()
            val.setEnum(operData.powerSupplyFailureReason.getValue())
            tagValueList.push(("power-supply-failure-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
Example #29
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.hasDelivery():
            valDelivery = Value()
            if self.delivery is not None:
                valDelivery.setBool(self.delivery)
            else:
                valDelivery.setEmpty()
            tagValueList.push(("delivery", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valDelivery)
        
        if self.hasAnalytics():
            valAnalytics = Value()
            if self.analytics is not None:
                valAnalytics.setBool(self.analytics)
            else:
                valAnalytics.setEmpty()
            tagValueList.push(("analytics", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valAnalytics)
        
        if self.hasCachingPotential():
            valCachingPotential = Value()
            if self.cachingPotential is not None:
                valCachingPotential.setBool(self.cachingPotential)
            else:
                valCachingPotential.setEmpty()
            tagValueList.push(("caching-potential", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valCachingPotential)
        
        if self.hasAcquisition():
            valAcquisition = Value()
            if self.acquisition is not None:
                valAcquisition.setBool(self.acquisition)
            else:
                valAcquisition.setEmpty()
            tagValueList.push(("acquisition", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valAcquisition)
        

        

        return ReturnCodes.kOk
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isPhysicalIdListRequested() and operData.hasPhysicalIdList():
            val = Value()
            val.setString(operData.physicalIdList)
            tagValueList.push(("physical-id-list", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isStatusRequested() and operData.hasStatus():
            val = Value()
            val.setEnum(operData.status.getValue())
            tagValueList.push(("status", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isStateRawRequested() and operData.hasStateRaw():
            val = Value()
            val.setString(operData.stateRaw)
            tagValueList.push(("state-raw", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isReadPolicyRequested() and operData.hasReadPolicy():
            val = Value()
            val.setString(operData.readPolicy)
            tagValueList.push(("read-policy", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isBadBlocksRequested() and operData.hasBadBlocks():
            val = Value()
            val.setBool(operData.badBlocks)
            tagValueList.push(("bad-blocks", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isMediaTypeRequested() and operData.hasMediaType():
            val = Value()
            val.setString(operData.mediaType)
            tagValueList.push(("media-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isHotSparePolicyViolationRequested() and operData.hasHotSparePolicyViolation():
            val = Value()
            val.setString(operData.hotSparePolicyViolation)
            tagValueList.push(("hot-spare-policy-violation", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isIdRequested() and operData.hasId():
            val = Value()
            val.setString(operData.id)
            tagValueList.push(("id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isStateRequested() and operData.hasState():
            val = Value()
            val.setEnum(operData.state.getValue())
            tagValueList.push(("state", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isStatusRawRequested() and operData.hasStatusRaw():
            val = Value()
            val.setString(operData.statusRaw)
            tagValueList.push(("status-raw", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isDiskCachePolicyRequested() and operData.hasDiskCachePolicy():
            val = Value()
            val.setString(operData.diskCachePolicy)
            tagValueList.push(("disk-cache-policy", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isBadBlocksRawRequested() and operData.hasBadBlocksRaw():
            val = Value()
            val.setString(operData.badBlocksRaw)
            tagValueList.push(("bad-blocks-raw", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isCachePolicyRequested() and operData.hasCachePolicy():
            val = Value()
            val.setString(operData.cachePolicy)
            tagValueList.push(("cache-policy", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isWritePolicyRequested() and operData.hasWritePolicy():
            val = Value()
            val.setString(operData.writePolicy)
            tagValueList.push(("write-policy", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isRaidTypeRequested() and operData.hasRaidType():
            val = Value()
            val.setString(operData.raidType)
            tagValueList.push(("raid-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isStripeElementSizeRequested() and operData.hasStripeElementSize():
            val = Value()
            val.setString(operData.stripeElementSize)
            tagValueList.push(("stripe-element-size", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isSizeRawRequested() and operData.hasSizeRaw():
            val = Value()
            val.setString(operData.sizeRaw)
            tagValueList.push(("size-raw", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        if operData.isSizeRequested() and operData.hasSize():
            val = Value()
            val.setInt64(operData.size)
            tagValueList.push(("size", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
Example #31
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.hasThreadPriority():
            valThreadPriority = Value()
            if self.threadPriority is not None:
                valThreadPriority.setString(self.threadPriority)
            else:
                valThreadPriority.setEmpty()
            tagValueList.push(
                ("thread-priority",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valThreadPriority)

        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(
                ("enabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valEnabled)

        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-content-line"
                 ), valName)

        if self.hasThreadAffinity():
            valThreadAffinity = Value()
            if self.threadAffinity is not None:
                valThreadAffinity.setString(self.threadAffinity)
            else:
                valThreadAffinity.setEmpty()
            tagValueList.push(
                ("thread-affinity",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valThreadAffinity)

        if self.systemDefaultsObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "system-defaults",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line",
                "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.systemDefaultsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-system-defaults-failed'
                ).errorFunc():
                    logFunc(
                        'systemDefaultsObj._fillWriteTagValues() failed. PARAMS'
                    )
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
Example #32
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-platform-manager"), valName)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valEnabled)
        
        if self.hasSimulationFile():
            valSimulationFile = Value()
            if self.simulationFile is not None:
                valSimulationFile.setString(self.simulationFile)
            else:
                valSimulationFile.setEmpty()
            tagValueList.push(("simulation-file", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valSimulationFile)
        
        if self.hasCommandTimeout():
            valCommandTimeout = Value()
            if self.commandTimeout is not None:
                valCommandTimeout.setInt64(self.commandTimeout)
            else:
                valCommandTimeout.setEmpty()
            tagValueList.push(("command-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandTimeout)
        
        if self.hasCommandWarningTimeout():
            valCommandWarningTimeout = Value()
            if self.commandWarningTimeout is not None:
                valCommandWarningTimeout.setInt64(self.commandWarningTimeout)
            else:
                valCommandWarningTimeout.setEmpty()
            tagValueList.push(("command-warning-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandWarningTimeout)
        

        
        if self.systemDefaultsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("system-defaults" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.systemDefaultsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-system-defaults-failed').errorFunc(): logFunc('systemDefaultsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.countersObj:
            valBegin = Value()
            (tag, ns, prefix) = ("counters" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.countersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-counters-failed').errorFunc(): logFunc('countersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #33
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valEnabled)
        
        if self.hasContact():
            valContact = Value()
            if self.contact is not None:
                valContact.setString(self.contact)
            else:
                valContact.setEmpty()
            tagValueList.push(("contact", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valContact)
        
        if self.hasLocation():
            valLocation = Value()
            if self.location is not None:
                valLocation.setString(self.location)
            else:
                valLocation.setEmpty()
            tagValueList.push(("location", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp"), valLocation)
        

        
        if self.systemDefaultsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("system-defaults" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp", "qt-snmp")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.systemDefaultsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-system-defaults-failed').errorFunc(): logFunc('systemDefaultsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.communityListObj:
            valBegin = Value()
            (tag, ns, prefix) = ("community" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp", "qt-snmp")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.communityListObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-community-failed').errorFunc(): logFunc('communityListObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.notificationsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("notifications" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp", "qt-snmp")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.notificationsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-notifications-failed').errorFunc(): logFunc('notificationsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.countersObj:
            valBegin = Value()
            (tag, ns, prefix) = ("counters" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-snmp", "qt-snmp")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.countersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-counters-failed').errorFunc(): logFunc('countersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #34
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.hasColor():
            valColor = Value()
            if self.color is not None:
                valColor.setString(self.color)
            else:
                valColor.setEmpty()
            tagValueList.push((
                "color",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"
            ), valColor)

        if self.hasPretty():
            valPretty = Value()
            if self.pretty is not None:
                valPretty.setBool(self.pretty)
            else:
                valPretty.setEmpty()
            tagValueList.push((
                "pretty",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"
            ), valPretty)

        if self.hasNumOfLegs():
            valNumOfLegs = Value()
            if self.numOfLegs is not None:
                valNumOfLegs.setInt64(self.numOfLegs)
            else:
                valNumOfLegs.setEmpty()
            tagValueList.push((
                "num-of-legs",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example"
            ), valNumOfLegs)

        if self.statusObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "status",
                "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/simple-example",
                "se")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.statusObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-status-failed').errorFunc():
                    logFunc('statusObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
Example #35
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(
                ("enabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system"),
                valEnabled)

        if self.nameServersObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "name-servers",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system",
                "qt-sys")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.nameServersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-name-servers-failed').errorFunc(
                        ):
                    logFunc(
                        'nameServersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        if self.searchListObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "search",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system",
                "qt-sys")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.searchListObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-search-failed').errorFunc():
                    logFunc(
                        'searchListObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

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

        
        if self.hasThreadAffinity():
            valThreadAffinity = Value()
            if self.threadAffinity is not None:
                valThreadAffinity.setString(self.threadAffinity)
            else:
                valThreadAffinity.setEmpty()
            tagValueList.push(("thread-affinity", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valThreadAffinity)
        
        if self.hasIdleSleepMsec():
            valIdleSleepMsec = Value()
            if self.idleSleepMsec is not None:
                valIdleSleepMsec.setInt64(self.idleSleepMsec)
            else:
                valIdleSleepMsec.setEmpty()
            tagValueList.push(("idle-sleep-msec", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valIdleSleepMsec)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled)
        
        if self.hasMode():
            valMode = Value()
            if self.mode is not None:
                valMode.setEnum(self.mode.getValue())
            else:
                valMode.setEmpty()
            tagValueList.push(("mode", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valMode)
        
        if self.hasThreadPriority():
            valThreadPriority = Value()
            if self.threadPriority is not None:
                valThreadPriority.setString(self.threadPriority)
            else:
                valThreadPriority.setEmpty()
            tagValueList.push(("thread-priority", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valThreadPriority)
        

        
        if self.loggingObj:
            valBegin = Value()
            (tag, ns, prefix) = ("logging" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line", "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.loggingObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-logging-failed').errorFunc(): logFunc('loggingObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.vipObj:
            valBegin = Value()
            (tag, ns, prefix) = ("vip" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line", "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.vipObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-vip-failed').errorFunc(): logFunc('vipObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #37
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.hasMaxActiveConnections():
            valMaxActiveConnections = Value()
            if self.maxActiveConnections is not None:
                valMaxActiveConnections.setInt64(self.maxActiveConnections)
            else:
                valMaxActiveConnections.setEmpty()
            tagValueList.push(
                ("max-active-connections",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valMaxActiveConnections)

        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(
                ("enabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valEnabled)

        if self.hasMaxRedirectRate():
            valMaxRedirectRate = Value()
            if self.maxRedirectRate is not None:
                valMaxRedirectRate.setInt64(self.maxRedirectRate)
            else:
                valMaxRedirectRate.setEmpty()
            tagValueList.push(
                ("max-redirect-rate",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valMaxRedirectRate)

        if self.blockerObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "blocker",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line",
                "qtc-line")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.blockerObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-blocker-failed').errorFunc():
                    logFunc('blockerObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

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

        if self.hasEstimatedDeliveryTrxPerConnection():
            valEstimatedDeliveryTrxPerConnection = Value()
            if self.estimatedDeliveryTrxPerConnection is not None:
                valEstimatedDeliveryTrxPerConnection.setInt64(
                    self.estimatedDeliveryTrxPerConnection)
            else:
                valEstimatedDeliveryTrxPerConnection.setEmpty()
            tagValueList.push(
                ("estimated-delivery-trx-per-connection",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valEstimatedDeliveryTrxPerConnection)

        if self.hasSimulatedDiskSizeGb():
            valSimulatedDiskSizeGb = Value()
            if self.simulatedDiskSizeGb is not None:
                valSimulatedDiskSizeGb.setInt64(self.simulatedDiskSizeGb)
            else:
                valSimulatedDiskSizeGb.setEmpty()
            tagValueList.push(
                ("simulated-disk-size-gb",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valSimulatedDiskSizeGb)

        if self.hasDeliveryMaxActiveConnections():
            valDeliveryMaxActiveConnections = Value()
            if self.deliveryMaxActiveConnections is not None:
                valDeliveryMaxActiveConnections.setInt64(
                    self.deliveryMaxActiveConnections)
            else:
                valDeliveryMaxActiveConnections.setEmpty()
            tagValueList.push(
                ("delivery-max-active-connections",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valDeliveryMaxActiveConnections)

        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(
                ("enabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valEnabled)

        if self.hasDeliveryMaxBwMbps():
            valDeliveryMaxBwMbps = Value()
            if self.deliveryMaxBwMbps is not None:
                valDeliveryMaxBwMbps.setInt64(self.deliveryMaxBwMbps)
            else:
                valDeliveryMaxBwMbps.setEmpty()
            tagValueList.push(
                ("delivery-max-bw-mbps",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"
                 ), valDeliveryMaxBwMbps)

        return ReturnCodes.kOk
Example #39
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valEnabled)
        
        if self.hasPollIntervalSeconds():
            valPollIntervalSeconds = Value()
            if self.pollIntervalSeconds is not None:
                valPollIntervalSeconds.setInt64(self.pollIntervalSeconds)
            else:
                valPollIntervalSeconds.setEmpty()
            tagValueList.push(("poll-interval-seconds", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valPollIntervalSeconds)
        

        
        if self.thresholdsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("thresholds" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.thresholdsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-thresholds-failed').errorFunc(): logFunc('thresholdsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.sourceListObj:
            valBegin = Value()
            (tag, ns, prefix) = ("source" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.sourceListObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-source-failed').errorFunc(): logFunc('sourceListObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.systemDefaultsObj:
            valBegin = Value()
            (tag, ns, prefix) = ("system-defaults" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.systemDefaultsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-system-defaults-failed').errorFunc(): logFunc('systemDefaultsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.countersObj:
            valBegin = Value()
            (tag, ns, prefix) = ("counters" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager", "qt-pltf-mngr")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.countersObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-counters-failed').errorFunc(): logFunc('countersObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
    def fillTagValues (self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func(): logFunc("called. operData=%s, keyPath=%s, initialListSize=%d", operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log("fill-tag-values-adding").debug3Func(): logFunc("adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d", i, valBegin, self.myKeyPath.getLen())
                i+=1
        
        if operData.isDescriptionRequested() and operData.hasDescription():
            val = Value()
            val.setString(operData.description)
            tagValueList.push(("description", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isSeverityRequested() and operData.hasSeverity():
            val = Value()
            val.setEnum(operData.severity.getValue())
            tagValueList.push(("severity", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isNumberRequested() and operData.hasNumber():
            val = Value()
            val.setInt64(operData.number)
            tagValueList.push(("number", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isEntityRequested() and operData.hasEntity():
            val = Value()
            val.setString(operData.entity)
            tagValueList.push(("entity", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isSourceRequested() and operData.hasSource():
            val = Value()
            val.setString(operData.source)
            tagValueList.push(("source", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isSimulatedRequested() and operData.hasSimulated():
            val = Value()
            val.setBool(operData.simulated)
            tagValueList.push(("simulated", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        if operData.isNameRequested() and operData.hasName():
            val = Value()
            val.setEnum(operData.name.getValue())
            tagValueList.push(("name", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"), val)
        
        
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i-=1

        for logFunc in self._log("fill-tag-values-ended").debug3Func(): logFunc("ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                                                  operData.debugStr(True), keyPath, initialListSize, tagValueList.getLen())
        return ReturnCodes.kOk
Example #41
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.hasAutoInit():
            valAutoInit = Value()
            if self.autoInit is not None:
                valAutoInit.setBool(self.autoInit)
            else:
                valAutoInit.setEmpty()
            tagValueList.push(
                ("auto-init",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valAutoInit)

        if self.hasOsDevice():
            valOsDevice = Value()
            if self.osDevice is not None:
                valOsDevice.setString(self.osDevice)
            else:
                valOsDevice.setEmpty()
            tagValueList.push(
                ("os-device",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valOsDevice)

        if self.hasImplementation():
            valImplementation = Value()
            if self.implementation is not None:
                valImplementation.setEnum(self.implementation.getValue())
            else:
                valImplementation.setEmpty()
            tagValueList.push(
                ("implementation",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valImplementation)

        if self.hasRaidType():
            valRaidType = Value()
            if self.raidType is not None:
                valRaidType.setEnum(self.raidType.getValue())
            else:
                valRaidType.setEmpty()
            tagValueList.push(
                ("raid-type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valRaidType)

        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-storage-disk"
                 ), valName)

        if self.statusObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "status",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk",
                "qt-strg-dsk")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.statusObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-status-failed').errorFunc():
                    logFunc('statusObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
Example #42
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.hasDisabled():
            valDisabled = Value()
            if self.disabled is not None:
                valDisabled.setBool(self.disabled)
            else:
                valDisabled.setEmpty()
            tagValueList.push(
                ("disabled",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug"),
                valDisabled)

        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-debug"),
                valName)

        if self.hasDescription():
            valDescription = Value()
            if self.description is not None:
                valDescription.setString(self.description)
            else:
                valDescription.setEmpty()
            tagValueList.push(
                ("description",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug"),
                valDescription)

        if self.decisionObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "decision",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug",
                "qt-debug")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.decisionObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-decision-failed').errorFunc():
                    logFunc('decisionObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        if self.matchObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "match",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug",
                "qt-debug")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.matchObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-match-failed').errorFunc():
                    logFunc('matchObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
Example #43
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.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valEnabled)
        
        if self.hasDescription():
            valDescription = Value()
            if self.description is not None:
                valDescription.setString(self.description)
            else:
                valDescription.setEmpty()
            tagValueList.push(("description", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valDescription)
        
        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-content"), valName)
        

        
        if self.ipv4Obj:
            valBegin = Value()
            (tag, ns, prefix) = ("ipv4" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content", "qtc")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.ipv4Obj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-ipv4-failed').errorFunc(): logFunc('ipv4Obj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.ipv6Obj:
            valBegin = Value()
            (tag, ns, prefix) = ("ipv6" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content", "qtc")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.ipv6Obj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-ipv6-failed').errorFunc(): logFunc('ipv6Obj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

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

        
        if self.hasAutoInit():
            valAutoInit = Value()
            if self.autoInit is not None:
                valAutoInit.setBool(self.autoInit)
            else:
                valAutoInit.setEmpty()
            tagValueList.push(("auto-init", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valAutoInit)
        
        if self.hasOsDevice():
            valOsDevice = Value()
            if self.osDevice is not None:
                valOsDevice.setString(self.osDevice)
            else:
                valOsDevice.setEmpty()
            tagValueList.push(("os-device", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valOsDevice)
        
        if self.hasImplementation():
            valImplementation = Value()
            if self.implementation is not None:
                valImplementation.setEnum(self.implementation.getValue())
            else:
                valImplementation.setEmpty()
            tagValueList.push(("implementation", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valImplementation)
        
        if self.hasRaidType():
            valRaidType = Value()
            if self.raidType is not None:
                valRaidType.setEnum(self.raidType.getValue())
            else:
                valRaidType.setEmpty()
            tagValueList.push(("raid-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valRaidType)
        
        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-storage-disk"), valName)
        

        
        if self.statusObj:
            valBegin = Value()
            (tag, ns, prefix) = ("status" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk", "qt-strg-dsk")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.statusObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-status-failed').errorFunc(): logFunc('statusObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #45
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.hasEyeNumber():
            valEyeNumber = Value()
            if self.eyeNumber is not None:
                valEyeNumber.setInt64(self.eyeNumber)
            else:
                valEyeNumber.setEmpty()
            tagValueList.push(("eye-number", "http://qwilt.com/model/room"), valEyeNumber)
        
        if self.hasTransparentField():
            valTransparentField = Value()
            if self.transparentField is not None:
                valTransparentField.setBool(self.transparentField)
            else:
                valTransparentField.setEmpty()
            tagValueList.push(("transparent-field", "http://qwilt.com/model/room"), valTransparentField)
        
        if self.hasId():
            valId = Value()
            if self.id is not None:
                valId.setString(self.id)
            else:
                valId.setEmpty()
            tagValueList.push(("id", "http://qwilt.com/model/room"), valId)
        
        if self.hasHasTail():
            valHasTail = Value()
            if self.hasTail is not None:
                valHasTail.setBool(self.hasTail)
            else:
                valHasTail.setEmpty()
            tagValueList.push(("has-tail", "http://qwilt.com/model/room"), valHasTail)
        

        
        if self.antennaObj:
            valBegin = Value()
            (tag, ns, prefix) = ("antenna" , "http://qwilt.com/model/room", "room")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.antennaObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-antenna-failed').errorFunc(): logFunc('antennaObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #46
0
    def fillTagValues(self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func():
            logFunc("called. operData=%s, keyPath=%s, initialListSize=%d",
                    operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log(
                        "fill-tag-values-adding").debug3Func():
                    logFunc(
                        "adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d",
                        i, valBegin, self.myKeyPath.getLen())
                i += 1

        if operData.isPhysicalIdListRequested() and operData.hasPhysicalIdList(
        ):
            val = Value()
            val.setString(operData.physicalIdList)
            tagValueList.push(
                ("physical-id-list",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isStatusRequested() and operData.hasStatus():
            val = Value()
            val.setEnum(operData.status.getValue())
            tagValueList.push(
                ("status",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isStateRawRequested() and operData.hasStateRaw():
            val = Value()
            val.setString(operData.stateRaw)
            tagValueList.push(
                ("state-raw",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isReadPolicyRequested() and operData.hasReadPolicy():
            val = Value()
            val.setString(operData.readPolicy)
            tagValueList.push(
                ("read-policy",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isBadBlocksRequested() and operData.hasBadBlocks():
            val = Value()
            val.setBool(operData.badBlocks)
            tagValueList.push(
                ("bad-blocks",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isMediaTypeRequested() and operData.hasMediaType():
            val = Value()
            val.setString(operData.mediaType)
            tagValueList.push(
                ("media-type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isHotSparePolicyViolationRequested(
        ) and operData.hasHotSparePolicyViolation():
            val = Value()
            val.setString(operData.hotSparePolicyViolation)
            tagValueList.push(
                ("hot-spare-policy-violation",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isIdRequested() and operData.hasId():
            val = Value()
            val.setString(operData.id)
            tagValueList.push(
                ("id",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isStateRequested() and operData.hasState():
            val = Value()
            val.setEnum(operData.state.getValue())
            tagValueList.push(
                ("state",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isStatusRawRequested() and operData.hasStatusRaw():
            val = Value()
            val.setString(operData.statusRaw)
            tagValueList.push(
                ("status-raw",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isDiskCachePolicyRequested(
        ) and operData.hasDiskCachePolicy():
            val = Value()
            val.setString(operData.diskCachePolicy)
            tagValueList.push(
                ("disk-cache-policy",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isBadBlocksRawRequested() and operData.hasBadBlocksRaw():
            val = Value()
            val.setString(operData.badBlocksRaw)
            tagValueList.push(
                ("bad-blocks-raw",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isCachePolicyRequested() and operData.hasCachePolicy():
            val = Value()
            val.setString(operData.cachePolicy)
            tagValueList.push(
                ("cache-policy",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isWritePolicyRequested() and operData.hasWritePolicy():
            val = Value()
            val.setString(operData.writePolicy)
            tagValueList.push(
                ("write-policy",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isRaidTypeRequested() and operData.hasRaidType():
            val = Value()
            val.setString(operData.raidType)
            tagValueList.push(
                ("raid-type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isStripeElementSizeRequested(
        ) and operData.hasStripeElementSize():
            val = Value()
            val.setString(operData.stripeElementSize)
            tagValueList.push(
                ("stripe-element-size",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isSizeRawRequested() and operData.hasSizeRaw():
            val = Value()
            val.setString(operData.sizeRaw)
            tagValueList.push(
                ("size-raw",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if operData.isSizeRequested() and operData.hasSize():
            val = Value()
            val.setInt64(operData.size)
            tagValueList.push(
                ("size",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), val)

        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i -= 1

        for logFunc in self._log("fill-tag-values-ended").debug3Func():
            logFunc(
                "ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                operData.debugStr(True), keyPath, initialListSize,
                tagValueList.getLen())
        return ReturnCodes.kOk
Example #47
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.hasAutoInit():
            valAutoInit = Value()
            if self.autoInit is not None:
                valAutoInit.setBool(self.autoInit)
            else:
                valAutoInit.setEmpty()
            tagValueList.push(
                ("auto-init",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valAutoInit)

        if self.hasCheckUuid():
            valCheckUuid = Value()
            if self.checkUuid is not None:
                valCheckUuid.setBool(self.checkUuid)
            else:
                valCheckUuid.setEmpty()
            tagValueList.push(
                ("check-uuid",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valCheckUuid)

        if self.hasReadAhead():
            valReadAhead = Value()
            if self.readAhead is not None:
                valReadAhead.setInt64(self.readAhead)
            else:
                valReadAhead.setEmpty()
            tagValueList.push(
                ("read-ahead",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valReadAhead)

        if self.hasFileSystemType():
            valFileSystemType = Value()
            if self.fileSystemType is not None:
                valFileSystemType.setEnum(self.fileSystemType.getValue())
            else:
                valFileSystemType.setEmpty()
            tagValueList.push(
                ("file-system-type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valFileSystemType)

        if self.commandsObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "commands",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk",
                "qt-strg-dsk")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.commandsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-commands-failed').errorFunc():
                    logFunc('commandsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        if self.timeoutsObj:
            valBegin = Value()
            (tag, ns, prefix) = (
                "timeouts",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk",
                "qt-strg-dsk")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.timeoutsObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log(
                        'fill-write-tag-values-timeouts-failed').errorFunc():
                    logFunc('timeoutsObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)

        return ReturnCodes.kOk
    def fillTagValues(self, keyPath, tagValueList, operData):
        initialListSize = tagValueList.getLen()
        for logFunc in self._log("fill-tag-values").debug3Func():
            logFunc("called. operData=%s, keyPath=%s, initialListSize=%d",
                    operData.debugStr(True), keyPath, initialListSize)
        # fill tag values up to current
        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = keyPath.getLen()
            while i < self.myKeyPath.getLen():
                valBegin = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valBegin.setXmlBegin((tag, ns, prefix))
                tagValueList.push((tag, ns), valBegin)
                for logFunc in self._log(
                        "fill-tag-values-adding").debug3Func():
                    logFunc(
                        "adding xml begin. i=%d, valBegin=%s, self.myKeyPath.getLen()=%d",
                        i, valBegin, self.myKeyPath.getLen())
                i += 1

        if operData.isDescriptionRequested() and operData.hasDescription():
            val = Value()
            val.setString(operData.description)
            tagValueList.push((
                "description",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isSeverityRequested() and operData.hasSeverity():
            val = Value()
            val.setEnum(operData.severity.getValue())
            tagValueList.push((
                "severity",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isNumberRequested() and operData.hasNumber():
            val = Value()
            val.setInt64(operData.number)
            tagValueList.push((
                "number",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isEntityRequested() and operData.hasEntity():
            val = Value()
            val.setString(operData.entity)
            tagValueList.push((
                "entity",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isSourceRequested() and operData.hasSource():
            val = Value()
            val.setString(operData.source)
            tagValueList.push((
                "source",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isSimulatedRequested() and operData.hasSimulated():
            val = Value()
            val.setBool(operData.simulated)
            tagValueList.push((
                "simulated",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if operData.isNameRequested() and operData.hasName():
            val = Value()
            val.setEnum(operData.name.getValue())
            tagValueList.push((
                "name",
                "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-alarms"
            ), val)

        if self.myKeyPath.isEqualLen(keyPath, keyPath.getLen()):
            i = self.myKeyPath.getLen() - 1
            while i >= keyPath.getLen():
                valEnd = Value()
                (tag, ns, prefix) = self.myKeyPath.getAt(i).asXmlTag()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
                i -= 1

        for logFunc in self._log("fill-tag-values-ended").debug3Func():
            logFunc(
                "ended. operData=%s, keyPath=%s, initialListSize=%d, finalListSize=%d",
                operData.debugStr(True), keyPath, initialListSize,
                tagValueList.getLen())
        return ReturnCodes.kOk
    def _fillWriteTagValues (self, tagValueList):
        self.myInitGuard.isInitOrCrash()
        for logFunc in self._log('fill-write-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList)

        
        if self.hasMinLevel():
            valMinLevel = Value()
            if self.minLevel is not None:
                valMinLevel.setEnum(self.minLevel.getValue())
            else:
                valMinLevel.setEmpty()
            tagValueList.push(("min-level", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug"), valMinLevel)
        
        if self.hasDestinationType():
            valDestinationType = Value()
            if self.destinationType is not None:
                valDestinationType.setEnum(self.destinationType.getValue())
            else:
                valDestinationType.setEmpty()
            tagValueList.push(("type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug"), valDestinationType)
        
        if self.hasEnabled():
            valEnabled = Value()
            if self.enabled is not None:
                valEnabled.setBool(self.enabled)
            else:
                valEnabled.setEmpty()
            tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug"), valEnabled)
        

        
        if self.outputObj:
            valBegin = Value()
            (tag, ns, prefix) = ("output" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug", "qt-debug")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.outputObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-output-failed').errorFunc(): logFunc('outputObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        
        if self.formatObj:
            valBegin = Value()
            (tag, ns, prefix) = ("format" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-debug", "qt-debug")
            valBegin.setXmlBegin((tag, ns, prefix))
            tagValueList.push((tag, ns), valBegin)

            tagValueListLen = tagValueList.getLen()

            res = self.formatObj._fillWriteTagValues(tagValueList)
            if res != ReturnCodes.kOk:
                for logFunc in self._log('fill-write-tag-values-format-failed').errorFunc(): logFunc('formatObj._fillWriteTagValues() failed. PARAMS')
                return ReturnCodes.kGeneralError

            if tagValueList.getLen() == tagValueListLen:
                # descendant didn't add anything, no need to read it.
                tagValueList.pop()
            else:
                valEnd = Value()
                valEnd.setXmlEnd((tag, ns, prefix))
                tagValueList.push((tag, ns), valEnd)
        

        return ReturnCodes.kOk
Example #50
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.hasExecutable():
            valExecutable = Value()
            if self.executable is not None:
                valExecutable.setString(self.executable)
            else:
                valExecutable.setEmpty()
            tagValueList.push(
                ("executable",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"),
                valExecutable)

        if self.hasShell():
            valShell = Value()
            if self.shell is not None:
                valShell.setBool(self.shell)
            else:
                valShell.setEmpty()
            tagValueList.push(
                ("shell",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"),
                valShell)

        if self.hasExtraArgs():
            valExtraArgs = Value()
            if self.extraArgs is not None:
                valExtraArgs.setString(self.extraArgs)
            else:
                valExtraArgs.setEmpty()
            tagValueList.push(
                ("extra-args",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"),
                valExtraArgs)

        if self.hasArgs():
            valArgs = Value()
            if self.args is not None:
                valArgs.setString(self.args)
            else:
                valArgs.setEmpty()
            tagValueList.push(
                ("args",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"),
                valArgs)

        if self.hasValgrind():
            valValgrind = Value()
            if self.valgrind is not None:
                valValgrind.setBool(self.valgrind)
            else:
                valValgrind.setEmpty()
            tagValueList.push(
                ("valgrind",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"),
                valValgrind)

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

        if self.hasOsDevice():
            valOsDevice = Value()
            if self.osDevice is not None:
                valOsDevice.setString(self.osDevice)
            else:
                valOsDevice.setEmpty()
            tagValueList.push(
                ("os-device",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valOsDevice)

        if self.hasImplementation():
            valImplementation = Value()
            if self.implementation is not None:
                valImplementation.setEnum(self.implementation.getValue())
            else:
                valImplementation.setEmpty()
            tagValueList.push(
                ("implementation",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valImplementation)

        if self.hasRaidType():
            valRaidType = Value()
            if self.raidType is not None:
                valRaidType.setEnum(self.raidType.getValue())
            else:
                valRaidType.setEmpty()
            tagValueList.push(
                ("raid-type",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valRaidType)

        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-storage-disk"
                 ), valName)

        if self.hasAutoInit():
            valAutoInit = Value()
            if self.autoInit is not None:
                valAutoInit.setBool(self.autoInit)
            else:
                valAutoInit.setEmpty()
            tagValueList.push(
                ("auto-init",
                 "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"
                 ), valAutoInit)

        return ReturnCodes.kOk