You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/assets/models/utils.py

24 lines
506 B

#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
from . import IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag
__all__ = ['initial', 'generate_fake']
def initial():
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag]:
if hasattr(cls, 'initial'):
cls.initial()
def generate_fake():
for cls in [IDC, SystemUser, AdminUser, AssetGroup, Asset, Tag]:
if hasattr(cls, 'generate_fake'):
cls.generate_fake()
if __name__ == '__main__':
pass