now supporting xos.yaml custom template and treating the slice as a requirement
diff --git a/xos/tosca/nodeselect.py b/xos/tosca/nodeselect.py
new file mode 100644
index 0000000..f139de7
--- /dev/null
+++ b/xos/tosca/nodeselect.py
@@ -0,0 +1,23 @@
+import os
+import sys
+
+sys.path.append("/opt/xos")
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xos.settings")
+import django
+django.setup()
+from core.models import Slice,Sliver,User,Flavor,Node,Image
+
+class XOSNodeSelector(object):
+    def __init__(self, user):
+        self.user = user
+
+    def get_allowed_nodes(self):
+        # TODO: logic to get nodes that the user can use
+        nodes = Node.objects.all()
+        return nodes
+
+    def get_nodes(self, quantity):
+        nodes = self.get_allowed_nodes()
+        # TODO: sort the nodes by some useful metric to pick the best one
+        return nodes[:quantity]
+