conga/ricci/modules Makefile cluster/ClusterMo ...
CVSROOT: /cvs/cluster
Module name: conga
Changes by: rmccabe at sourceware.org 2008-07-10 20:25:59
Modified files:
ricci/modules : Makefile ricci/modules/cluster: ClusterModule.cpp Makefile
Added files:
ricci/modules/cluster: XVM.h ricci/modules/virt: .cvsignore Makefile Virt.cpp Virt.h
VirtModule.cpp VirtModule.h main.cpp
ricci/modules/virt/d-bus: ricci-modvirt.oddjob.conf
ricci-modvirt.systembus.conf
Removed files:
ricci/modules/cluster: Virt.cpp Virt.h
Log message:
Move functionality that depends on libvirt into its own module
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/Makefile.diff?cvsroot=cluster&r1=1.8&r2=1.9
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/XVM.h.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterModule.cpp.diff?cvsroot=cluster&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Makefile.diff?cvsroot=cluster&r1=1.21&r2=1.22
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Virt.cpp.diff?cvsroot=cluster&r1=1.10&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Virt.h.diff?cvsroot=cluster&r1=1.7&r2=NONE
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/.cvsignore.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Makefile.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Virt.cpp.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/Virt.h.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/VirtModule.cpp.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/VirtModule.h.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/main.cpp.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf.diff?cvsroot=cluster&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf.diff?cvsroot=cluster&r1=NONE&r2=1.1
ricci/modules/Makefile +3 -0
@@ -15,6 +15,7 @@ ${MAKE} -C rpm ${MAKE} -C log ${MAKE} -C service + ${MAKE} -C virt clustermon: ${MAKE} -C cluster
@@ -24,6 +25,7 @@ ${MAKE} -C rpm install ${MAKE} -C log install ${MAKE} -C service install + ${MAKE} -C virt install install_clustermon: ${MAKE} -C cluster install
@@ -36,6 +38,7 @@ ${MAKE} -C rpm clean ${MAKE} -C log clean ${MAKE} -C service clean + ${MAKE} -C virt clean check:
/cvs/cluster/conga/ricci/modules/cluster/XVM.h,v --> standard output revision 1.1
- renamed from ricci/modules/cluster/XVM.h +41 -0
41 lines not on this page · raw message
ricci/modules/cluster/ClusterModule.cpp +6 -44
99 lines not on this page · raw message
ricci/modules/cluster/Makefile +1 -2
@@ -22,12 +22,11 @@ ClusterStatus.o \ Clusvcadm.o \ Fence.o \ - Virt.o + XVM.o PARANOID=0 INCLUDE += -I${top_srcdir}/common/ CXXFLAGS += -DPARANOIA=$(PARANOID) -LDFLAGS += -lvirt ifeq ($(PARANOID), 1) LDFLAGS += ${top_srcdir}/common/paranoid/*.o
/cvs/cluster/conga/ricci/modules/virt/.cvsignore,v --> standard output revision 1.1
- renamed from ricci/modules/virt/.cvsignore +3 -0
@@ -0,0 +1,3 @@ +ricci-modvirt +*.orig +*.rej
/cvs/cluster/conga/ricci/modules/virt/Makefile,v --> standard output revision 1.1
- renamed from ricci/modules/virt/Makefile +56 -0
56 lines not on this page · raw message
/cvs/cluster/conga/ricci/modules/virt/Virt.cpp,v --> standard output revision 1.1
- renamed from ricci/modules/virt/Virt.cpp +132 -0
132 lines not on this page · raw message
/cvs/cluster/conga/ricci/modules/virt/Virt.h,v --> standard output revision 1.1
- renamed from ricci/modules/virt/Virt.h +34 -0
@@ -0,0 +1,34 @@ +/* +** Copyright (C) Red Hat, Inc. 2006-2008 +** +** This program is free software; you can redistribute it and/or modify it +** under the terms of the GNU General Public License version 2 as +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, but +** WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; see the file COPYING. If not, write to the +** Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +** MA 02139, USA. +*/ + +#ifndef __CONGA_MODCLUSTER_VIRT_H +#define __CONGA_MODCLUSTER_VIRT_H + +#include "String.h" +#include <map> + +#define DMIDECODE_PATH "/usr/sbin/dmidecode" +#define DEFAULT_HV_URI "xen:///" + +class Virt { + public: + static std::map<String, String> get_vm_list(const String& hvURI); + static bool virt_guest(void); +}; + +#endif
/cvs/cluster/conga/ricci/modules/virt/VirtModule.cpp,v --> standard output revision 1.1
- renamed from ricci/modules/virt/VirtModule.cpp +99 -0
99 lines not on this page · raw message
/cvs/cluster/conga/ricci/modules/virt/VirtModule.h,v --> standard output revision 1.1
- renamed from ricci/modules/virt/VirtModule.h +33 -0
@@ -0,0 +1,33 @@ +/* +** Copyright (C) Red Hat, Inc. 2006-2008 +** +** This program is free software; you can redistribute it and/or modify it +** under the terms of the GNU General Public License version 2 as +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, but +** WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; see the file COPYING. If not, write to the +** Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +** MA 02139, USA. +*/ + +#ifndef __CONGA_MODVIRT_VIRTMODULE_H +#define __CONGA_MODVIRT_VIRTMODULE_H + +#include "Module.h" + +class VirtModule : public Module +{ + public: + VirtModule(); + virtual ~VirtModule(); + + private: +}; + +#endif
/cvs/cluster/conga/ricci/modules/virt/main.cpp,v --> standard output revision 1.1
- renamed from ricci/modules/virt/main.cpp +35 -0
@@ -0,0 +1,35 @@ +/* +** Copyright (C) Red Hat, Inc. 2006-2008 +** +** This program is free software; you can redistribute it and/or modify it +** under the terms of the GNU General Public License version 2 as +** published by the Free Software Foundation. +** +** This program is distributed in the hope that it will be useful, but +** WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with this program; see the file COPYING. If not, write to the +** Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +** MA 02139, USA. +*/ + +#include "VirtModule.h" + +#include <iostream> + +using namespace std; + +int +main(int argc, char **argv) +{ + try { + VirtModule m; + return stdin_out_module_driver(m, argc, argv); + } catch (String e) { + cerr << e << endl; + return 1; + } +}
/cvs/cluster/conga/ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf,v --> standard output revision 1.1
- renamed from ricci/modules/virt/d-bus/ricci-modvirt.oddjob.conf +25 -0
@@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<oddjobconfig> + <service name="com.redhat.ricci"> + <object name="/com/redhat/ricci"> + <interface name="com.redhat.ricci"> + <method name="modvirt_rw"> + <helper exec="/usr/libexec/ricci-modvirt" + arguments="1" + prepend_user_name="no" + argument_passing_method="stdin" + /> + <allow user="root"/> + </method> + <method name="modvirt_ro"> + <helper exec="/usr/libexec/ricci-modvirt_ro" + arguments="1" + prepend_user_name="no" + argument_passing_method="stdin" + /> + <allow user="root"/> + </method> + </interface> + </object> + </service> +</oddjobconfig>
/cvs/cluster/conga/ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf,v --> standard output revision 1.1
- renamed from ricci/modules/virt/d-bus/ricci-modvirt.systembus.conf +25 -0
@@ -0,0 +1,25 @@ +<!DOCTYPE busconfig PUBLIC + "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" + "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> + +<busconfig> + + <!-- Only root can own ricci service. --> + <policy user="root"> + <allow own="com.redhat.ricci"/> + </policy> + + <!-- Allow anyone to call modvirt_rw and modvirt_ro + methods. oddjobd performs actual ACL. --> + <policy context="default"> + <allow send_destination="com.redhat.ricci" + send_path="/com/redhat/ricci" + send_interface="com.redhat.ricci" + send_member="modvirt_rw"/> + <allow send_destination="com.redhat.ricci" + send_path="/com/redhat/ricci" + send_interface="com.redhat.ricci" + send_member="modvirt_ro"/> + </policy> + +</busconfig>