[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH matahari] Fixes the parent reference for a Processors agent.



Signed-off-by: Darryl L. Pierce <dpierce redhat com>
---
 src/host.cpp       |    2 +-
 src/processors.cpp |    4 ++--
 src/processors.h   |    2 +-
 src/schema.xml     |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/host.cpp b/src/host.cpp
index 44c7717..ac04f47 100644
--- a/src/host.cpp
+++ b/src/host.cpp
@@ -82,7 +82,7 @@ void HostWrapper::setupQMFObjects(ManagementAgent *agent)
     agent->addObject(mgmt_object);
     syncQMFHostObject();
 
-    processors.setup(agent);
+    processors.setup(agent, this);
 
     // Iterate over list and set up CPU objects
     for (vector<CPUWrapper*>::iterator iter = cpus.begin();
diff --git a/src/processors.cpp b/src/processors.cpp
index 3edc417..4317b1f 100644
--- a/src/processors.cpp
+++ b/src/processors.cpp
@@ -37,10 +37,10 @@ namespace _qmf = qmf::com::redhat::matahari;
 extern DBusError dbus_error;
 
 void
-ProcessorsAgent::setup(ManagementAgent* agent)
+ProcessorsAgent::setup(ManagementAgent* agent, Manageable* parent)
 {
   // setup the management object
-  management_object = new _qmf::Processors(agent, this);
+  management_object = new _qmf::Processors(agent, this, parent);
   agent->addObject(management_object);
 
   LibHalContext* context = get_hal_ctx();
diff --git a/src/processors.h b/src/processors.h
index 008ce11..3e46b16 100644
--- a/src/processors.h
+++ b/src/processors.h
@@ -40,7 +40,7 @@ class ProcessorsAgent : public Manageable
 
   ManagementObject* GetManagementObject(void) const { return management_object; }
 
-  void setup(ManagementAgent* agent);
+  void setup(ManagementAgent* agent, Manageable* parent);
 
   // agent methods
   void update_load_averages(void) const;
diff --git a/src/schema.xml b/src/schema.xml
index 48e9576..f9c6f6b 100644
--- a/src/schema.xml
+++ b/src/schema.xml
@@ -16,7 +16,7 @@
 
   <!-- The processor for the node. -->
   <class name="Processors">
-    <property name="node"   type="objId" access="RO" desc="The managed node." />
+    <property name="host"   type="objId" access="RC" desc="The host machine." index="y" references="Host" parentRef="y" />
     <property name="model"  type="lstr"  access="RO" desc="The processor label." />
     <property name="cores"  type="int8"  access="RO" desc="The number of cores." />
 
-- 
1.6.6.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]