blob: 023c2fef828d02c86df5ea31700066b4a0c1594e [file] [log] [blame]
import os
import sys
sys.path.append("/opt/xos")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
import django
from core.models import *
from services.hpc.models import *
from services.cord.models import *
django.setup()
def purge(cls):
for obj in cls.deleted_objects.all():
obj.delete(purge=True)
for model in [Instance, Slice, Site, Service, User, Image, ImageDeployments, Port]:
purge(model)