"Fossies" - the Fresh Open Source Software Archive

Member "opensaf-5.21.09/src/osaf/immtools/imm_modify_config/add_operation_to_ccb.h" (1 Jun 2021, 3245 Bytes) of package /linux/misc/opensaf-5.21.09.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "add_operation_to_ccb.h" see the Fossies "Dox" file reference documentation.

    1 /*      -*- OpenSAF  -*-
    2  *
    3  * (C) Copyright 2008 The OpenSAF Foundation
    4  * Copyright Ericsson AB 2018 - All Rights Reserved.
    5  *
    6  * This program is distributed in the hope that it will be useful, but
    7  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
    8  * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
    9  * under the GNU Lesser General Public License Version 2.1, February 1999.
   10  * The complete license can be accessed from the following location:
   11  * http://opensource.org/licenses/lgpl-license.php
   12  * See the Copying file included with the OpenSAF distribution for full
   13  * licensing terms.
   14  *
   15  * Author(s): Ericsson AB
   16  *
   17  */
   18 
   19 #include <string>
   20 #include <vector>
   21 
   22 #include "osaf/immtools/imm_modify_config/immccb.h"
   23 
   24 #include "ais/include/saImm.h"
   25 #include "ais/include/saAis.h"
   26 
   27 // The functions in here are helper functions that wraps some of the IMM APIs
   28 // in imm_om_ccapi directory adapting them to how the input data for CCBs are
   29 // handled in the ObjectModification class
   30 
   31 #ifndef OSAF_IMMTOOLS_IMM_MODIFY_CONFIG_ADD_OPERATION_TO_CCB_H_
   32 #define OSAF_IMMTOOLS_IMM_MODIFY_CONFIG_ADD_OPERATION_TO_CCB_H_
   33 
   34 namespace modelmodify {
   35 
   36 // Get AIS error information. Has valid information if add operation returns
   37 // kFail. See immccb.h ErrorInformation
   38 void GetAddToCbbErrorInfo(ErrorInformation *error_info);
   39 
   40 // Check if the reason for SA_AIS_ERR_FAILED_OPERATION is a "resorce abort"
   41 // Can be used immediately after an add operation or an apply operation has
   42 // returned SA_AIS_ERR_FAILED_OPERATION
   43 // Note:  SA_AIS_ERR_FAILED_OPERATION can be returned for two reasons:
   44 //        1.  Validation error.
   45 //            This is a Fail. Cannot be recovered
   46 //        2.  Resource abort.
   47 bool IsResorceAbort(const SaImmCcbHandleT& ccbHandle);
   48 
   49 // Add one create operation to a CCB
   50 // Recovery:  BAD HANDLE; kRestartOm
   51 //            FAILED OPERATION; kRestartOm or kFail
   52 //            BUSY; An admin operation is ongoing on an object to be deleted
   53 //                  We can try again to add the create
   54 // return: Recovery information. See immccb.h
   55 int AddCreateToCcb(const SaImmCcbHandleT& ccb_handle,
   56                          const CreateDescriptor&
   57                          create_descriptor);
   58 
   59 // Add one delete operation to a CCB
   60 // Recovery:  BAD HANDLE; kRestartOm
   61 //            FAILED OPERATION; kRestartOm or kFail
   62 //            BUSY; An admin operation is ongoing on an object to be deleted
   63 //                  We can try again to add the create
   64 // return: Recovery information. See immccb.h
   65 int AddDeleteToCcb(const SaImmCcbHandleT& ccb_handle,
   66                          const DeleteDescriptor&
   67                          delete_descriptor);
   68 
   69 // Add one modify operation to a CCB
   70 // Recovery:  BAD HANDLE; kRestartOm
   71 //            FAILED OPERATION; kRestartOm or kFail
   72 //            BUSY; An admin operation is ongoing on an object to be modified
   73 //                  We can try again to add the modify
   74 // return: Recovery information. See immccb.h
   75 int AddModifyToCcb(const SaImmCcbHandleT& ccb_handle,
   76                          const ModifyDescriptor&
   77                          modify_descriptor);
   78 
   79 }  // namespace modelmodify
   80 
   81 #endif // OSAF_IMMTOOLS_IMM_MODIFY_CONFIG_ADD_OPERATION_TO_CCB_H_