|
@@ -137,6 +137,7 @@ class corosync_flatiron(ClusterManager):
|
|
|
})
|
|
})
|
|
|
self.cpg_agent={}
|
|
self.cpg_agent={}
|
|
|
self.confdb_agent={}
|
|
self.confdb_agent={}
|
|
|
|
|
+ self.sam_agent={}
|
|
|
self.config = CoroConfig ()
|
|
self.config = CoroConfig ()
|
|
|
self.node_to_ip = {}
|
|
self.node_to_ip = {}
|
|
|
|
|
|
|
@@ -216,6 +217,8 @@ class corosync_flatiron(ClusterManager):
|
|
|
self.cpg_agent[node].restart()
|
|
self.cpg_agent[node].restart()
|
|
|
if self.confdb_agent.has_key(node):
|
|
if self.confdb_agent.has_key(node):
|
|
|
self.confdb_agent[node].restart()
|
|
self.confdb_agent[node].restart()
|
|
|
|
|
+ if self.sam_agent.has_key(node):
|
|
|
|
|
+ self.sam_agent[node].restart()
|
|
|
return ret
|
|
return ret
|
|
|
|
|
|
|
|
def StopaCM(self, node):
|
|
def StopaCM(self, node):
|
|
@@ -225,8 +228,8 @@ class corosync_flatiron(ClusterManager):
|
|
|
self.debug('stoping corosync on : ' + node)
|
|
self.debug('stoping corosync on : ' + node)
|
|
|
if self.cpg_agent.has_key(node):
|
|
if self.cpg_agent.has_key(node):
|
|
|
self.cpg_agent[node].stop()
|
|
self.cpg_agent[node].stop()
|
|
|
- if self.confdb_agent.has_key(node):
|
|
|
|
|
- self.confdb_agent[node].stop()
|
|
|
|
|
|
|
+ if self.sam_agent.has_key(node):
|
|
|
|
|
+ self.sam_agent[node].stop()
|
|
|
return ClusterManager.StopaCM(self, node)
|
|
return ClusterManager.StopaCM(self, node)
|
|
|
|
|
|
|
|
def test_node_CM(self, node):
|
|
def test_node_CM(self, node):
|
|
@@ -329,6 +332,8 @@ class TestAgentComponent(ScenarioComponent):
|
|
|
self.CM.cpg_agent[node].start()
|
|
self.CM.cpg_agent[node].start()
|
|
|
self.CM.confdb_agent[node] = ConfdbTestAgent(node, CM.Env)
|
|
self.CM.confdb_agent[node] = ConfdbTestAgent(node, CM.Env)
|
|
|
self.CM.confdb_agent[node].start()
|
|
self.CM.confdb_agent[node].start()
|
|
|
|
|
+ self.CM.sam_agent[node] = SamTestAgent(node, CM.Env)
|
|
|
|
|
+ self.CM.sam_agent[node].start()
|
|
|
return 1
|
|
return 1
|
|
|
|
|
|
|
|
def TearDown(self, CM):
|
|
def TearDown(self, CM):
|
|
@@ -337,6 +342,7 @@ class TestAgentComponent(ScenarioComponent):
|
|
|
for node in self.Env["nodes"]:
|
|
for node in self.Env["nodes"]:
|
|
|
self.CM.cpg_agent[node].stop()
|
|
self.CM.cpg_agent[node].stop()
|
|
|
self.CM.confdb_agent[node].stop()
|
|
self.CM.confdb_agent[node].stop()
|
|
|
|
|
+ self.CM.sam_agent[node].stop()
|
|
|
|
|
|
|
|
###################################################################
|
|
###################################################################
|
|
|
class TestAgent(object):
|
|
class TestAgent(object):
|
|
@@ -549,3 +555,15 @@ class ConfdbTestAgent(TestAgent):
|
|
|
def cpg_local_get(self):
|
|
def cpg_local_get(self):
|
|
|
return 1
|
|
return 1
|
|
|
|
|
|
|
|
|
|
+###################################################################
|
|
|
|
|
+class SamTestAgent(TestAgent):
|
|
|
|
|
+
|
|
|
|
|
+ def __init__(self, node, Env=None):
|
|
|
|
|
+ TestAgent.__init__(self, "sam_test_agent", node, 9036, env=Env)
|
|
|
|
|
+ self.initialized = False
|
|
|
|
|
+ self.nodeid = None
|
|
|
|
|
+ self.send_recv = True
|
|
|
|
|
+
|
|
|
|
|
+ def cpg_local_get(self):
|
|
|
|
|
+ return 1
|
|
|
|
|
+
|