[Fixture] 添加command log backends, 未来支持es

This commit is contained in:
ibuler
2017-02-06 23:13:27 +08:00
parent 0869931e67
commit a79c3dd156
39 changed files with 646 additions and 311 deletions

View File

@@ -7,9 +7,9 @@ from assets.models import Asset, AssetGroup, SystemUser
from assets.serializers import AssetGrantedSerializer, AssetGroupSerializer
def associate_system_users_with_assets(system_users, assets, asset_groups):
def push_system_user(assets, system_user):
print('Push system user %s' % system_user.name)
for asset in assets:
asset.system_users.add(*tuple(system_users))
print('\tAsset: %s' % asset.ip)
for asset_group in asset_groups:
asset_group.system_users.add(*tuple(system_users))