def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isLocalTimeStringRequested(): valLocalTimeString = Value() valLocalTimeString.setEmpty() tagValueList.push(("local-time-string", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valLocalTimeString) if self.isUtcTimeStringRequested(): valUtcTimeString = Value() valUtcTimeString.setEmpty() tagValueList.push(("utc-time-string", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valUtcTimeString) if self.isDaylightSavingTimeRequested(): valDaylightSavingTime = Value() valDaylightSavingTime.setEmpty() tagValueList.push(("daylight-saving-time", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valDaylightSavingTime) if self.isEpochRequested(): valEpoch = Value() valEpoch.setEmpty() tagValueList.push(("epoch", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valEpoch) if self.isUtcOffsetMinutesRequested(): valUtcOffsetMinutes = Value() valUtcOffsetMinutes.setEmpty() tagValueList.push(("utc-offset-minutes", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valUtcOffsetMinutes) 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.hasLength(): valLength = Value() if self.length is not None: valLength.setInt64(self.length) else: valLength.setEmpty() tagValueList.push(("length", "http://qwilt.com/model/tv"), valLength) if self.hasBoringLevel(): valBoringLevel = Value() if self.boringLevel is not None: valBoringLevel.setInt64(self.boringLevel) else: valBoringLevel.setEmpty() tagValueList.push(("boring-level", "http://qwilt.com/model/tv"), valBoringLevel) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isHostnameRequested(): valHostname = Value() valHostname.setEmpty() tagValueList.push(("hostname", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system"), valHostname) if self.nameResolutionObj: valBegin = Value() (tag, ns, prefix) = ("name-resolution" , "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.nameResolutionObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-read-tag-values-name-resolution-failed').errorFunc(): logFunc('nameResolutionObj._fillReadTagValues() 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.hasPollLatencyErrorSeconds(): valPollLatencyErrorSeconds = Value() if self.pollLatencyErrorSeconds is not None: valPollLatencyErrorSeconds.setInt64(self.pollLatencyErrorSeconds) else: valPollLatencyErrorSeconds.setEmpty() tagValueList.push(("poll-latency-error-seconds", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log"), valPollLatencyErrorSeconds) if self.hasPollLatencyWarningSeconds(): valPollLatencyWarningSeconds = Value() if self.pollLatencyWarningSeconds is not None: valPollLatencyWarningSeconds.setInt64(self.pollLatencyWarningSeconds) else: valPollLatencyWarningSeconds.setEmpty() tagValueList.push(("poll-latency-warning-seconds", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-log"), valPollLatencyWarningSeconds) 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.hasChannelQueueSize(): valChannelQueueSize = Value() if self.channelQueueSize is not None: valChannelQueueSize.setInt64(self.channelQueueSize) else: valChannelQueueSize.setEmpty() tagValueList.push(("channel-queue-size", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valChannelQueueSize) if self.hasMemSize(): valMemSize = Value() if self.memSize is not None: valMemSize.setInt64(self.memSize) else: valMemSize.setEmpty() tagValueList.push(("mem-size", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valMemSize) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isExecutableRequested(): valExecutable = Value() valExecutable.setEmpty() tagValueList.push(("executable", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valExecutable) if self.isShellRequested(): valShell = Value() valShell.setEmpty() tagValueList.push(("shell", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valShell) if self.isExtraArgsRequested(): valExtraArgs = Value() valExtraArgs.setEmpty() tagValueList.push(("extra-args", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valExtraArgs) if self.isArgsRequested(): valArgs = Value() valArgs.setEmpty() tagValueList.push(("args", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valArgs) if self.isValgrindRequested(): valValgrind = Value() valValgrind.setEmpty() tagValueList.push(("valgrind", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process"), valValgrind) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isEstimatedDeliveryTrxPerConnectionRequested(): valEstimatedDeliveryTrxPerConnection = Value() valEstimatedDeliveryTrxPerConnection.setEmpty() tagValueList.push(("estimated-delivery-trx-per-connection", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEstimatedDeliveryTrxPerConnection) if self.isSimulatedDiskSizeGbRequested(): valSimulatedDiskSizeGb = Value() valSimulatedDiskSizeGb.setEmpty() tagValueList.push(("simulated-disk-size-gb", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valSimulatedDiskSizeGb) if self.isDeliveryMaxActiveConnectionsRequested(): valDeliveryMaxActiveConnections = Value() valDeliveryMaxActiveConnections.setEmpty() tagValueList.push(("delivery-max-active-connections", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valDeliveryMaxActiveConnections) if self.isEnabledRequested(): valEnabled = Value() valEnabled.setEmpty() tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled) if self.isDeliveryMaxBwMbpsRequested(): valDeliveryMaxBwMbps = Value() 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.hasCatalogId(): valCatalogId = Value() if self.catalogId is not None: valCatalogId.setInt64(self.catalogId) else: valCatalogId.setEmpty() tagValueList.push(("catalog-id", "http://qwilt.com/model/room"), valCatalogId) if self.hasName(): valName = Value() if self.name is not None: valName.setString(self.name) else: valName.setEmpty() tagValueList.push(("name", "http://qwilt.com/model/room"), valName) 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.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.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) 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.hasId(): valId = Value() if self.id is not None: valId.setString(self.id) else: valId.setEmpty() tagValueList.push(("id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), valId) if self.hasFruId(): valFruId = Value() if self.fruId is not None: valFruId.setString(self.fruId) else: valFruId.setEmpty() tagValueList.push(("fru-id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), valFruId) 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.hasLength(): valLength = Value() if self.length is not None: valLength.setInt64(self.length) else: valLength.setEmpty() tagValueList.push(("length", "http://qwilt.com/model/family"), valLength) if self.hasSmartness(): valSmartness = Value() if self.smartness is not None: valSmartness.setInt64(self.smartness) else: valSmartness.setEmpty() tagValueList.push(("smartness", "http://qwilt.com/model/family"), valSmartness) 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.hasWidth(): valWidth = Value() if self.width is not None: valWidth.setInt64(self.width) else: valWidth.setEmpty() tagValueList.push(("width", "http://qwilt.com/model/lake-example"), valWidth) if self.hasLength(): valLength = Value() if self.length is not None: valLength.setInt64(self.length) else: valLength.setEmpty() tagValueList.push(("length", "http://qwilt.com/model/lake-example"), valLength) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isPciDeviceIdRequested(): valPciDeviceId = Value() valPciDeviceId.setEmpty() tagValueList.push(("pci-device-id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valPciDeviceId) if self.isCountersClearEventRequested(): valCountersClearEvent = Value() valCountersClearEvent.setEmpty() tagValueList.push(("counters-clear-event", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valCountersClearEvent) if self.isPciVendorIdRequested(): valPciVendorId = Value() valPciVendorId.setEmpty() tagValueList.push(("pci-vendor-id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valPciVendorId) if self.isPciIndexRequested(): valPciIndex = Value() valPciIndex.setEmpty() tagValueList.push(("pci-index", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valPciIndex) if self.isOsNameRequested(): valOsName = Value() valOsName.setEmpty() tagValueList.push(("os-name", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valOsName) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isDefaultGatewayRequested(): valDefaultGateway = Value() valDefaultGateway.setEmpty() tagValueList.push(("default-gateway", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valDefaultGateway) if self.addressListObj: valBegin = Value() (tag, ns, prefix) = ("address" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces", "qt-if") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.addressListObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-read-tag-values-address-failed').errorFunc(): logFunc('addressListObj._fillReadTagValues() 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 _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isCountRequested(): valCount = Value() valCount.setEmpty() tagValueList.push(("count", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valCount) if self.isTemperatureWarningRequested(): valTemperatureWarning = Value() valTemperatureWarning.setEmpty() tagValueList.push(("temperature-warning", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureWarning) if self.isTemperatureCriticalRequested(): valTemperatureCritical = Value() valTemperatureCritical.setEmpty() tagValueList.push(("temperature-critical", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureCritical) if self.isTemperatureCriticalReasonRequested(): valTemperatureCriticalReason = Value() valTemperatureCriticalReason.setEmpty() tagValueList.push(("temperature-critical-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureCriticalReason) if self.isTemperatureWarningReasonRequested(): valTemperatureWarningReason = Value() valTemperatureWarningReason.setEmpty() tagValueList.push(("temperature-warning-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureWarningReason) 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-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 _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.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) 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.hasActivate(): valActivate = Value() if self.activate is not None: valActivate.setInt64(self.activate) else: valActivate.setEmpty() tagValueList.push(("activate", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valActivate) if self.hasGetStatus(): valGetStatus = Value() if self.getStatus is not None: valGetStatus.setInt64(self.getStatus) else: valGetStatus.setEmpty() tagValueList.push(("get-status", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valGetStatus) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isOsDeviceRequested(): valOsDevice = Value() valOsDevice.setEmpty() tagValueList.push(("os-device", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valOsDevice) if self.isImplementationRequested(): valImplementation = Value() valImplementation.setEmpty() tagValueList.push(("implementation", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valImplementation) if self.isRaidTypeRequested(): valRaidType = Value() valRaidType.setEmpty() tagValueList.push(("raid-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valRaidType) if self.isNameRequested(): valName = Value() valName.setEmpty() tagValueList.push(("name", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valName) if self.isAutoInitRequested(): valAutoInit = Value() valAutoInit.setEmpty() tagValueList.push(("auto-init", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valAutoInit) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isIdRequested(): valId = Value() valId.setEmpty() tagValueList.push(("id", "http://qwilt.com/model/oper"), valId) if self.opRObj: valBegin = Value() (tag, ns, prefix) = ("op-r" , "http://qwilt.com/model/oper", "oper") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.opRObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-read-tag-values-op-r-failed').errorFunc(): logFunc('opRObj._fillReadTagValues() 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 _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isEnabledRequested(): valEnabled = Value() valEnabled.setEmpty() tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled) if self.controllerObj: valBegin = Value() (tag, ns, prefix) = ("controller" , "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.controllerObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-read-tag-values-controller-failed').errorFunc(): logFunc('controllerObj._fillReadTagValues() 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"), 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.hasPreferredDeliveryInterface(): valPreferredDeliveryInterface = Value() if self.preferredDeliveryInterface is not None: valPreferredDeliveryInterface.setString(self.preferredDeliveryInterface) else: valPreferredDeliveryInterface.setEmpty() tagValueList.push(("preferred-delivery-interface", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-interfaces"), valPreferredDeliveryInterface) if self.ipv4Obj: valBegin = Value() (tag, ns, prefix) = ("ipv4" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-interfaces", "qtc-if") 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-interfaces", "qtc-if") 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.hasMethod(): valMethod = Value() if self.method is not None: valMethod.setEnum(self.method.getValue()) else: valMethod.setEmpty() tagValueList.push(("method", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valMethod) if self.arpObj: valBegin = Value() (tag, ns, prefix) = ("arp" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces", "qt-if") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.arpObj._fillWriteTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-write-tag-values-arp-failed').errorFunc(): logFunc('arpObj._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.pingObj: valBegin = Value() (tag, ns, prefix) = ("ping" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces", "qt-if") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.pingObj._fillWriteTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-write-tag-values-ping-failed').errorFunc(): logFunc('pingObj._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
def _fillWriteTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-write-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.hasTimezone(): valTimezone = Value() if self.timezone is not None: valTimezone.setString(self.timezone) else: valTimezone.setEmpty() tagValueList.push(("timezone", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock"), valTimezone) if self.statusObj: valBegin = Value() (tag, ns, prefix) = ("status" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock", "qt-sys-clock") 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) if self.systemDefaultsObj: valBegin = Value() (tag, ns, prefix) = ("system-defaults" , "http://qwilt.com/ns/yang/device/tech/qwilt-tech-system-clock", "qt-sys-clock") 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 _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isValueOpV1Requested(): valValueOpV1 = Value() valValueOpV1.setEmpty() tagValueList.push(("value-op-v1", "http://qwilt.com/model/oper"), valValueOpV1) if self.opYObj: valBegin = Value() (tag, ns, prefix) = ("op-y", "http://qwilt.com/model/oper", "oper") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.opYObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log( 'fill-read-tag-values-op-y-failed').errorFunc(): logFunc('opYObj._fillReadTagValues() 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.opWObj: valBegin = Value() (tag, ns, prefix) = ("op-w", "http://qwilt.com/model/oper", "oper") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.opWObj._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log( 'fill-read-tag-values-op-w-failed').errorFunc(): logFunc('opWObj._fillReadTagValues() 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.hasTrimContentItemSizeMb(): valTrimContentItemSizeMb = Value() if self.trimContentItemSizeMb is not None: valTrimContentItemSizeMb.setInt64(self.trimContentItemSizeMb) else: valTrimContentItemSizeMb.setEmpty() tagValueList.push( ("trim-content-item-size-mb", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line" ), valTrimContentItemSizeMb) 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.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/oper-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/oper-example" ), valHeight) if self.statusWrapperObj: valBegin = Value() (tag, ns, prefix) = ( "status-wrapper", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/oper-example", "oe") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.statusWrapperObj._fillWriteTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log( 'fill-write-tag-values-status-wrapper-failed' ).errorFunc(): logFunc( 'statusWrapperObj._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 getNext(self, trxContext, keypath, next): for logFunc in self._log("get-next").debug3Func(): logFunc("called. keypath=%s, next=%s, trxContext=%s", keypath, next, trxContext) var = 0 isCompleted = True if self.myIsActive: if self.myGetNextFunctor: timeoutGuardName = str( self.myKeyPath) + "-" + "get-next-functor" timeoutGuard = TimeoutGuard( self._log, timeoutGuardName, self.getFunctorTimeout(self.GET_NEXT_FUNCTOR), self.getFunctorMildTimeout(self.GET_NEXT_FUNCTOR)) var_PBR = PassByRef(var) next_PBR = PassByRef(next) isCompleted_PBR = PassByRef(None) res = self.myGetNextFunctor(trxContext, var_PBR, next_PBR, isCompleted_PBR) timeoutGuard.checkAndLog("application problem: functor=%s" % self.myGetNextFunctor.__name__) if res != ReturnCodes.kOk: for logFunc in self._log( "get-next-functor-failed").errorFunc(): logFunc( "functor failed. res=%s, keypath=%s, trxContext=%s", res, keypath, trxContext) return ReturnCodes.kGeneralError var = var_PBR.value() next = next_PBR.value() isCompleted = isCompleted_PBR.value() for logFunc in self._log( "get-next-send-next-key-functor-returned").debug3Func( ): logFunc( "functor returned. keypath=%s, trxContext=%s, var=%s, next=%s, isCompeted=%s", keypath, trxContext, var, next, isCompleted) nextKeyValue = Value() if isCompleted == True: nextKeyValue.setEmpty() else: nextKeyValue.setInt64(var) res = self.myDomain.sendNextKeyValue(trxContext, nextKeyValue, next) if res != ReturnCodes.kOk: for logFunc in self._log( "get-next-send-next-key-value-failed").errorFunc(): logFunc( "domain.sendNextKeyValue() failed. res=%s, keypath=%s, trxContext=%s, nextKeyValue=%s, next=%s", res, keypath, trxContext, nextKeyValue, next) return ReturnCodes.kGeneralError return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isAutoInitRequested(): valAutoInit = Value() valAutoInit.setEmpty() tagValueList.push(("auto-init", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valAutoInit) if self.isOsDeviceRequested(): valOsDevice = Value() valOsDevice.setEmpty() tagValueList.push(("os-device", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valOsDevice) if self.isImplementationRequested(): valImplementation = Value() valImplementation.setEmpty() tagValueList.push(("implementation", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valImplementation) if self.isRaidTypeRequested(): valRaidType = Value() valRaidType.setEmpty() tagValueList.push(("raid-type", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-disk"), valRaidType) if self.isNameRequested(): valName = Value() 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._fillReadTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log('fill-read-tag-values-status-failed').errorFunc(): logFunc('statusObj._fillReadTagValues() 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-process"), 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-process"), valName) if self.executionObj: valBegin = Value() (tag, ns, prefix) = ( "execution", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-process", "qt-proc") valBegin.setXmlBegin((tag, ns, prefix)) tagValueList.push((tag, ns), valBegin) tagValueListLen = tagValueList.getLen() res = self.executionObj._fillWriteTagValues(tagValueList) if res != ReturnCodes.kOk: for logFunc in self._log( 'fill-write-tag-values-execution-failed').errorFunc(): logFunc( 'executionObj._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.hasId(): valId = Value() if self.id is not None: valId.setString(self.id) else: valId.setEmpty() tagValueList.push(( "id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power" ), valId) if self.hasFruId(): valFruId = Value() if self.fruId is not None: valFruId.setString(self.fruId) else: valFruId.setEmpty() tagValueList.push(( "fru-id", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power" ), valFruId) if self.statusObj: valBegin = Value() (tag, ns, prefix) = ( "status", "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.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 _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isValRequested(): valVal = Value() valVal.setEmpty() tagValueList.push(("val", "http://qwilt.com/model/lake-example"), valVal) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isOpValueRRequested(): valOpValueR = Value() valOpValueR.setEmpty() tagValueList.push(("op-value-r", "http://qwilt.com/model/oper"), valOpValueR) return ReturnCodes.kOk
def getNext (self, trxContext, keypath, next): for logFunc in self._log("get-next").debug3Func(): logFunc("called. keypath=%s, next=%s, trxContext=%s", keypath, next, trxContext) var = 0 isCompleted = True if self.myIsActive: if self.myGetNextFunctor: timeoutGuardName = str(self.myKeyPath) + "-" + "get-next-functor" timeoutGuard = TimeoutGuard(self._log, timeoutGuardName, self.getFunctorTimeout(self.GET_NEXT_FUNCTOR), self.getFunctorMildTimeout(self.GET_NEXT_FUNCTOR)) var_PBR = PassByRef(var) next_PBR = PassByRef(next) isCompleted_PBR = PassByRef(None) res = self.myGetNextFunctor(trxContext, var_PBR, next_PBR, isCompleted_PBR) timeoutGuard.checkAndLog("application problem: functor=%s" % self.myGetNextFunctor.__name__) if res != ReturnCodes.kOk: for logFunc in self._log("get-next-functor-failed").errorFunc(): logFunc( "functor failed. res=%s, keypath=%s, trxContext=%s", res, keypath, trxContext) return ReturnCodes.kGeneralError var = var_PBR.value() next = next_PBR.value() isCompleted = isCompleted_PBR.value() for logFunc in self._log("get-next-send-next-key-functor-returned").debug3Func(): logFunc( "functor returned. keypath=%s, trxContext=%s, var=%s, next=%s, isCompeted=%s", keypath, trxContext, var, next, isCompleted) nextKeyValue = Value() if isCompleted == True: nextKeyValue.setEmpty() else: nextKeyValue.setInt64(var) res = self.myDomain.sendNextKeyValue(trxContext, nextKeyValue, next) if res != ReturnCodes.kOk: for logFunc in self._log("get-next-send-next-key-value-failed").errorFunc(): logFunc( "domain.sendNextKeyValue() failed. res=%s, keypath=%s, trxContext=%s, nextKeyValue=%s, next=%s", res, keypath, trxContext, nextKeyValue, next) return ReturnCodes.kGeneralError return ReturnCodes.kOk;
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isInstanceRequested(): valInstance = Value() valInstance.setEmpty() tagValueList.push( ("instance", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-linux"), valInstance) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isTrimContentItemSizeMbRequested(): valTrimContentItemSizeMb = Value() valTrimContentItemSizeMb.setEmpty() tagValueList.push(("trim-content-item-size-mb", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valTrimContentItemSizeMb) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isMacAddressRequested(): valMacAddress = Value() valMacAddress.setEmpty() tagValueList.push( ("mac-address", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valMacAddress) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isIpValRequested(): valIpVal = Value() valIpVal.setEmpty() tagValueList.push(("ip-val", "http://qwilt.com/model/oper"), valIpVal) if self.isIdRequested(): valId = Value() valId.setEmpty() tagValueList.push(("id", "http://qwilt.com/model/oper"), valId) if self.isValRequested(): valVal = Value() valVal.setEmpty() tagValueList.push(("val", "http://qwilt.com/model/oper"), valVal) if self.isIpPrefixValRequested(): valIpPrefixVal = Value() valIpPrefixVal.setEmpty() tagValueList.push(("ip-prefix-val", "http://qwilt.com/model/oper"), valIpPrefixVal) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isEnabledRequested(): valEnabled = Value() valEnabled.setEmpty() tagValueList.push( ("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line" ), valEnabled) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isDeliveryRequested(): valDelivery = Value() valDelivery.setEmpty() tagValueList.push(("delivery", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valDelivery) if self.isAnalyticsRequested(): valAnalytics = Value() valAnalytics.setEmpty() tagValueList.push(("analytics", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valAnalytics) if self.isCachingPotentialRequested(): valCachingPotential = Value() valCachingPotential.setEmpty() tagValueList.push(("caching-potential", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valCachingPotential) if self.isAcquisitionRequested(): valAcquisition = Value() valAcquisition.setEmpty() tagValueList.push(("acquisition", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content"), valAcquisition) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isColorRequested(): valColor = Value() valColor.setEmpty() tagValueList.push(("color", "http://qwilt.com/model/lake-example"), valColor) if self.isPatternRequested(): valPattern = Value() valPattern.setEmpty() tagValueList.push(("pattern", "http://qwilt.com/model/lake-example"), valPattern) if self.isMacAddressRequested(): valMacAddress = Value() valMacAddress.setEmpty() tagValueList.push(("mac-address", "http://qwilt.com/model/lake-example"), valMacAddress) if self.isLineWidthRequested(): valLineWidth = Value() valLineWidth.setEmpty() tagValueList.push(("line-width", "http://qwilt.com/model/lake-example"), valLineWidth) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isThreadPriorityRequested(): valThreadPriority = Value() valThreadPriority.setEmpty() tagValueList.push(("thread-priority", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valThreadPriority) if self.isSleepMsecRequested(): valSleepMsec = Value() valSleepMsec.setEmpty() tagValueList.push(("sleep-msec", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valSleepMsec) if self.isCountersUpdateIntervalMsecRequested(): valCountersUpdateIntervalMsec = Value() valCountersUpdateIntervalMsec.setEmpty() tagValueList.push(("counters-update-interval-msec", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valCountersUpdateIntervalMsec) if self.isThreadAffinityRequested(): valThreadAffinity = Value() valThreadAffinity.setEmpty() tagValueList.push(("thread-affinity", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valThreadAffinity) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isTestTimeoutMsecRequested(): valTestTimeoutMsec = Value() valTestTimeoutMsec.setEmpty() tagValueList.push(("test-timeout-msec", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valTestTimeoutMsec) if self.isTestIntervalMsecRequested(): valTestIntervalMsec = Value() valTestIntervalMsec.setEmpty() tagValueList.push(("test-interval-msec", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valTestIntervalMsec) if self.isUpPeriodRequested(): valUpPeriod = Value() valUpPeriod.setEmpty() tagValueList.push(("up-period", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valUpPeriod) if self.isDownPeriodRequested(): valDownPeriod = Value() valDownPeriod.setEmpty() tagValueList.push(("down-period", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-interfaces"), valDownPeriod) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isTemperatureWarningReasonRequested(): valTemperatureWarningReason = Value() valTemperatureWarningReason.setEmpty() tagValueList.push(("temperature-warning-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureWarningReason) if self.isTemperatureCriticalReasonRequested(): valTemperatureCriticalReason = Value() valTemperatureCriticalReason.setEmpty() tagValueList.push(("temperature-critical-reason", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureCriticalReason) if self.isTemperatureCriticalRequested(): valTemperatureCritical = Value() valTemperatureCritical.setEmpty() tagValueList.push(("temperature-critical", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureCritical) if self.isTemperatureWarningRequested(): valTemperatureWarning = Value() valTemperatureWarning.setEmpty() tagValueList.push(("temperature-warning", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-temperature"), valTemperatureWarning) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isActualDeliveryInterfaceRequested(): valActualDeliveryInterface = Value() valActualDeliveryInterface.setEmpty() tagValueList.push(( "actual-delivery-interface", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-interfaces" ), valActualDeliveryInterface) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isNumOfCracksRequested(): valNumOfCracks = Value() valNumOfCracks.setEmpty() tagValueList.push(("num-of-cracks", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/generator-test"), valNumOfCracks) if self.isVersionRequested(): valVersion = Value() valVersion.setEmpty() tagValueList.push(("version", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/generator-test"), valVersion) if self.isHealthRequested(): valHealth = Value() valHealth.setEmpty() tagValueList.push(("health", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/generator-test"), valHealth) if self.isLinux_Requested(): valLinux_ = Value() valLinux_.setEmpty() tagValueList.push(("linux", "http://qwilt.com/ns/yang/ut/sys/blinky/example/python/generator-test"), valLinux_) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isQueueUtilizationPercentRequested(): valQueueUtilizationPercent = Value() valQueueUtilizationPercent.setEmpty() tagValueList.push(("queue-utilization-percent", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-reporting"), valQueueUtilizationPercent) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isEnabledRequested(): valEnabled = Value() valEnabled.setEmpty() tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-content-line"), valEnabled) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isLocationRequested(): valLocation = Value() valLocation.setEmpty() tagValueList.push(( "location", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-storage-module" ), valLocation) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isForceOperationalStatusRequested(): valForceOperationalStatus = Value() valForceOperationalStatus.setEmpty() tagValueList.push(("force-operational-status", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-power"), valForceOperationalStatus) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isForceOperationalStatusRequested(): valForceOperationalStatus = Value() valForceOperationalStatus.setEmpty() tagValueList.push(( "force-operational-status", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-fans" ), valForceOperationalStatus) return ReturnCodes.kOk
def _fillReadTagValues (self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isCommandWarningTimeoutRequested(): valCommandWarningTimeout = Value() valCommandWarningTimeout.setEmpty() tagValueList.push(("command-warning-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandWarningTimeout) if self.isCommandTimeoutRequested(): valCommandTimeout = Value() valCommandTimeout.setEmpty() tagValueList.push(("command-timeout", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valCommandTimeout) if self.isEnabledRequested(): valEnabled = Value() valEnabled.setEmpty() tagValueList.push(("enabled", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valEnabled) if self.isSimulationFileRequested(): valSimulationFile = Value() valSimulationFile.setEmpty() tagValueList.push(("simulation-file", "http://qwilt.com/ns/yang/device/tech/qwilt-tech-platform-manager"), valSimulationFile) return ReturnCodes.kOk
def _fillReadTagValues(self, tagValueList): self.myInitGuard.isInitOrCrash() for logFunc in self._log('fill-read-tag-values').debug3Func(): logFunc('called: tagValueList=%s', tagValueList) if self.isEyeNumberRequested(): valEyeNumber = Value() valEyeNumber.setEmpty() tagValueList.push(("eye-number", "http://qwilt.com/model/family"), valEyeNumber) if self.isTransparentFieldRequested(): valTransparentField = Value() valTransparentField.setEmpty() tagValueList.push( ("transparent-field", "http://qwilt.com/model/family"), valTransparentField) if self.isIdRequested(): valId = Value() valId.setEmpty() tagValueList.push(("id", "http://qwilt.com/model/family"), valId) if self.isHasTailRequested(): valHasTail = Value() valHasTail.setEmpty() tagValueList.push(("has-tail", "http://qwilt.com/model/family"), valHasTail) return ReturnCodes.kOk