diff --git a/xos/tosca/resources/sdncontrollerservice.py b/xos/tosca/resources/sdncontrollerservice.py
new file mode 100644
index 0000000..7f4773f
--- /dev/null
+++ b/xos/tosca/resources/sdncontrollerservice.py
@@ -0,0 +1,22 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from service import XOSService
+from services.sdncontroller.models import SDNControllerService
+
+class XOSSDNControllerService(XOSService):
+	provides = "tosca.nodes.SDNControllerService"
+	xos_model = SDNControllerService
+	copyin_props = ["view_url", "icon_url", "enabled", "published", "public_key", "private_key_fn", "versionNumber"]
+
diff --git a/xos/tosca/resources/sdncontrollerserviceinstance.py b/xos/tosca/resources/sdncontrollerserviceinstance.py
new file mode 100644
index 0000000..39ee4dc
--- /dev/null
+++ b/xos/tosca/resources/sdncontrollerserviceinstance.py
@@ -0,0 +1,46 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from xosresource import XOSResource
+from core.models import ServiceInstance, Service
+from services.sdncontroller.models import SDNControllerServiceInstance
+
+class XOSSDNControllerServiceInstance(XOSResource):
+    provides = "tosca.nodes.SDNControllerServiceInstance"
+    xos_model = SDNControllerServiceInstance
+    name_field = None
+    copyin_props = ()
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSSDNControllerServiceInstance, self).get_xos_args()
+
+        provider_name = self.get_requirement("tosca.relationships.TenantOfService", throw_exception=throw_exception)
+        if provider_name:
+            args["owner"] = self.get_xos_object(Service, throw_exception=throw_exception, name=provider_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        owner = args.get("provider", None)
+        if owner:
+            return [ self.get_xos_object(owner=owner) ]
+        return []
+
+    def postprocess(self, obj):
+        pass
+
+    def can_delete(self, obj):
+        return super(XOSSDNControllerServiceInstance, self).can_delete(obj)
+
diff --git a/xos/tosca/resources/sdncontrollervendor.py b/xos/tosca/resources/sdncontrollervendor.py
new file mode 100644
index 0000000..b1a78e5
--- /dev/null
+++ b/xos/tosca/resources/sdncontrollervendor.py
@@ -0,0 +1,45 @@
+# Copyright 2017-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from xosresource import XOSResource
+from core.models import ServiceInstance
+from services.sdncontroller.models import SDNControllerVendor
+
+class XOSSDNControllerVendor(XOSResource):
+    provides = "tosca.nodes.SDNControllerVendor"
+    xos_model = SDNControllerVendor
+    name_field = None
+    copyin_props = ( "name",)
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSSDNControllerVendor, self).get_xos_args()
+
+        tenant_name = self.get_requirement("tosca.relationships.VendorOfTenant", throw_exception=throw_exception)
+        if tenant_name:
+            args["provider_tenant"] = self.get_xos_object(ServiceInstance, throw_exception=throw_exception, name=tenant_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        provider_tenant = args.get("provider", None)
+        if provider_tenant:
+            return [ self.get_xos_object(provider_tenant=provider_tenant) ]
+        return []
+
+    def postprocess(self, obj):
+        pass
+
+    def can_delete(self, obj):
+        return super(XOSSDNControllerVendor, self).can_delete(obj)
