docstr: method:
  1. create a rg abc
  2. describe the default rg and the rg abc
  3. transfer 1 query node from default rg to the rg abc
  4. describe the rg abc and verify both the capacity and available nodes increased 1
  5. describe the default rg and verify both the capacity and available nodes decreased 1
  6. try to drop the rg abc, expected fail with err mgs
  7. transfer 1 query node from the rg abc to the default rg
  8. describe both rgs and verify the values changed accordingly
  9. drop the rg abc, expected success
  verify: transfer node successfully and rg info updated accordingly
docstr_tok: ["method",":","1.","create","a","rg","abc","2.","describe","the","default","rg","and","the","rg","abc","3.","transfer","1","query","node","from","default","rg","to","the","rg","abc","4.","describe","the","rg","abc","and","verify","both","the","capacity","and","available","nodes","increased","1","5.","describe","the","default","rg","and","verify","both","the","capacity","and","available","nodes","decreased","1","6.","try","to","drop","the","rg","abc",",","expected","fail","with","err","mgs","7.","transfer","1","query","node","from","the","rg","abc","to","the","default","rg","8.","describe","both","rgs","and","verify","the","values","changed","accordingly","9.","drop","the","rg","abc",",","expected","success","verify",":","transfer","node","successfully","and","rg","info","updated","accordingly"]
code: def test_rg_default(self):
      """
      method:
      1. create a rg abc
      2. describe the default rg and the rg abc
      3. transfer 1 query node from default rg to the rg abc
      4. describe the rg abc and verify both the capacity and available nodes increased 1
      5. describe the default rg and verify both the capacity and available nodes decreased 1
      6. try to drop the rg abc, expected fail with err mgs
      7. transfer 1 query node from the rg abc to the default rg
      8. describe both rgs and verify the values changed accordingly
      9. drop the rg abc, expected success
      verify: transfer node successfully and rg info updated accordingly
      """
      self._connect()
      rgs, _ = self.utility_wrap.list_resource_groups()
      rgs_count = len(rgs)
      default_rg_init_available_node = config_nodes
      default_rg_info = {
          "name": ct.default_resource_group_name,
          "capacity": ct.default_resource_group_capacity,
          "num_available_node": default_rg_init_available_node,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=ct.default_resource_group_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
  
      # create my rg
      m_rg_name = cf.gen_unique_str("rg")
      self.init_resource_group(name=m_rg_name)
      rgs, _ = self.utility_wrap.list_resource_groups()
      new_rgs_count = len(rgs)
      assert rgs_count + 1 == new_rgs_count
      new_rg_init_cap = 0
      new_rg_init_num_available_node = 0
      new_rg_init_info = {
          "name": m_rg_name,
          "capacity": new_rg_init_cap,
          "num_available_node": new_rg_init_num_available_node,
          "num_loaded_replica": {},
          "num_outgoing_node": {},
          "num_incoming_node": {},
      }
      self.utility_wrap.describe_resource_group(
          name=m_rg_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=new_rg_init_info,
      )
  
      # transfer 1 query node from default to my rg
      num_node = 1
      self.utility_wrap.transfer_node(
          source=ct.default_resource_group_name,
          target=m_rg_name,
          num_node=num_node,
      )
      rgs, _ = self.utility_wrap.list_resource_groups()
      assert new_rgs_count == len(rgs)
      target_rg_info = {
          "name": m_rg_name,
          "capacity": new_rg_init_cap + num_node,
          "num_available_node": new_rg_init_num_available_node
          + num_node,
      }
      self.utility_wrap.describe_resource_group(
          name=m_rg_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=target_rg_info,
      )
      source_rg_info = {
          "name": ct.default_resource_group_name,
          "capacity": ct.default_resource_group_capacity,
          "num_available_node": default_rg_init_available_node
          - num_node,
      }
      self.utility_wrap.describe_resource_group(
          name=ct.default_resource_group_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=source_rg_info,
      )
  
      # try to drop my rg
      error = {
          ct.err_code: 999,
          ct.err_msg: "failed to drop resource group, err=delete non-empty rg is not permitted",
      }
      self.utility_wrap.drop_resource_group(
          name=m_rg_name,
          check_task=ct.CheckTasks.err_res,
          check_items=error,
      )
  
      # transfer back the query node to default rg
      self.utility_wrap.transfer_node(
          source=m_rg_name,
          target=ct.default_resource_group_name,
          num_node=num_node,
      )
      self.utility_wrap.describe_resource_group(
          name=ct.default_resource_group_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=default_rg_info,
      )
      self.utility_wrap.describe_resource_group(
          name=m_rg_name,
          check_task=ct.CheckTasks.check_rg_property,
          check_items=new_rg_init_info,
      )
  
      # try to drop my rg again
      self.utility_wrap.drop_resource_group(name=m_rg_name)
      rgs, _ = self.utility_wrap.list_resource_groups()
      assert len(rgs) == rgs_count
      error = {
          ct.err_code: 999,
          ct.err_msg: "failed to describe resource group, err=resource group doesn't exist",
      }
      self.utility_wrap.describe_resource_group(
          name=m_rg_name,
          check_task=ct.CheckTasks.err_res,
          check_items=error,
      )
  
imports: import pytest
  from base.client_base import TestcaseBase
  from common import common_func
  from common import common_type
  from common.common_type import CaseLabel, CheckTasks
  from utils.util_pymilvus import *
label_desc: Use image node_id 2 for calling the TestResourceGroupParams obj's underlying member method code with example usage: obj.test_rg_default() without return types