Skip to content
Jonathan Meyer edited this page Feb 8, 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:

export DJANGO_SETTINGS_MODULE=scale.local_settings
python

Once the Python shell is launched enter the following:

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/jmeyer/code/scale/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"},"recursive":True,"files_to_ingest":[{"filename_regex":".*","data_types":["all_my_mounted_files"]}]}
scan = Scan(name=datetime.utcnow().isoformat(), configuration=json_config)
scan.save()
Clone this wiki locally