Commit eb5f0fcf authored by Administrator's avatar Administrator

[future] 在主机层面支持多种sudo, 以及回调结果的分类

parent 13f34a8b
This diff is collapsed.
from __future__ import unicode_literals
# ~*~ coding: utf-8 ~*~
from __future__ import unicode_literals, absolute_import
import logging
from django.db import models
from django.utils.translation import ugettext_lazy as _
logger = logging.getLogger(__name__)
class Play(models.Model):
name = models.CharField(max_length=128, verbose_name=_('Name'))
uuid = models.CharField(max_length=128, verbose_name=_('UUID'))
completed = models.BooleanField(default=False, verbose_name=_('IsCompleted'))
status_code = models.IntegerField(default=0, verbose_name=_('StatusCode'))
def __unicode__(self):
return self.name
class Task(models.Model):
play = models.ForeignKey(Play, related_name='tasks', blank=True)
name = models.CharField(max_length=128, blank=True, blverbose_name=_('Name'))
uuid = models.CharField(max_length=128, verbose_name=_('UUID'))
def __unicode__(self):
return self.clean()
class HostResult(models.Model):
task = models.ForeignKey(Task, related_name='host_results', blank=True)
# Create your models here.
......@@ -16,7 +16,7 @@ ForgeryPy==0.1
openpyxl==2.4.0
paramiko==2.0.2
celery==3.1.23
ansible==2.1.1.0
ansible==2.1.2.0
django-simple-captcha==0.5.2
django-formtools==1.0
sshpubkeys==2.2.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment