[Update] 更新生成fake数据脚本

pull/417/head
ibuler 2017-03-22 23:36:43 +08:00
parent 5613dbb28b
commit 3f72ce4b1f
4 changed files with 14 additions and 4 deletions

View File

@ -45,7 +45,7 @@ class IDC(models.Model):
ordering = ['name']
@classmethod
def generate_fake(cls, count=100):
def generate_fake(cls, count=5):
from random import seed, choice
import forgery_py
from django.db import IntegrityError

View File

@ -90,7 +90,7 @@ class AdminUser(models.Model):
ordering = ['name']
@classmethod
def generate_fake(cls, count=100):
def generate_fake(cls, count=10):
from random import seed
import forgery_py
from django.db import IntegrityError
@ -222,7 +222,7 @@ class SystemUser(models.Model):
ordering = ['name']
@classmethod
def generate_fake(cls, count=100):
def generate_fake(cls, count=10):
from random import seed
import forgery_py
from django.db import IntegrityError

File diff suppressed because one or more lines are too long

View File

@ -19,6 +19,16 @@ def run_AdHoc(task_tuple, assets,
task_name='Ansible AdHoc runner',
task_id=None, pattern='all',
record=True, verbose=False):
"""
:param task_tuple: (('module_name', 'module_args'), ('module_name', 'module_args'))
:param assets: [asset1, asset2]
:param task_name:
:param task_id:
:param pattern:
:param record:
:param verbose:
:return:
"""
if not assets:
logger.warning('Empty assets, runner cancel')