ECFErr SqlhaCMAPI_Corosync::SqlhaCMAPI_Corosync_CorosyncCertificate ( const std::string & DomainName, const std::string & DeviceName, const std::vector<std::string> & nodeList ) { ECFErr rc = ECF_OK ; PCMK_RC vRC = PCMK_SUCCESS ; PCMKCorosyncCertificateParam certificateParam ; Uint probe = 0 ; certificateParam.DomainName = strDomainName ; certificateParam.DeviceName = strDeviceName ; for (const auto& node : m_Nodes) { certificateParam.nodeList.insert(node.name); } pdTraceEntry(SQLT_SqlhaCMAPI_Corosync_CorosyncCertificate); vRC = g_pcmkAPITable[SQLHA_CM_API_PCMK_COROSYNC_CERTIFICATE].pcmkFunctionp( &certificateParam ) ; if ( PCMK_SUCCESS != vRC ) { rc = ECF_SQLHA_FAILED ; pdLog( PD_DEV, SQLT_SqlhaCMAPI_Corosync_CorosyncCertificate, rc, __LINE__, PD_LEVEL_ERR, PD_3TUPLES_BEGIN, PD_MESSAGE( "Failed to add quorum certificate." ), PD_UINT( vRC ), PD_3TUPLES_END ) ; } EXIT: pdTraceExit( SQLT_SqlhaCMAPI_Corosync_CorosyncCertificate, rc ) ; return rc ; ERROR_param_uninitialized: rc = ECF_INVALID_PARAMETER ; pdLog( PD_DEV, SQLT_SqlhaCMAPI_Corosync_CorosyncCertificate, rc, probe, PD_LEVEL_ERR, PD_3TUPLES_BEGIN, PD_MESSAGE( "The input parameter is NULL." ), //PD_UINT( m_quorumType ), //PD_STRING( strDomainName.c_str() ), // PD_STRING( strDeviceName.c_str() ), PD_3TUPLES_END ) ; goto EXIT ; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)