add missing resources

Change-Id: I065cfb13c2704bb40d14a6b441c7cdf1e40a8f04
diff --git a/xos/tosca/resources/serviceprovider.py b/xos/tosca/resources/serviceprovider.py
new file mode 100644
index 0000000..2c9a167
--- /dev/null
+++ b/xos/tosca/resources/serviceprovider.py
@@ -0,0 +1,28 @@
+import os
+import pdb
+import sys
+import tempfile
+sys.path.append("/opt/tosca")
+from translator.toscalib.tosca_template import ToscaTemplate
+
+from services.hpc.models import ServiceProvider, HpcService
+
+from xosresource import XOSResource
+
+class XOSServiceProvider(XOSResource):
+    provides = "tosca.nodes.ServiceProvider"
+    xos_model = ServiceProvider
+    copyin_props = []
+
+    def get_xos_args(self):
+        hpc_service_name = self.get_requirement("tosca.relationships.MemberOfService", throw_exception=True)
+        hpc_service = self.get_xos_object(HpcService, name=hpc_service_name)
+        return {"name": self.obj_name,
+                "hpcService": hpc_service}
+
+    def can_delete(self, obj):
+        if obj.contentprovider_set.exists():
+            self.info("%s %s has active content providers; skipping delete" % (self.xos_model.__class__, obj.name))
+            return False
+        return super(XOSServiceProvider, self).can_delete(obj)
+