Skip to content
Jonathan Meyer edited this page Feb 1, 2017 · 5 revisions

To be able to test the scale scanning I need a loaded Scan configuration. The following commands will allow me to quickly get one into the database:

import django
django.setup()
from storage.test.utils import create_workspace
from datetime import datetime
json_config = {'version':'1.0','broker':{'type':'host','host_path':'/home/ubuntu/workspace/scale'}}
workspace = create_workspace(name=datetime.utcnow().isoformat(), json_config=json_config)


from ingest.models import Scan
json_config = {"version": "1.0","workspace":workspace.name,"scanner":{"type":"dir"},"files_to_ingest":[{"filename_regex":".*","data_types":["all_my_mounted_files"]}]}
scan = Scan(name=datetime.utcnow().isoformat(), configuration=json_config)
Clone this wiki locally