本文整理汇总了Python中DockerBackend.kill_dhbox方法的典型用法代码示例。如果您正苦于以下问题:Python DockerBackend.kill_dhbox方法的具体用法?Python DockerBackend.kill_dhbox怎么用?Python DockerBackend.kill_dhbox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DockerBackend
的用法示例。
在下文中一共展示了DockerBackend.kill_dhbox方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start_over
# 需要导入模块: import DockerBackend [as 别名]
# 或者: from DockerBackend import kill_dhbox [as 别名]
def start_over():
"""Delete and make a new test DH Box"""
cleanup()
response = DockerBackend.kill_dhbox('test')
response = DockerBackend.kill_dhbox('test_wp')
DockerBackend.setup_new_dhbox('test', 'password', '[email protected]')
return response
示例2: kill_dhbox
# 需要导入模块: import DockerBackend [as 别名]
# 或者: from DockerBackend import kill_dhbox [as 别名]
def kill_dhbox():
the_next = request.form['next']
user = request.form['user']
DockerBackend.kill_dhbox(user)
delete_user(user)
flash(message='DH Box and username deleted.', category='alert-success')
return redirect(url_for(the_next) or url_for("index"))
示例3: killctr
# 需要导入模块: import DockerBackend [as 别名]
# 或者: from DockerBackend import kill_dhbox [as 别名]
def killctr(ctr_name):
"""Delete a container"""
print "killing container " + ctr_name
response = DockerBackend.kill_dhbox(ctr_name)
return response
示例4: clean_slate
# 需要导入模块: import DockerBackend [as 别名]
# 或者: from DockerBackend import kill_dhbox [as 别名]
def clean_slate():
"""Delete all DH Boxes"""
cleanup()
response = DockerBackend.kill_dhbox('test')
DockerBackend.setup_new_dhbox('test', 'password', '[email protected]')
return response