當前位置: 首頁>>代碼示例>>Python>>正文


Python NailgunClient.provision_node方法代碼示例

本文整理匯總了Python中fuelweb_test.models.nailgun_client.NailgunClient.provision_node方法的典型用法代碼示例。如果您正苦於以下問題:Python NailgunClient.provision_node方法的具體用法?Python NailgunClient.provision_node怎麽用?Python NailgunClient.provision_node使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在fuelweb_test.models.nailgun_client.NailgunClient的用法示例。


在下文中一共展示了NailgunClient.provision_node方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: provision_cluster_separately

# 需要導入模塊: from fuelweb_test.models.nailgun_client import NailgunClient [as 別名]
# 或者: from fuelweb_test.models.nailgun_client.NailgunClient import provision_node [as 別名]
def provision_cluster_separately(admin_node_ip, env_name):
  client = NailgunClient(admin_node_ip)
  cluster_id = client.get_cluster_id(env_name)
  env = load_env(env_name)

  # separate provisioning, useful on virtual envs since provisioning runs much faster this way
  cluster_nodes = client.list_cluster_nodes(cluster_id)
  for cur_node in cluster_nodes:
    task = client.provision_node(cluster_id, cur_node['id'])
    result = task_wait(client, task, 3600, 60)
    if result['status'] != 'ready':
      return result['message']

  return "OK"
開發者ID:adidenko,項目名稱:fuel_bm_tests,代碼行數:16,代碼來源:manage_env.py

示例2: provision_cluster

# 需要導入模塊: from fuelweb_test.models.nailgun_client import NailgunClient [as 別名]
# 或者: from fuelweb_test.models.nailgun_client.NailgunClient import provision_node [as 別名]
def provision_cluster(admin_node_ip, env_name):
  client = NailgunClient(admin_node_ip)
  cluster_id = client.get_cluster_id(env_name)
  env = load_env(env_name)
  all_nodes_ids = ""

  # separate provisioning, useful on virtual envs since provisioning runs much faster this way
  cluster_nodes = client.list_cluster_nodes(cluster_id)
  for cur_node in cluster_nodes:
    if all_nodes_ids == "":
      all_nodes_ids = str(cur_node['id'])
    else:
      all_nodes_ids = all_nodes_ids + "," + str(cur_node['id'])

  # provision all nodes
  task = client.provision_node(cluster_id, all_nodes_ids)
  result = task_wait(client, task, env.deploy_timeout, 30)
  if result['status'] == 'ready':
    return "OK"
  else:
    return result['message']
開發者ID:adidenko,項目名稱:fuel_bm_tests,代碼行數:23,代碼來源:manage_env.py


注:本文中的fuelweb_test.models.nailgun_client.NailgunClient.provision_node方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。