CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Namespaces | Functions
CondDBPyBind11Wrappers.cc File Reference
#include "CondCore/CondDB/interface/CredentialStore.h"
#include "CondCore/CondDB/interface/Auth.h"
#include <cstdlib>
#include <pybind11/pybind11.h>

Go to the source code of this file.

Namespaces

 cond
 

Functions

std::tuple< std::string,
std::string, std::string > 
cond::getDbCredentials (const std::string &connectionString, int accessType, const std::string &authPath)
 
 PYBIND11_MODULE (libCondDBPyBind11Interface, m)
 

Function Documentation

PYBIND11_MODULE ( libCondDBPyBind11Interface  ,
 
)

Definition at line 32 of file CondDBPyBind11Wrappers.cc.

References cond::auth::ADMIN_ROLE, cond::auth::DEFAULT_ROLE, cond::getDbCredentials(), visualization-live-secondInstance_cfg::m, cond::auth::READER_ROLE, and cond::auth::WRITER_ROLE.

32  {
33  m.def("get_credentials_from_db", &cond::getDbCredentials, "Get db credentials for a connection string");
34  m.attr("default_role") = pybind11::int_(int(cond::auth::DEFAULT_ROLE));
35  m.attr("reader_role") = pybind11::int_(int(cond::auth::READER_ROLE));
36  m.attr("writer_role") = pybind11::int_(int(cond::auth::WRITER_ROLE));
37  m.attr("admin_role") = pybind11::int_(int(cond::auth::ADMIN_ROLE));
38 }
std::tuple< std::string, std::string, std::string > getDbCredentials(const std::string &connectionString, int accessType, const std::string &authPath)