本文整理汇总了Python中DBManager.DBManager.freeNode方法的典型用法代码示例。如果您正苦于以下问题:Python DBManager.freeNode方法的具体用法?Python DBManager.freeNode怎么用?Python DBManager.freeNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.freeNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from DBManager import DBManager [as 别名]
# 或者: from DBManager.DBManager import freeNode [as 别名]
print "Created node with device ID: " + args.node
elif args.delete != None:
#delete a node
db.deleteNode(args.delete)
print "Deleted node with device ID: " + args.delete
elif args.activate != None:
#activate a node
db.activateNode(args.activate[0], args.activate[1])
print "Added node with device ID: " + args.activate[0] + " to session with passphrase: " + args.activate[1]
elif args.free != None:
#free a node
db.freeNode(args.free)
print "Freed node with device ID: " + args.free
elif args.SESSIONS == True:
#list all sessions
print "\t-----Session List-----"
sessions = db.getSessions()
for session in sessions:
print session
elif args.NODES != None:
#list nodes
if args.NODES == '0':
print "\t-----Node List-----"
nodes = db.getNodes()
else: