Skip to content

Commit

Permalink
Low: cts: Remove developmental hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
beekhof committed Apr 19, 2012
1 parent ae24adb commit 7f4d1b4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cts/CIB.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,18 @@ def __init__(self, Factory, name, value, section="cib-bootstrap-options"):
self.name = name
self.value = value

self.target = "pcmk-1"
self.cib_tmpfile = CTSvars.CRM_CONFIG_DIR+"/cib.xml"

def show(self):
text = '''<crm_config>'''
text += ''' <cluster_property_set id="%s">''' % self.section
text += ''' <nvpair id="cts-%s" name="%s" value="%s"/>''' % (self.id, self.name, self.value)
text += ''' <nvpair id="cts-%s" name="%s" value="%s"/>''' % (self.name, self.name, self.value)
text += ''' </cluster_property_set>'''
text += '''</crm_config>'''
return text

def commit(self):
self.Factory.debug("Writing out %s" % self.id)
fixed = "HOME=/root CIB_file="+self.cib_tmpfile+" cibadmin --modify --xml-text '%s'" % self.show()
rc = self.Factory.rsh(self.target, fixed)
fixed = "HOME=/root CIB_file="+self.Factory.tmpfile+" cibadmin --modify --xml-text '%s'" % self.show()
rc = self.Factory.rsh(self.Factory.target, fixed)
if rc != 0:
self.Factory.log("Configure call failed: "+fixed)
sys.exit(1)
Expand Down

0 comments on commit 7f4d1b4

Please sign in to comment.