From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci/modules/cluster ClusterStatus.cpp ...
Date: 24 Oct 2006 14:56:58 -0000 [thread overview]
Message-ID: <20061024145658.23707.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-10-24 14:56:56
Modified files:
ricci/modules/cluster: ClusterStatus.cpp Clusvcadm.cpp
ricci/modules/cluster/clumon/src/daemon: Monitor.cpp
Log message:
clustermon: xenvm -> vm (bz211942)
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/ClusterStatus.cpp.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp.diff?cvsroot=cluster&r1=1.11&r2=1.12
--- conga/ricci/modules/cluster/ClusterStatus.cpp 2006/10/16 19:44:30 1.15
+++ conga/ricci/modules/cluster/ClusterStatus.cpp 2006/10/24 14:56:56 1.16
@@ -61,7 +61,7 @@
bool
-is_service_xenvm(const XMLObject& cluster_conf, const String& name)
+is_service_vm(const XMLObject& cluster_conf, const String& name)
{
for (list<XMLObject>::const_iterator iter = cluster_conf.children().begin();
iter != cluster_conf.children().end();
@@ -72,7 +72,7 @@
iter_s != kid.children().end();
iter_s++) {
const XMLObject& service_conf = *iter_s;
- if (iter_s->tag() == "xenvm")
+ if (iter_s->tag() == "vm")
if (iter_s->get_attr("name") == name)
return true;;
}
@@ -134,7 +134,7 @@
if (cluster_conf.get_attr("name") != status_xml.get_attr("name"))
throw String("cluster names mismatch");
- // add "xenvm" attr to services
+ // add "vm" attr to services
XMLObject status_new(status_xml.tag());
for (map<String, String>::const_iterator iter = status_xml.attrs().begin();
iter != status_xml.attrs().end();
@@ -145,8 +145,8 @@
iter++) {
XMLObject s(*iter);
if (s.tag() == "service")
- s.set_attr("xenvm",
- (is_service_xenvm(cluster_conf, s.get_attr("name"))) ? "true" : "false");
+ s.set_attr("vm",
+ (is_service_vm(cluster_conf, s.get_attr("name"))) ? "true" : "false");
status_new.add_child(s);
}
return status_new;
--- conga/ricci/modules/cluster/Clusvcadm.cpp 2006/10/16 19:44:30 1.7
+++ conga/ricci/modules/cluster/Clusvcadm.cpp 2006/10/24 14:56:56 1.8
@@ -52,17 +52,17 @@
ServiceStatus(const String& name,
const String& node,
state status,
- bool xenvm) :
+ bool vm) :
name(name),
node(node),
status(status),
- xenvm(xenvm) {}
+ vm(vm) {}
virtual ~ServiceStatus() {}
String name;
String node;
state status;
- bool xenvm;
+ bool vm;
};
@@ -105,7 +105,7 @@
flag = "-e";
else if (iter->status == ServiceStatus::RG_STATE_STARTED ||
iter->status == ServiceStatus::RG_STATE_STARTING) {
- if (iter->xenvm)
+ if (iter->vm)
flag = "-M";
else
flag = "-r";
@@ -255,18 +255,18 @@
iter != groups_xml.children().end();
iter++)
if (iter->tag() == "group") {
- bool xenvm = false;
+ bool vm = false;
String name(iter->get_attr("name"));
String::size_type idx = name.find(":");
if (idx != name.npos) {
- if (name.substr(0, idx) == "xenvm")
- xenvm = true;
+ if (name.substr(0, idx) == "vm")
+ vm = true;
name = name.substr(idx + 1);
}
String node(iter->get_attr("owner"));
ServiceStatus::state state = (ServiceStatus::state)
utils::to_long(iter->get_attr("state"));
- services.push_back(ServiceStatus(name, node, state, xenvm));
+ services.push_back(ServiceStatus(name, node, state, vm));
}
return pair<list<String>, list<ServiceStatus> >(nodes, services);
--- conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp 2006/10/23 18:43:35 1.11
+++ conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp 2006/10/24 14:56:56 1.12
@@ -314,16 +314,16 @@
iter_s++) {
const XMLObject& service_conf = *iter_s;
if (service_conf.tag() == "service" ||
- service_conf.tag() == "xenvm") {
+ service_conf.tag() == "vm") {
XMLObject service("service");
for (map<String, String>::const_iterator iter_a = service_conf.attrs().begin();
iter_a != service_conf.attrs().end();
iter_a++)
service.set_attr(iter_a->first, iter_a->second);
- if (service_conf.tag() == "xenvm")
- service.set_attr("xenvm", "true");
+ if (service_conf.tag() == "vm")
+ service.set_attr("vm", "true");
else
- service.set_attr("xenvm", "false");
+ service.set_attr("vm", "false");
cluster.add_child(service);
}
}
@@ -633,14 +633,14 @@
iter++) {
const XMLObject& group = *iter;
XMLObject service("service");
- service.set_attr("xenvm", "false");
+ service.set_attr("vm", "false");
// name
String name(group.get_attr("name"));
String::size_type idx = name.find(":");
if (idx != name.npos) {
- if (name.substr(0, idx) == "xenvm")
- service.set_attr("xenvm", "true");
+ if (name.substr(0, idx) == "vm")
+ service.set_attr("vm", "true");
name = name.substr(idx + 1);
}
service.set_attr("name", name);
next reply other threads:[~2006-10-24 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 14:56 kupcevic [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-24 14:31 [Cluster-devel] conga/ricci/modules/cluster ClusterStatus.cpp kupcevic
2006-10-16 19:44 kupcevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061024145658.23707.qmail@sourceware.org \
--to=kupcevic@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).