diff options
author | Michael Elkins <melkins@tislabs.com> | 2013-03-04 23:03:14 +0000 |
---|---|---|
committer | Michael Elkins <melkins@tislabs.com> | 2013-03-04 23:03:14 +0000 |
commit | 0f2b07420bcb7bc03d0a525503dfc02f98e08ce7 (patch) | |
tree | eae2a478ab2ff846a83fd112201228d54f33c737 /rpkid | |
parent | 79696d9ca55ed3360e87869bde14d873ceba9586 (diff) |
remove deprecated script that was used back when the web portal used the sqlite db backend
svn path=/trunk/; revision=5101
Diffstat (limited to 'rpkid')
-rwxr-xr-x | rpkid/portal-gui/scripts/dumpdata.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/rpkid/portal-gui/scripts/dumpdata.py b/rpkid/portal-gui/scripts/dumpdata.py deleted file mode 100755 index dcf23666..00000000 --- a/rpkid/portal-gui/scripts/dumpdata.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python -# $Id$ -# -# Copyright (C) 2012 SPARTA, Inc. a Parsons Company -# -# Permission to use, copy, modify, and distribute this software for any -# purpose with or without fee is hereby granted, provided that the above -# copyright notice and this permission notice appear in all copies. -# -# THE SOFTWARE IS PROVIDED "AS IS" AND SPARTA DISCLAIMS ALL WARRANTIES WITH -# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -# AND FITNESS. IN NO EVENT SHALL SPARTA BE LIABLE FOR ANY SPECIAL, DIRECT, -# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -# PERFORMANCE OF THIS SOFTWARE. -# -# This is a helper script which will dump the rpki.gui.app models from -# the old sqlite3 database, forcing the output order to the primary key in -# order to avoid forward references for the AddressRange table. - -from django.conf import settings -settings.configure(DEBUG=True, - DATABASES={ - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': '/usr/local/var/rpki/gui.db', - } - }) - -from django.core import serializers -import django.db.models - -from rpki.gui.app import models -from django.contrib.auth import models as auth_models - -data = [] -for v in (auth_models.User, models.Conf, models.Parent, models.Child, models.AddressRange, models.Asn, models.ResourceCert, models.Roa, models.RoaRequest, models.Ghostbuster): - data.extend(list(v.objects.all().order_by('id'))) - -print serializers.serialize('json', data, use_natural_keys=True) - -# vim:sw=4 ts=8 expandtab |