Also included all of the new APIs, but did not provide the backing implementation. Those will be included in followup patches.
Signed-off-by: Darryl L. Pierce dpierce@redhat.com --- src/Makefile.am | 16 ++++++------ src/main.cpp | 4 +- src/qmf/hostagent.cpp | 3 +- src/qmf/hostagent.h | 4 +- src/schema.xml | 62 ++++++++++++++++++++++++++----------------------- 5 files changed, 46 insertions(+), 43 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 6182fb1..daddf9d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,12 +10,12 @@ AM_CXXFLAGS = $(INCLUDES) sbin_PROGRAMS = matahari
generated_file_list = \ - qmf/com/redhat/matahari/EventHeartbeat.cpp \ - qmf/com/redhat/matahari/EventHeartbeat.h \ - qmf/com/redhat/matahari/Host.cpp \ - qmf/com/redhat/matahari/Host.h \ - qmf/com/redhat/matahari/Package.cpp \ - qmf/com/redhat/matahari/Package.h + qmf/com/redhat/matahari/host/EventHeartbeat.cpp \ + qmf/com/redhat/matahari/host/EventHeartbeat.h \ + qmf/com/redhat/matahari/host/Host.cpp \ + qmf/com/redhat/matahari/host/Host.h \ + qmf/com/redhat/matahari/host/Package.cpp \ + qmf/com/redhat/matahari/host/Package.h
nodist_matahari_SOURCES = $(generated_file_list) config.h
@@ -30,8 +30,8 @@ matahari_SOURCES = \ $(generated_file_list): schema.xml qmf-gen -o ./qmf ./schema.xml
-BUILT_SOURCES = $(generated_file_list) $(first) -CLEANFILES = $(generated_file_list) $(first) +BUILT_SOURCES = $(generated_file_list) +CLEANFILES = $(generated_file_list)
matahari_CPPFLAGS = -fno-strict-aliasing matahari_LDADD = -lpcre -lqmf -lqpidclient -lqpidcommon -ludev -lvirt diff --git a/src/main.cpp b/src/main.cpp index 27b2434..f7d6329 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,12 +36,12 @@
#include "qmf/hostagent.h"
-#include "qmf/com/redhat/matahari/Package.h" +#include "qmf/com/redhat/matahari/host/Package.h"
using namespace qpid::management; using namespace qpid::client; using namespace std; -namespace _qmf = qmf::com::redhat::matahari; +namespace _qmf = qmf::com::redhat::matahari::host;
// Global Variables ManagementAgent::Singleton* singleton; diff --git a/src/qmf/hostagent.cpp b/src/qmf/hostagent.cpp index 94004d5..b28c5c5 100644 --- a/src/qmf/hostagent.cpp +++ b/src/qmf/hostagent.cpp @@ -21,7 +21,7 @@ #include "hostagent.h" #include <qpid/agent/ManagementAgent.h>
-#include "qmf/com/redhat/matahari/EventHeartbeat.h" +#include "qmf/com/redhat/matahari/host/EventHeartbeat.h"
HostAgent::HostAgent() { @@ -45,7 +45,6 @@ HostAgent::setup(ManagementAgent* agent) _management_object->set_hypervisor(host_get_hypervisor()); _management_object->set_arch(host_get_architecture()); _management_object->set_memory(host_get_memory()); - _management_object->set_beeping(false);
_management_object->set_cpu_model(host_get_cpu_model()); _management_object->set_cpu_cores(host_get_number_of_cpu_cores()); diff --git a/src/qmf/hostagent.h b/src/qmf/hostagent.h index 7f7bbaa..d1f3bc1 100644 --- a/src/qmf/hostagent.h +++ b/src/qmf/hostagent.h @@ -26,12 +26,12 @@ #include "host.h" #include "hostlistener.h"
-#include "qmf/com/redhat/matahari/Host.h" +#include "qmf/com/redhat/matahari/host/Host.h"
using namespace qpid::management; using namespace std;
-namespace _qmf = qmf::com::redhat::matahari; +namespace _qmf = qmf::com::redhat::matahari::host;
class HostAgent : public Manageable, public HostListener { diff --git a/src/schema.xml b/src/schema.xml index 20fd9bc..76e1371 100644 --- a/src/schema.xml +++ b/src/schema.xml @@ -1,31 +1,35 @@ -<schema package="com.redhat.matahari"> - - <class name="Host"> - - <!-- general properties --> - <property name="uuid" type="sstr" access="RO" desc="Host UUID" index="y"/> - <property name="hostname" type="sstr" access="RO" desc="Hostname"/> - <property name="memory" type="int64" access="RO" desc="Amount of primary memory for host (kb)" unit="kb"/> - <property name="hypervisor" type="sstr" access="RO" desc="Hypervisor used by host"/> - <property name="arch" type="sstr" access="RO" desc="Architecture of host"/> - <property name="beeping" type="bool" access="RW" desc="speaker beep loop active? (used to identify host)"/> - - <!-- CPU properties --> - <property name="cpu_model" type="lstr" access="RO" desc="The process model description." /> - <property name="cpu_cores" type="uint8" access="RO" desc="The number of processor cores." /> - <statistic name="load_average" type="double" desc="The current processing load average." /> - - <!-- APIs --> - <method name="shutdown" desc="Shutdown node" /> - <method name="reboot" desc="Reboot node" /> - - </class> - - <eventArguments> - <arg name="timestamp" type="absTime" /> - <arg name="sequence" type="uint32" /> - </eventArguments> - - <event name="heartbeat" args="timestamp,sequence" /> +<schema package="com.redhat.matahari.host"> + + <class name="Host"> + <!-- properties --> + <property name="uuid" type="sstr" access="RO" desc="Host UUID" index="y" /> + <property name="hostname" type="sstr" access="RO" desc="Hostname" /> + <property name="is_virtual" type="bool" access="RO" desc="Is this machine virtual?" /> + <property name="operating_system" type="sstr" access="RO" desc="The installed operating system." /> + <property name="memory" type="int64" access="RO" desc="Amount of primary memory for host (kb)" unit="kb" /> + <property name="arch" type="sstr" access="RO" desc="Architecture of host" /> + <property name="hypervisor" type="sstr" access="RO" desc="Hypervisor used by host" /> + <property name="platform" type="sstr" access="RO" desc="The wordsize for the host." /> + <property name="cpu_model" type="lstr" access="RO" desc="The process model description." /> + <property name="cpu_cores" type="uint8" access="RO" desc="The number of processor cores." /> + + <!-- statistics --> + <statistic name="last_updated" type="absTime" desc="The last time a heartbeat occurred." /> + <statistic name="load_average" type="double" desc="The current processing load average." /> + + <!-- APIs --> + <method name="list_network_interfaces" desc="Returns the list of all network interfaces." /> + <method name="identify" desc="Tells the host to beep its pc speaker." /> + <method name="shutdown" desc="Shutdown node" /> + <method name="reboot" desc="Reboot node" /> + + </class> + + <eventArguments> + <arg name="timestamp" type="absTime" /> + <arg name="sequence" type="uint32" /> + </eventArguments> + + <event name="heartbeat" args="timestamp,sequence" />
</schema>
Perhaps we could include which branch is targetted? I assume you are not changing POC.
On Tue, Jul 13, 2010 at 03:54:37PM -0400, Darryl L. Pierce wrote:
Also included all of the new APIs, but did not provide the backing implementation. Those will be included in followup patches.
Signed-off-by: Darryl L. Pierce dpierce@redhat.com
src/Makefile.am | 16 ++++++------ src/main.cpp | 4 +- src/qmf/hostagent.cpp | 3 +- src/qmf/hostagent.h | 4 +- src/schema.xml | 62 ++++++++++++++++++++++++++----------------------- 5 files changed, 46 insertions(+), 43 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am index 6182fb1..daddf9d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,12 +10,12 @@ AM_CXXFLAGS = $(INCLUDES) sbin_PROGRAMS = matahari
generated_file_list = \
- qmf/com/redhat/matahari/EventHeartbeat.cpp \
- qmf/com/redhat/matahari/EventHeartbeat.h \
- qmf/com/redhat/matahari/Host.cpp \
- qmf/com/redhat/matahari/Host.h \
- qmf/com/redhat/matahari/Package.cpp \
- qmf/com/redhat/matahari/Package.h
- qmf/com/redhat/matahari/host/EventHeartbeat.cpp \
- qmf/com/redhat/matahari/host/EventHeartbeat.h \
- qmf/com/redhat/matahari/host/Host.cpp \
- qmf/com/redhat/matahari/host/Host.h \
- qmf/com/redhat/matahari/host/Package.cpp \
- qmf/com/redhat/matahari/host/Package.h
nodist_matahari_SOURCES = $(generated_file_list) config.h
@@ -30,8 +30,8 @@ matahari_SOURCES = \ $(generated_file_list): schema.xml qmf-gen -o ./qmf ./schema.xml
-BUILT_SOURCES = $(generated_file_list) $(first) -CLEANFILES = $(generated_file_list) $(first) +BUILT_SOURCES = $(generated_file_list) +CLEANFILES = $(generated_file_list)
matahari_CPPFLAGS = -fno-strict-aliasing matahari_LDADD = -lpcre -lqmf -lqpidclient -lqpidcommon -ludev -lvirt diff --git a/src/main.cpp b/src/main.cpp index 27b2434..f7d6329 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -36,12 +36,12 @@
#include "qmf/hostagent.h"
-#include "qmf/com/redhat/matahari/Package.h" +#include "qmf/com/redhat/matahari/host/Package.h"
using namespace qpid::management; using namespace qpid::client; using namespace std; -namespace _qmf = qmf::com::redhat::matahari; +namespace _qmf = qmf::com::redhat::matahari::host;
// Global Variables ManagementAgent::Singleton* singleton; diff --git a/src/qmf/hostagent.cpp b/src/qmf/hostagent.cpp index 94004d5..b28c5c5 100644 --- a/src/qmf/hostagent.cpp +++ b/src/qmf/hostagent.cpp @@ -21,7 +21,7 @@ #include "hostagent.h" #include <qpid/agent/ManagementAgent.h>
-#include "qmf/com/redhat/matahari/EventHeartbeat.h" +#include "qmf/com/redhat/matahari/host/EventHeartbeat.h"
HostAgent::HostAgent() { @@ -45,7 +45,6 @@ HostAgent::setup(ManagementAgent* agent) _management_object->set_hypervisor(host_get_hypervisor()); _management_object->set_arch(host_get_architecture()); _management_object->set_memory(host_get_memory());
_management_object->set_beeping(false);
_management_object->set_cpu_model(host_get_cpu_model()); _management_object->set_cpu_cores(host_get_number_of_cpu_cores());
diff --git a/src/qmf/hostagent.h b/src/qmf/hostagent.h index 7f7bbaa..d1f3bc1 100644 --- a/src/qmf/hostagent.h +++ b/src/qmf/hostagent.h @@ -26,12 +26,12 @@ #include "host.h" #include "hostlistener.h"
-#include "qmf/com/redhat/matahari/Host.h" +#include "qmf/com/redhat/matahari/host/Host.h"
using namespace qpid::management; using namespace std;
-namespace _qmf = qmf::com::redhat::matahari; +namespace _qmf = qmf::com::redhat::matahari::host;
class HostAgent : public Manageable, public HostListener { diff --git a/src/schema.xml b/src/schema.xml index 20fd9bc..76e1371 100644 --- a/src/schema.xml +++ b/src/schema.xml @@ -1,31 +1,35 @@ -<schema package="com.redhat.matahari">
<class name="Host">
<!-- general properties -->
<property name="uuid" type="sstr" access="RO" desc="Host UUID" index="y"/>
<property name="hostname" type="sstr" access="RO" desc="Hostname"/>
<property name="memory" type="int64" access="RO" desc="Amount of primary memory for host (kb)" unit="kb"/>
<property name="hypervisor" type="sstr" access="RO" desc="Hypervisor used by host"/>
<property name="arch" type="sstr" access="RO" desc="Architecture of host"/>
<property name="beeping" type="bool" access="RW" desc="speaker beep loop active? (used to identify host)"/>
<!-- CPU properties -->
<property name="cpu_model" type="lstr" access="RO" desc="The process model description." />
<property name="cpu_cores" type="uint8" access="RO" desc="The number of processor cores." />
<statistic name="load_average" type="double" desc="The current processing load average." />
<!-- APIs -->
<method name="shutdown" desc="Shutdown node" />
<method name="reboot" desc="Reboot node" />
</class>
<eventArguments>
<arg name="timestamp" type="absTime" />
<arg name="sequence" type="uint32" />
</eventArguments>
<event name="heartbeat" args="timestamp,sequence" />
+<schema package="com.redhat.matahari.host">
<class name="Host">
<!-- properties -->
<property name="uuid" type="sstr" access="RO" desc="Host UUID" index="y" />
<property name="hostname" type="sstr" access="RO" desc="Hostname" />
<property name="is_virtual" type="bool" access="RO" desc="Is this machine virtual?" />
<property name="operating_system" type="sstr" access="RO" desc="The installed operating system." />
<property name="memory" type="int64" access="RO" desc="Amount of primary memory for host (kb)" unit="kb" />
<property name="arch" type="sstr" access="RO" desc="Architecture of host" />
<property name="hypervisor" type="sstr" access="RO" desc="Hypervisor used by host" />
<property name="platform" type="sstr" access="RO" desc="The wordsize for the host." />
<property name="cpu_model" type="lstr" access="RO" desc="The process model description." />
<property name="cpu_cores" type="uint8" access="RO" desc="The number of processor cores." />
<!-- statistics -->
<statistic name="last_updated" type="absTime" desc="The last time a heartbeat occurred." />
<statistic name="load_average" type="double" desc="The current processing load average." />
<!-- APIs -->
<method name="list_network_interfaces" desc="Returns the list of all network interfaces." />
<method name="identify" desc="Tells the host to beep its pc speaker." />
<method name="shutdown" desc="Shutdown node" />
<method name="reboot" desc="Reboot node" />
</class>
<eventArguments>
<arg name="timestamp" type="absTime" />
<arg name="sequence" type="uint32" />
</eventArguments>
<event name="heartbeat" args="timestamp,sequence" />
</schema> -- 1.7.1.1
Matahari mailing list Matahari@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/matahari
On Tue, Jul 13, 2010 at 03:15:39PM -0500, Ryan O'Hara wrote:
Perhaps we could include which branch is targetted? I assume you are not changing POC.
Good point. For now I'm done with everything on POC.
This patch is against the next branch and is for the production codebase.
matahari@lists.fedorahosted.org