#include "mgr/MgrContext.h"
-// For ::config_prefix
+// For ::mgr_store_prefix
#include "PyModule.h"
#include "PyModuleRegistry.h"
#include "PyUtil.h"
without_gil_t no_gil;
std::lock_guard l(lock);
- const std::string global_key = PyModule::config_prefix
+ const std::string global_key = PyModule::mgr_store_prefix
+ module_name + "/" + key;
dout(4) << __func__ << " key: " << global_key << dendl;
std::lock_guard l(lock);
std::lock_guard lock(module_config.lock);
- const std::string base_prefix = PyModule::config_prefix
+ const std::string base_prefix = PyModule::mgr_store_prefix
+ module_name + "/";
const std::string global_prefix = base_prefix + prefix;
dout(4) << __func__ << " prefix: " << global_prefix << dendl;
void ActivePyModules::set_store(const std::string &module_name,
const std::string &key, const boost::optional<std::string>& val)
{
- const std::string global_key = PyModule::config_prefix
+ const std::string global_key = PyModule::mgr_store_prefix
+ module_name + "/" + key;
Command set_cmd;
dout(20) << "saw key '" << key << "'" << dendl;
- const std::string store_prefix = PyModule::config_prefix;
+ const std::string store_prefix = PyModule::mgr_store_prefix;
const std::string device_prefix = "device/";
if (key.substr(0, device_prefix.size()) == device_prefix ||
#define dout_prefix *_dout << "mgr[py] "
// definition for non-const static member
-std::string PyModule::config_prefix = "mgr/";
+std::string PyModule::mgr_store_prefix = "mgr/";
// Courtesy of http://stackoverflow.com/questions/1418015/how-to-get-python-exception-text
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
std::map<std::string, MgrMap::ModuleOption> options;
public:
- static std::string config_prefix;
+ static std::string mgr_store_prefix;
SafeThreadState pMyThreadState;
PyObject *pClass = nullptr;
#include "mgr/MgrContext.h"
#include "mgr/Gil.h"
-// For ::config_prefix
+// For ::mgr_store_prefix
#include "PyModuleRegistry.h"
#define dout_context g_ceph_context
std::string *value) const
{
- const std::string global_key = PyModule::config_prefix
+ const std::string global_key = PyModule::mgr_store_prefix
+ get_name() + "/" + key;
dout(4) << __func__ << " key: " << global_key << dendl;