Example #1
0
File: rsctest.py Project: lge/crmsh
 def set_rscenv(self, op):
     '''
     Setup the environment. Class specific.
     '''
     self.rscenv = {}
     n = self.rscdef_node
     self.timeout = get_op_timeout(n, op, "20s")
     self.rscenv["%stimeout" % self.pfx["meta_attributes"]] = str(self.timeout)
     if op == "monitor":
         self.rscenv["%sinterval" % self.pfx["meta_attributes"]] = "10000"
     if is_cloned(n):
         # some of the meta attributes for clones/ms are used
         # by resource agents
         cn = get_topmost_rsc(n)
         self.nvset2env(get_child_nvset_node(cn))
Example #2
0
 def set_rscenv(self, op):
     '''
     Setup the environment. Class specific.
     '''
     self.rscenv = {}
     n = self.rscdef_node
     self.timeout = get_op_timeout(n, op, "20s")
     self.rscenv["%stimeout" % self.pfx["meta_attributes"]] = str(
         self.timeout)
     if op == "monitor":
         self.rscenv["%sinterval" % self.pfx["meta_attributes"]] = "10000"
     if is_cloned(n):
         # some of the meta attributes for clones/ms are used
         # by resource agents
         cn = get_topmost_rsc(n)
         self.nvset2env(get_child_nvset_node(cn))
Example #3
0
File: rsctest.py Project: lge/crmsh
 def set_rscenv(self, op):
     RADriver.set_rscenv(self, op)
     self.nvset2env(get_child_nvset_node(self.rscdef_node, "instance_attributes"))
     self.rscenv["OCF_RESOURCE_INSTANCE"] = self.id
     self.rscenv["OCF_ROOT"] = os.environ["OCF_ROOT"]
Example #4
0
 def set_rscenv(self, op):
     RADriver.set_rscenv(self, op)
     self.nvset2env(
         get_child_nvset_node(self.rscdef_node, "instance_attributes"))
     self.rscenv["OCF_RESOURCE_INSTANCE"] = self.id
     self.rscenv["OCF_ROOT"] = os.environ["OCF_ROOT"]