本文整理汇总了Python中DBManager.DBManager.createNode方法的典型用法代码示例。如果您正苦于以下问题:Python DBManager.createNode方法的具体用法?Python DBManager.createNode怎么用?Python DBManager.createNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManager.DBManager
的用法示例。
在下文中一共展示了DBManager.createNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DBManager
# 需要导入模块: from DBManager import DBManager [as 别名]
# 或者: from DBManager.DBManager import createNode [as 别名]
db = DBManager()
if args.session != None:
#create a new session
db.createSession(args.session[0], int(args.session[1]))
print "Created session with passphrase: " + args.session[0] + " for " + args.session[1] + " days"
elif args.archive != None:
#archive session
db.deleteSession(args.archive)
print "Deleted session with passphrase: " + args.archive
elif args.node != None:
#create a new node
db.createNode(args.node)
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