osc.appendChild(self.ref("obd", obd_uuid))
return osc
- def echo_client(self, name, uuid, osc_uuid):
- ec = self.newService("echo_client", name, uuid)
- ec.appendChild(self.ref("osc", osc_uuid))
- return ec
-
def ost(self, name, uuid, obd_uuid, net_uuid):
ost = self.newService("ost", name, uuid)
ost.appendChild(self.ref("network", net_uuid))
self.addElement(mtpt, "path", path)
return mtpt
+ def echo_client(self, name, uuid, osc_uuid):
+ ec = self.newService("echo_client", name, uuid)
+ ec.appendChild(self.ref("osc", osc_uuid))
+ return ec
+
############################################################
# Utilities to query a DOM tree
# Using this functions we can treat use config information
""" add an echo client to the profile for this node. """
if len(args) < 1:
usage()
- osc_name = args[0]
+ lov_name = args[0]
if options.has_key('node'):
node_name = options['node']
else:
echoname = new_name('ECHO_'+ node_name)
echo_uuid = new_uuid(echoname)
node_add_profile(gen, node, 'echo_client', echo_uuid)
- osc_uuid = name2uuid(lustre, osc_name) # either 'osc' or 'lov'
- echo = gen.echo_client(echoname, echo_uuid, osc_uuid)
+
+ lov_uuid = name2uuid(lustre, lov_name, tag='lov', fatal=0)
+ if not lov_uuid:
+ lov_uuid = name2uuid(lustre, lov_name, tag='osc', fatal=1)
+
+ echo = gen.echo_client(echoname, echo_uuid, lov_uuid)
lustre.appendChild(echo)