예제 #1
0
파일: rsctest.py 프로젝트: 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))
예제 #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))
예제 #3
0
파일: rsctest.py 프로젝트: 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"]
예제 #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"]