void EntityImporterBase::createRule(const Atlas::Objects::Root & obj, OpVector & res)
{
    m_state = RULE_CREATING;
    Atlas::Objects::Operation::Create createOp;
    createOp->setFrom(mAccountId);
    createOp->setArgs1(obj);

    createOp->setSerialno(newSerialNumber());
    S_LOG_INFO("Creating new rule '" << obj->getId() << "' on server.");
    res.push_back(createOp);
}
Beispiel #2
0
int OpRuleHandler::installOpDefinition(const std::string & class_name,
                                       const std::string & parent,
                                       const Atlas::Objects::Root & class_desc,
                                       std::string & dependent,
                                       std::string & reason)
{
    assert(class_name == class_desc->getId());

    Inheritance & i = Inheritance::instance();

    if (!i.hasClass(parent)) {
        debug(std::cout << "op_definition \"" << class_name
                        << "\" has non existant parent \"" << parent
                        << "\". Waiting." << std::endl << std::flush;);