17 lines
471 B
Python
17 lines
471 B
Python
# coding: utf-8
|
|
|
|
from SWSCloudCore import models
|
|
|
|
|
|
class ControllerContainersServer:
|
|
def status_set(self, container_id, status):
|
|
ns = models.Containers.update(status=status).where(
|
|
models.Containers.id == container_id
|
|
)
|
|
ns.execute()
|
|
return True
|
|
|
|
def exists(self, container_id):
|
|
if models.Containers.select().where(models.Containers.id == container_id).count() == 0:
|
|
return False
|
|
return True
|