All of lore.kernel.org
 help / color / mirror / Atom feed
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:31:43 -0000	[thread overview]
Message-ID: <20061024143143.11348.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	kupcevic at sourceware.org	2006-10-24 14:31:42

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&only_with_tag=RHEL5&r1=1.15&r2=1.15.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/Clusvcadm.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7&r2=1.7.2.1
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.10.2.1&r2=1.10.2.2

--- conga/ricci/modules/cluster/ClusterStatus.cpp	2006/10/16 19:44:30	1.15
+++ conga/ricci/modules/cluster/ClusterStatus.cpp	2006/10/24 14:31:40	1.15.2.1
@@ -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:31:40	1.7.2.1
@@ -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 21:13:21	1.10.2.1
+++ conga/ricci/modules/cluster/clumon/src/daemon/Monitor.cpp	2006/10/24 14:31:41	1.10.2.2
@@ -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);



             reply	other threads:[~2006-10-24 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-24 14:31 kupcevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-24 14:56 [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=20061024143143.11348.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.