示例#1
0
  def Run(self, args):
    """This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    """
    cli = self.context['clusteradmin']
    msg = (self.context['clusteradmin-msgs'].
           BigtableclusteradminProjectsZonesClustersDeleteRequest(
               name=util.ClusterUrl(args)))
    return cli.projects_zones_clusters.Delete(msg)
    def Run(self, args):
        """This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      Some value that we want to have printed later.
    """
        cli = self.context['clusteradmin']
        msg = self.context['clusteradmin-msgs'].Cluster(
            name=util.ClusterUrl(args),
            displayName=args.description,
            serveNodes=args.nodes)
        result = cli.projects_zones_clusters.Update(msg)
        if not args. async:
            util.WaitForOp(self.context, result.currentOperation.name,
                           'Updating cluster')
        return result