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; }
void MatahariAgentImpl::registerAgent(void) { qmf::Schema data_Agent(qmf::SCHEMA_TYPE_DATA, "org.matahariproject", "Agent"); { qmf::SchemaProperty prop("hostname", qmf::SCHEMA_DATA_STRING); prop.setAccess(qmf::ACCESS_READ_ONLY); prop.setIndex(true); prop.setDesc("Hostname"); data_Agent.addProperty(prop); } { qmf::SchemaProperty prop("uuid", qmf::SCHEMA_DATA_STRING); prop.setAccess(qmf::ACCESS_READ_ONLY); prop.setIndex(true); prop.setDesc("Filesystem Host UUID"); data_Agent.addProperty(prop); } _agent_session.registerSchema(data_Agent); _agent_instance = qmf::Data(data_Agent); _agent_instance.setProperty("uuid", mh_uuid()); _agent_instance.setProperty("hostname", mh_hostname()); _agent_session.addData(_agent_instance); }
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; }