コード例 #1
0
ファイル: core.py プロジェクト: sumanau7/incubator-aurora
def get_quota(role):
  """usage: get_quota --cluster=CLUSTER role

  Prints the production quota that has been allocated to a user.
  """
  options = app.get_options()
  resp = make_client(options.cluster).get_quota(role)

  print_quota(resp.result.getQuotaResult.quota, 'Total allocated quota', role)

  if resp.result.getQuotaResult.consumed:
    print_quota(resp.result.getQuotaResult.consumed, 'Consumed quota', role)
コード例 #2
0
ファイル: core.py プロジェクト: kpfell/incubator-aurora
def get_quota(role):
  """usage: get_quota --cluster=CLUSTER role

  Prints the production quota that has been allocated to a user.
  """
  options = app.get_options()
  resp = make_client(options.cluster).get_quota(role)
  quota_result = resp.result.getQuotaResult
  print_quota(quota_result.quota, 'Total allocated quota', role)

  if resp.result.getQuotaResult.prodConsumption:
    print_quota(quota_result.prodConsumption,
                'Resources consumed by production jobs',
                role)

  if resp.result.getQuotaResult.nonProdConsumption:
    print_quota(quota_result.nonProdConsumption,
                'Resources consumed by non-production jobs',
                role)
コード例 #3
0
def get_quota(role):
    """usage: get_quota --cluster=CLUSTER role

  Prints the production quota that has been allocated to a user.
  """
    options = app.get_options()
    v1_deprecation_warning(
        "get_quota",
        ["quota", "get", "%s/%s" % (options.cluster, role)])
    resp = make_client(options.cluster).get_quota(role)
    quota_result = resp.result.getQuotaResult
    print_quota(quota_result.quota, 'Total allocated quota', role)

    if resp.result.getQuotaResult.prodConsumption:
        print_quota(quota_result.prodConsumption,
                    'Resources consumed by production jobs', role)

    if resp.result.getQuotaResult.nonProdConsumption:
        print_quota(quota_result.nonProdConsumption,
                    'Resources consumed by non-production jobs', role)