Пример #1
0
 def display(self):
     if not config.core.dotty:
         common_err("dotty not found")
         return False
     dotf = self.totmpf()
     if not dotf:
         return False
     utils.show_dot_graph(dotf, desc="configuration graph")
     return True
Пример #2
0
 def display(self):
     if not config.core.dotty:
         common_err("dotty not found")
         return False
     dotf = self.totmpf()
     if not dotf:
         return False
     utils.show_dot_graph(dotf, desc="configuration graph")
     return True
Пример #3
0
 def _display_dot(self, f):
     if not config.core.dotty:
         common_err("install graphviz to draw transition graphs")
         return False
     f = crm_report().pe2dot(f)
     if not f:
         common_err("dot file not found in the report")
         return False
     utils.show_dot_graph(f, keep_file=True, desc="configuration graph")
     return True
Пример #4
0
 def _display_dot(self, f):
     if not config.core.dotty:
         common_err("install graphviz to draw transition graphs")
         return False
     f = crm_report.pe2dot(f)
     if not f:
         common_err("dot file not found in the report")
         return False
     utils.show_dot_graph(f, keep_file=True, desc="configuration graph")
     return True
Пример #5
0
 def _crm_simulate(self, cmd, nograph, scores, utilization, verbosity):
     if not self.origin:
         self.initialize()
     if verbosity:
         cmd = "%s -%s" % (cmd, verbosity.upper())
     if scores:
         cmd = "%s -s" % cmd
     if utilization:
         cmd = "%s -U" % cmd
     if config.core.dotty and not nograph:
         fd, dotfile = mkstemp()
         cmd = "%s -D %s" % (cmd, dotfile)
     else:
         dotfile = None
     rc = ext_cmd(cmd % self.source_file())
     if dotfile:
         show_dot_graph(dotfile)
     return rc == 0
Пример #6
0
 def _crm_simulate(self, cmd, nograph, scores, utilization, verbosity):
     if not self.origin:
         self.initialize()
     if verbosity:
         cmd = "%s -%s" % (cmd, verbosity.upper())
     if scores:
         cmd = "%s -s" % cmd
     if utilization:
         cmd = "%s -U" % cmd
     if config.core.dotty and not nograph:
         fd, dotfile = mkstemp()
         cmd = "%s -D %s" % (cmd, dotfile)
     else:
         dotfile = None
     rc = ext_cmd(cmd % self.source_file())
     if dotfile:
         show_dot_graph(dotfile)
     return rc == 0