#!/usr/bin/env ruby
# SPDX-License-Identifier: MulanPSL-2.0+ or GPL-2.0
# Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved.
# frozen_string_literal: true

require "#{ENV['CCI_SRC']}/lib/my_data"

def pub_idle_physical_testbox
  my = MyData.new
  buckets = my.get_testbox_aggs['aggregations']['queue']['buckets']
  buckets.each do |bucket|
    testbox = bucket['key']
    next unless testbox.start_with? 'taishan200'

    puts testbox
    break
  end
end

pub_idle_physical_testbox
