Ejemplo n.º 1
0
def run(command, *args):
  """ run command """
  # show all clusters
  if command == 'clusters':
    return clusters.run(command, *args)

  # show topologies
  elif command == 'topologies':
    return topologies.run(command, *args)

  # physical plan
  elif command == 'containers':
    return physicalplan.run_containers(command, *args)
  elif command == 'metrics':
    return physicalplan.run_metrics(command, *args)

  # logical plan
  elif command == 'components':
    return logicalplan.run_components(command, *args)
  elif command == 'spouts':
    return logicalplan.run_spouts(command, *args)
  elif command == 'bolts':
    return logicalplan.run_bolts(command, *args)

  # help
  elif command == 'help':
    return help.run(command, *args)

  # version
  elif command == 'version':
    return version.run(command, *args)

  return 1
Ejemplo n.º 2
0
def run(command, *args):
    """ run command """
    # show all clusters
    if command == 'clusters':
        return clusters.run(command, *args)

    # show topologies
    elif command == 'topologies':
        return topologies.run(command, *args)

    # physical plan
    elif command == 'containers':
        return physicalplan.run_containers(command, *args)
    elif command == 'metrics':
        return physicalplan.run_metrics(command, *args)

    # logical plan
    elif command == 'components':
        return logicalplan.run_components(command, *args)
    elif command == 'spouts':
        return logicalplan.run_spouts(command, *args)
    elif command == 'bolts':
        return logicalplan.run_bolts(command, *args)

    # help
    elif command == 'help':
        return help.run(command, *args)

    # version
    elif command == 'version':
        return version.run(command, *args)

    return 1
Ejemplo n.º 3
0
def run(command, *args):
    """ run command """
    # show all clusters
    if command == "clusters":
        return clusters.run(command, *args)

    # show topologies
    elif command == "topologies":
        return topologies.run(command, *args)

    # physical plan
    elif command == "containers":
        return physicalplan.run_containers(command, *args)
    elif command == "metrics":
        return physicalplan.run_metrics(command, *args)

    # logical plan
    elif command == "components":
        return logicalplan.run_components(command, *args)
    elif command == "spouts":
        return logicalplan.run_spouts(command, *args)
    elif command == "bolts":
        return logicalplan.run_bolts(command, *args)

    # help
    elif command == "help":
        return help.run(command, *args)

    # version
    elif command == "version":
        return version.run(command, *args)

    return 1
Ejemplo n.º 4
0
def cli_topologies(tracker_url: str, cre: str):
  """Show the topologies under the given CLUSTER[/ROLE[/ENV]]."""
  tracker.tracker_url = tracker_url
  topologies.run(
      cre=cre,
  )