Exemple #1
0
int
SrvAgent::setup(qmf::AgentSession session)
{
#ifdef __linux__
    standards.push_back("ocf");
#endif
    standards.push_back("lsb");
#ifndef WIN32
    standards.push_back("windows");
#endif

    _package.configure(session);

    _services = qmf::Data(_package.data_Services);

    _services.setProperty("uuid", mh_uuid());
    _services.setProperty("hostname", mh_hostname());

    session.addData(_services, "Services");

    _resources = qmf::Data(_package.data_Resources);

    _resources.setProperty("uuid", mh_uuid());
    _resources.setProperty("hostname", mh_hostname());

    session.addData(_resources, "Resources");

    return 0;
}
int
NetAgent::setup(qmf::AgentSession session)
{
    _package.configure(session);
    _instance = qmf::Data(_package.data_Network);

    _instance.setProperty("hostname", mh_hostname());
    _instance.setProperty("uuid", mh_uuid());

    session.addData(_instance, NETWORK_NAME);
    return 0;
}