shell_helpers.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:envoy-perf 作者: envoyproxy 项目源码 文件源码
def GetGcloud(args, project=None, service=None):
  """Get gcloud command with arguments.

  Functionalities might be expanded later to run gcloud commands.
  Args:
    args: command with arguments as an array
    project: the project on which the glcoud compute will work
    service: the service on gcloud that you want to use. default: compute
  Returns:
    returns thr formatted command for gcloud compute
  """
  command = ["gcloud"]
  if service:
    command.append(service)

  if project:
    command.extend(["--project", project])

  command.extend(args)
  return command


# TODO(sohamcodes): pexpect.spawn can be changed to subprocess call
# However, timeout for subprocess is available only on python3
# So, we can implement it later.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号