Example #1
0
 def active_resources(self, node):
     (rc, output) = self.rsh(node, """crm_resource -c""", None)
     resources = []
     for line in output:
         if re.search("^Resource", line):
             tmp = AuditResource(self, line)
             if tmp.type == "primitive" and tmp.host == node:
                 resources.append(tmp.id)
     return resources
Example #2
0
    def active_resources(self, node):
        # [SM].* {node} matches Started, Slave, Master
        # Stopped wont be matched as it wont include {node}
        (rc, output) = self.rsh(node, """crm_resource -c""", None)

        resources = []
        for line in output:
            if re.search("^Resource", line):
                tmp = AuditResource(self, line)
                if tmp.type == "primitive" and tmp.host == node:
                    resources.append(tmp.id)
        return resources