python-module/cpplmodule.cc
/**
 * Get a string that describes the reason of the policy results. Only use after cppl_evaluate.
 *
 * Note that if the policy is not fulfilled, cppl_get_reason will require significantly
 * more time compared to a fulfilled policy. Thus, checking unfulfilled policies for
 * a reason can significantly can result in significant performance drops.
 */
Get a string that describes the reason of the policy results. Only use after cppl_evaluate.
Note that if the policy is not fulfilled, cppl_get_reason will require significantly
more time compared to a fulfilled policy. Thus, checking unfulfilled policies for
a reason can significantly can result in significant performance drops.
Get a string that describes the reason of the policy results . Only use after cppl_evaluate . Note that if the policy is not fulfilled cppl_get_reason will require significantly more time compared to a fulfilled policy . Thus checking unfulfilled policies for a reason can significantly can result in significant performance drops .
static PyObject *cpplmodule_get_reason(PyObject *self, PyObject *args)
{
  PyObject *retval;
  long long ps_key, pd_key;
  string ret;
  PolicyStack *compressed_policy;
  PolicyDefinition *pd;
  if (!PyArg_ParseTuple(args, "LL", &ps_key, &pd_key)) {
    return NULL;
  }
  compressed_policy = ps_list.at(ps_key);
  pd = pd_list.at(pd_key);
  ret = cppl_get_reason(compressed_policy, pd);
  retval = Py_BuildValue("s", ret.c_str());
  return retval;
}
static PyObject * cpplmodule_get_reason ( PyObject * self , PyObject * args ) { PyObject * retval ; long long ps_key , pd_key ; string ret ; PolicyStack * compressed_policy ; PolicyDefinition * pd ; if ( ! PyArg_ParseTuple ( args , " " , & ps_key , & pd_key ) ) { return NULL ; } compressed_policy = ps_list . at ( ps_key ) ; pd = pd_list . at ( pd_key ) ; ret = cppl_get_reason ( compressed_policy , pd ) ; retval = Py_BuildValue ( " " , ret . c_str ( ) ) ; return retval ; }
Get a string that describes the reason of the policy results.
Get a string that describes the reason of the policy results .