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

[Cluster-devel] conga/ricci/modules/cluster ClusterStatus.cpp ...



CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	kupcevic 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);


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