本文整理匯總了Python中fuelweb_test.models.nailgun_client.NailgunClient.update_node方法的典型用法代碼示例。如果您正苦於以下問題:Python NailgunClient.update_node方法的具體用法?Python NailgunClient.update_node怎麽用?Python NailgunClient.update_node使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類fuelweb_test.models.nailgun_client.NailgunClient
的用法示例。
在下文中一共展示了NailgunClient.update_node方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: from fuelweb_test.models.nailgun_client import NailgunClient [as 別名]
# 或者: from fuelweb_test.models.nailgun_client.NailgunClient import update_node [as 別名]
# FIXME
if assign_method == 'hw_pin':
should_be_nodes = len(lab_config['nodes'].keys())
else:
should_be_nodes = lab_config['roller']['controller']['count'] + \
lab_config['roller']['compute']['count']
wait_free_nodes(lab_config, should_be_nodes)
# add nodes to cluster
LOG.info("StageX:START Assign nodes to cluster")
if assign_method == 'hw_pin':
while len(client.list_cluster_nodes(cluster_id)) < should_be_nodes:
for node in client.list_nodes():
node_new = strict_pin_node_to_cluster(node, lab_config)
if node_new:
client.update_node(node['id'], node_new)
# FIXME add at least timeout
time.sleep(5)
else:
client.update_nodes(simple_pin_nodes_to_cluster(client.list_nodes(),
lab_config['roller']))
LOG.info("StageX: END Assign nodes to cluster")
# assign\create network role to nic per node
LOG.info("StageX: Assign network role to nic per node")
if assign_method == 'hw_pin':
for node in client.list_cluster_nodes(cluster_id):
upd_ifs = strict_pin_nw_to_node(node, client.get_node_interfaces(
node['id']), lab_config)
if upd_ifs:
client.put_node_interfaces(