deleters for hpc
diff --git a/planetstack/hpc_observer/deleters/cdnprefix_deleter.py b/planetstack/hpc_observer/deleters/cdnprefix_deleter.py
new file mode 100644
index 0000000..d5237a6
--- /dev/null
+++ b/planetstack/hpc_observer/deleters/cdnprefix_deleter.py
@@ -0,0 +1,22 @@
+import os
+import sys
+from hpc.models import ServiceProvider, ContentProvider, CDNPrefix
+from observer.deleter import Deleter
+
+# hpclibrary will be in steps/..
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+from hpclib import HpcLibrary
+
+class CDNPrefixDeleter(Deleter, HpcLibrary):
+ model='CDNPrefix'
+
+ def __init__(self, **args):
+ Deleter.__init__(self, **args)
+ HpcLibrary.__init__(self)
+
+ def call(self, pk, model_dict):
+ print "XXX delete cdn prefix", model_dict
+ self.client.onev.Delete("CDNPrefix", int(model_dict["cdn_prefix_id"]))
+
diff --git a/planetstack/hpc_observer/deleters/contentprovider_deleter.py b/planetstack/hpc_observer/deleters/contentprovider_deleter.py
new file mode 100644
index 0000000..adcf108
--- /dev/null
+++ b/planetstack/hpc_observer/deleters/contentprovider_deleter.py
@@ -0,0 +1,22 @@
+import os
+import sys
+from hpc.models import ServiceProvider, ContentProvider, CDNPrefix
+from observer.deleter import Deleter
+
+# hpclibrary will be in steps/..
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+from hpclib import HpcLibrary
+
+class ContentProviderDeleter(Deleter, HpcLibrary):
+ model='ContentProvider'
+
+ def __init__(self, **args):
+ Deleter.__init__(self, **args)
+ HpcLibrary.__init__(self)
+
+ def call(self, pk, model_dict):
+ print "XXX delete content provider", model_dict
+ self.client.onev.Delete("ContentProvider", int(model_dict["content_provider_id"]))
+
diff --git a/planetstack/hpc_observer/deleters/originserver_deleter.py b/planetstack/hpc_observer/deleters/originserver_deleter.py
new file mode 100644
index 0000000..4f08ba0
--- /dev/null
+++ b/planetstack/hpc_observer/deleters/originserver_deleter.py
@@ -0,0 +1,22 @@
+import os
+import sys
+from hpc.models import ServiceProvider, ContentProvider, CDNPrefix
+from observer.deleter import Deleter
+
+# hpclibrary will be in steps/..
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+from hpclib import HpcLibrary
+
+class OriginServerDeleter(Deleter, HpcLibrary):
+ model='OriginServer'
+
+ def __init__(self, **args):
+ Deleter.__init__(self, **args)
+ HpcLibrary.__init__(self)
+
+ def call(self, pk, model_dict):
+ print "XXX delete origin server", model_dict
+ self.client.onev.Delete("OriginServer", int(model_dict["origin_server_id"]))
+
diff --git a/planetstack/hpc_observer/deleters/serviceprovider_deleter.py b/planetstack/hpc_observer/deleters/serviceprovider_deleter.py
new file mode 100644
index 0000000..4cb9e7b
--- /dev/null
+++ b/planetstack/hpc_observer/deleters/serviceprovider_deleter.py
@@ -0,0 +1,22 @@
+import os
+import sys
+from hpc.models import ServiceProvider, ContentProvider, CDNPrefix
+from observer.deleter import Deleter
+
+# hpclibrary will be in steps/..
+parentdir = os.path.join(os.path.dirname(__file__),"..")
+sys.path.insert(0,parentdir)
+
+from hpclib import HpcLibrary
+
+class ServiceProviderDeleter(Deleter, HpcLibrary):
+ model='ServiceProvider'
+
+ def __init__(self, **args):
+ Deleter.__init__(self, **args)
+ HpcLibrary.__init__(self)
+
+ def call(self, pk, model_dict):
+ print "XXX delete service provider", model_dict
+ self.client.onev.Delete("ServiceProvider", int(model_dict["service_provider_id"]))
+