from pyosaf.saImm import SaImmAttrNameT, SaImmAttrValuesT_2, SaImmClassNameT, \ SaImmSearchParametersT_2, eSaImmValueTypeT, SaImmAttrModificationT_2, \ eSaImmAttrModificationTypeT from pyosaf.saImmOi import SaImmOiHandleT from pyosaf.utils import log_err, bad_handle_retry, decorate, \ initialize_decorate from pyosaf.utils.immom.object import ImmObject from pyosaf.utils.immom.ccb import marshal_c_array from pyosaf.utils.immom.iterator import SearchIterator from pyosaf.utils.immom.agent import ImmOmAgent from pyosaf.utils.immom.accessor import ImmOmAccessor OPENSAF_IMM_OBJECT = "opensafImm=opensafImm,safApp=safImmService" # Decorate pure saImmOi* API's with error-handling retry and exception raising saImmOiInitialize_2 = initialize_decorate(saImmOi.saImmOiInitialize_2) saImmOiSelectionObjectGet = decorate(saImmOi.saImmOiSelectionObjectGet) saImmOiDispatch = decorate(saImmOi.saImmOiDispatch) saImmOiFinalize = decorate(saImmOi.saImmOiFinalize) saImmOiImplementerSet = decorate(saImmOi.saImmOiImplementerSet) saImmOiImplementerClear = decorate(saImmOi.saImmOiImplementerClear) saImmOiClassImplementerSet = decorate(saImmOi.saImmOiClassImplementerSet) saImmOiClassImplementerRelease = \ decorate(saImmOi.saImmOiClassImplementerRelease) saImmOiObjectImplementerSet = decorate(saImmOi.saImmOiObjectImplementerSet) saImmOiObjectImplementerRelease = \ decorate(saImmOi.saImmOiObjectImplementerRelease) saImmOiRtObjectCreate_2 = decorate(saImmOi.saImmOiRtObjectCreate_2) saImmOiRtObjectDelete = decorate(saImmOi.saImmOiRtObjectDelete) saImmOiRtObjectUpdate_2 = decorate(saImmOi.saImmOiRtObjectUpdate_2) saImmOiAdminOperationResult = decorate(saImmOi.saImmOiAdminOperationResult)
# This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed # under the GNU Lesser General Public License Version 2.1, February 1999. # The complete license can be accessed from the following location: # http://opensource.org/licenses/lgpl-license.php # See the Copying file included with the OpenSAF distribution for full # licensing terms. # # Author(s): Ericsson # ############################################################################ """ LOG common utilities """ from pyosaf.saAis import SaVersionT from pyosaf import saLog from pyosaf.utils import decorate, initialize_decorate LOG_VERSION = SaVersionT('A', 2, 1) # Decorate pure saLog* API's with error-handling retry and exception raising saLogInitialize = initialize_decorate(saLog.saLogInitialize) saLogSelectionObjectGet = decorate(saLog.saLogSelectionObjectGet) saLogDispatch = decorate(saLog.saLogDispatch) saLogFinalize = decorate(saLog.saLogFinalize) saLogStreamOpen_2 = decorate(saLog.saLogStreamOpen_2) saLogStreamOpenAsync_2 = decorate(saLog.saLogStreamOpenAsync_2) saLogWriteLog = decorate(saLog.saLogWriteLog) saLogWriteLogAsync = decorate(saLog.saLogWriteLogAsync) saLogStreamClose = decorate(saLog.saLogStreamClose) saLogLimitGet = decorate(saLog.saLogLimitGet)
# licensing terms. # # Author(s): Ericsson # ############################################################################ # pylint: disable=unused-argument,too-few-public-methods """ NTF utils common data structures and functions """ from copy import deepcopy from pyosaf.saAis import saAis, SaVersionT, SaSelectionObjectT, eSaAisErrorT from pyosaf import saNtf from pyosaf.utils import decorate, initialize_decorate, log_err # Decorate pure saNtf* API's with error-handling retry and exception raising # Library Life Cycle API's saNtfInitialize = initialize_decorate(saNtf.saNtfInitialize) saNtfInitialize_2 = initialize_decorate(saNtf.saNtfInitialize_2) saNtfInitialize_3 = initialize_decorate(saNtf.saNtfInitialize_3) saNtfSelectionObjectGet = decorate(saNtf.saNtfSelectionObjectGet) saNtfDispatch = decorate(saNtf.saNtfDispatch) saNtfFinalize = decorate(saNtf.saNtfFinalize) # Producer API's saNtfObjectCreateDeleteNotificationAllocate = \ decorate(saNtf.saNtfObjectCreateDeleteNotificationAllocate) saNtfAttributeChangeNotificationAllocate = \ decorate(saNtf.saNtfAttributeChangeNotificationAllocate) saNtfStateChangeNotificationAllocate = \ decorate(saNtf.saNtfStateChangeNotificationAllocate) saNtfStateChangeNotificationAllocate_3 = \ decorate(saNtf.saNtfStateChangeNotificationAllocate_3) saNtfAlarmNotificationAllocate = decorate(saNtf.saNtfAlarmNotificationAllocate)
# Author(s): Ericsson # ############################################################################ """ IMM OM common utilities """ import uuid from copy import deepcopy from ctypes import pointer from pyosaf import saImmOm, saImm from pyosaf.saAis import saAis, SaVersionT, SaNameT, SaAisErrorT, \ eSaAisErrorT, eSaBoolT, unmarshalNullArray, SaStringT from pyosaf.saImm import eSaImmScopeT, SaImmClassNameT, SaImmAttrNameT from pyosaf.utils import decorate, initialize_decorate, log_err # Decorate pure saImmOm* API's with error-handling retry and exception raising saImmOmInitialize = initialize_decorate(saImmOm.saImmOmInitialize) saImmOmSelectionObjectGet = decorate(saImmOm.saImmOmSelectionObjectGet) saImmOmDispatch = decorate(saImmOm.saImmOmDispatch) saImmOmFinalize = decorate(saImmOm.saImmOmFinalize) saImmOmClassCreate_2 = decorate(saImmOm.saImmOmClassCreate_2) saImmOmClassDescriptionGet_2 = decorate(saImmOm.saImmOmClassDescriptionGet_2) saImmOmClassDescriptionMemoryFree_2 = \ decorate(saImmOm.saImmOmClassDescriptionMemoryFree_2) saImmOmClassDelete = decorate(saImmOm.saImmOmClassDelete) saImmOmSearchInitialize_2 = decorate(saImmOm.saImmOmSearchInitialize_2) saImmOmSearchNext_2 = decorate(saImmOm.saImmOmSearchNext_2) saImmOmSearchFinalize = decorate(saImmOm.saImmOmSearchFinalize) saImmOmAccessorInitialize = decorate(saImmOm.saImmOmAccessorInitialize) saImmOmAccessorGet_2 = decorate(saImmOm.saImmOmAccessorGet_2) saImmOmAccessorFinalize = decorate(saImmOm.saImmOmAccessorFinalize) saImmOmAdminOwnerInitialize = decorate(saImmOm.saImmOmAdminOwnerInitialize)
# Author(s): Ericsson # ############################################################################ # pylint: disable=unused-argument """ CLM common utilities """ from copy import deepcopy from pyosaf.saAis import saAis, SaVersionT, eSaAisErrorT, eSaDispatchFlagsT from pyosaf import saClm from pyosaf.utils import decorate, initialize_decorate, deprecate, \ bad_handle_retry, log_err, SafException _clm_agent = None # Decorate pure saClm* API's with error-handling retry and exception raising saClmInitialize = initialize_decorate(saClm.saClmInitialize) saClmInitialize_3 = initialize_decorate(saClm.saClmInitialize_3) saClmInitialize_4 = initialize_decorate(saClm.saClmInitialize_4) saClmSelectionObjectGet = decorate(saClm.saClmSelectionObjectGet) saClmDispatch = decorate(saClm.saClmDispatch) saClmFinalize = decorate(saClm.saClmFinalize) saClmClusterTrack = decorate(saClm.saClmClusterTrack) saClmClusterTrack_4 = decorate(saClm.saClmClusterTrack_4) saClmClusterTrackStop = decorate(saClm.saClmClusterTrackStop) saClmClusterNotificationFree = decorate(saClm.saClmClusterNotificationFree) saClmClusterNotificationFree_4 = decorate(saClm.saClmClusterNotificationFree_4) saClmClusterNodeGet = decorate(saClm.saClmClusterNodeGet) saClmClusterNodeGet_4 = decorate(saClm.saClmClusterNodeGet_4) saClmClusterNodeGetAsync = decorate(saClm.saClmClusterNodeGetAsync) saClmResponse_4 = decorate(saClm.saClmResponse_4)