本文整理匯總了Python中framework.controller.controller.Controller.check_node_config_status方法的典型用法代碼示例。如果您正苦於以下問題:Python Controller.check_node_config_status方法的具體用法?Python Controller.check_node_config_status怎麽用?Python Controller.check_node_config_status使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類framework.controller.controller.Controller
的用法示例。
在下文中一共展示了Controller.check_node_config_status方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: print
# 需要導入模塊: from framework.controller.controller import Controller [as 別名]
# 或者: from framework.controller.controller.Controller import check_node_config_status [as 別名]
print("\n")
print("<<< OpenVPN configuration example: Site-to-Site Mode with TLS")
print("\n")
rundelay = 3
ctrl = Controller(ctrlIpAddr, ctrlPortNum, ctrlUname, ctrlPswd)
vrouter = VRouter5600(ctrl, nodeName, nodeIpAddr, nodePortNum,
nodeUname, nodePswd)
print ("<<< 'Controller': %s, '%s': %s"
% (ctrlIpAddr, nodeName, nodeIpAddr))
print ("\n")
time.sleep(rundelay)
node_configured = False
result = ctrl.check_node_config_status(nodeName)
status = result.get_status()
if(status.eq(STATUS.NODE_CONFIGURED)):
node_configured = True
print ("<<< '%s' is configured on the Controller" % nodeName)
elif(status.eq(STATUS.DATA_NOT_FOUND)):
node_onfigured = False
else:
print ("\n")
print "Failed to get configuration status for the '%s'" % nodeName
print ("!!!Demo terminated, reason: %s" % status.detailed())
exit(0)
if node_configured is False:
result = ctrl.add_netconf_node(vrouter)
status = result.get_status()