Deleters are no longer used
diff --git a/planetstack/syndicate_observer/deleters/volume_deleter.py b/planetstack/syndicate_observer/deleters/volume_deleter.py
deleted file mode 100644
index 5b7c49b..0000000
--- a/planetstack/syndicate_observer/deleters/volume_deleter.py
+++ /dev/null
@@ -1,63 +0,0 @@
-import os
-import sys
-import traceback
-
-if __name__ == "__main__":
- # for testing
- if os.getenv("OPENCLOUD_PYTHONPATH"):
- sys.path.append( os.getenv("OPENCLOUD_PYTHONPATH") )
- else:
- print >> sys.stderr, "No OPENCLOUD_PYTHONPATH variable set. Assuming that OpenCloud is in PYTHONPATH"
-
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
-
-
-import logging
-from logging import Logger
-logging.basicConfig( format='[%(levelname)s] [%(module)s:%(lineno)d] %(message)s' )
-logger = logging.getLogger()
-logger.setLevel( logging.INFO )
-
-# point to planetstack
-if __name__ != "__main__":
- if os.getenv("OPENCLOUD_PYTHONPATH") is not None:
- sys.path.insert(0, os.getenv("OPENCLOUD_PYTHONPATH"))
- else:
- logger.warning("No OPENCLOUD_PYTHONPATH set; assuming your PYTHONPATH works")
-
-
-from syndicate_storage.models import Volume
-from observer.deleter import Deleter
-
-from django.forms.models import model_to_dict
-
-
-# syndicatelib will be in steps/..
-parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
-
-import syndicatelib
-
-class VolumeDeleter(Deleter):
- model='Volume'
-
- def __init__(self, **args):
- Deleter.__init__(self, **args)
-
- def call(self, pk, model_dict):
- try:
- volume_name = model_dict['name']
- syndicatelib.ensure_volume_absent( volume_name )
- return True
- except Exception, e:
- traceback.print_exc()
- logger.exception("Failed to erase volume '%s'" % volume_name)
- return False
-
-
-if __name__ == "__main__":
- vd = VolumeDeleter()
-
- all_volumes = Volume.objects.all()
- for vol in all_volumes:
- vd( vol.pk, model_to_dict( vol ) )
diff --git a/planetstack/syndicate_observer/deleters/volumeaccessright_deleter.py b/planetstack/syndicate_observer/deleters/volumeaccessright_deleter.py
deleted file mode 100644
index 74b405d..0000000
--- a/planetstack/syndicate_observer/deleters/volumeaccessright_deleter.py
+++ /dev/null
@@ -1,56 +0,0 @@
-import os
-import sys
-import traceback
-
-if __name__ == "__main__":
- # for testing
- if os.getenv("OPENCLOUD_PYTHONPATH"):
- sys.path.append( os.getenv("OPENCLOUD_PYTHONPATH") )
- else:
- print >> sys.stderr, "No OPENCLOUD_PYTHONPATH variable set. Assuming that OpenCloud is in PYTHONPATH"
-
- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "planetstack.settings")
-
-
-import logging
-from logging import Logger
-logging.basicConfig( format='[%(levelname)s] [%(module)s:%(lineno)d] %(message)s' )
-logger = logging.getLogger()
-logger.setLevel( logging.INFO )
-
-# point to planetstack
-if __name__ != "__main__":
- if os.getenv("OPENCLOUD_PYTHONPATH") is not None:
- sys.path.insert(0, os.getenv("OPENCLOUD_PYTHONPATH"))
- else:
- logger.warning("No OPENCLOUD_PYTHONPATH set; assuming your PYTHONPATH works")
-
-
-from syndicate_storage.models import VolumeAccessRight
-from observer.deleter import Deleter
-
-from django.forms.models import model_to_dict
-
-
-# find syndicatelib
-parentdir = os.path.join(os.path.dirname(__file__),"..")
-sys.path.insert(0,parentdir)
-
-import syndicatelib
-
-class VolumeAccessRightDeleter(Deleter):
- model='VolumeAccessRight'
-
- def __init__(self, **args):
- Deleter.__init__(self, **args)
-
- def call(self, pk, model_dict):
- print "XXX delete volume access right", model_dict
-
-
-if __name__ == "__main__":
- vard = VolumeAccessRightDeleter()
-
- all_vars = VolumeAccessRight.objects.all()
- for var in all_vars:
- vard( var.pk, model_to_dict( var ) )
\ No newline at end of file