search for: management_object

Displaying 10 results from an estimated 10 matches for "management_object".

2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...:iterator iter = cpus.begin(); - iter!= cpus.end(); - iter++) { - output << **iter << endl; - } - for (vector<NICWrapper*>::iterator iter = nics.begin(); - iter!= nics.end(); - iter++) { - output << **iter << endl; + management_object = new _qmf::Host(agent, this); + agent->addObject(management_object); + + // discover the aspects of the host + processors.setup(agent, this); + + LibHalContext *hal_ctx; + int ret; + + // Get our HAL Context or die trying + hal_ctx = get_hal_ctx(); + if (!hal_ctx) + throw runtime_err...
2010 Apr 19
1
[PATCH matahari] Replaces the existing HAL code for ProcessorAgent with udev.
...include <libudev.h> +} using namespace std; namespace _qmf = qmf::com::redhat::matahari; -extern DBusError dbus_error; - void ProcessorsAgent::setup(ManagementAgent* agent, Manageable* parent) { @@ -43,17 +37,79 @@ ProcessorsAgent::setup(ManagementAgent* agent, Manageable* parent) management_object = new _qmf::Processors(agent, this, parent); agent->addObject(management_object); - LibHalContext* context = get_hal_ctx(); + int core_count = 0; + string model = "unknown"; + + struct udev* udev = udev_new(); + struct udev_enumerate* enumerator = udev_enumerate_new(udev); +...
2010 May 19
2
Squashed commits...
Refactoring the previous patch ended up creating two deltas. This patch pushes them both together into a single commit.
2010 Mar 22
1
Resend with loadavg as a statistic...
After some feedback from Slow, mainly about the load_average API being a method rather than an ongoing statistic. So I've converted the code over to instead update the load average statistic on a regular basis.
2010 Apr 21
1
[PATCH matahari] Created a new platform-abstraction layer named Platform.
...TODO remove this wrapper once rhbz#583747 is fixed -extern "C" { -#include <libudev.h> -} +#include "platform.h" using namespace std; namespace _qmf = qmf::com::redhat::matahari; @@ -37,79 +30,10 @@ ProcessorsAgent::setup(ManagementAgent* agent, Manageable* parent) management_object = new _qmf::Processors(agent, this, parent); agent->addObject(management_object); - int core_count = 0; - string model = "unknown"; - - struct udev* udev = udev_new(); - struct udev_enumerate* enumerator = udev_enumerate_new(udev); - - udev_enumerate_add_match_property(enumer...
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...kDeviceAgent>::iterator iter = networkdevices.begin(); + iter != networkdevices.end(); + iter++) + { + iter->setup(agent, this); + } struct utsname details; string uuid = "Unknown"; @@ -94,20 +103,17 @@ HostAgent::setup(ManagementAgent* agent) management_object->set_arch(architecture); management_object->set_memory(memory); management_object->set_beeping(beeping); - - NICWrapper::fillNICInfo(this->nics, agent); - - // setup the nic objects - for(vector<NICWrapper*>::iterator iter = nics.begin(); - iter != nics.end(); -...
2010 Mar 16
0
[PATCH] Added the new Processors agent.
...t;processors.h" + +#include "qmf/com/redhat/matahari/ArgsProcessorsGet_load_average.h" + +using namespace std; +namespace _qmf = qmf::com::redhat::matahari; + +extern DBusError dbus_error; + +void +ProcessorsAgent::setup(ManagementAgent* agent) +{ + // setup the management object + management_object = new _qmf::Processors(agent, this); + agent->addObject(management_object); + + LibHalContext* context = get_hal_ctx(); + + int num_results; + char** processors = libhal_find_device_by_capability(context,"processor", &num_results, &dbus_error); + + if (!processors) + th...
2010 Mar 22
1
Small change and resend...
This patch includes one small change: the Processors::get_load_average() method is now const since it does not change the object's state.
2010 May 13
0
[PATCH matahari] Moving QMF functionality into a transport layer.
...orm.h" -#include "qmf/com/redhat/matahari/Host.h" -using namespace qpid::management; using namespace std; -using qpid::management::Manageable; -namespace _qmf = qmf::com::redhat::matahari; - void -HostAgent::setup(ManagementAgent* agent) +Host::set_uuid(const string uuid) { - management_object = new _qmf::Host(agent, this); - agent->addObject(management_object); - - // discover the aspects of the host - processors.setup(agent, this); - networkdevices = Platform::instance()->get_network_devices(); - - for(vector<NetworkDeviceAgent>::iterator iter = networkdevices.begin();...
2010 Apr 26
2
Patch supercedes previous patch...
In looking at the code I realized that the last of the HAL depenencies were removed with this patch. So, I'm pushing an updated patch that contains none of the HAL code in it.