view for download ssh commands
Scott Baker [Sun, 25 Jan 2015 19:49:56 +0000 (11:49 -0800)]
planetstack/core/dashboard/views/download_ssh_commands.py [new file with mode: 0644]

diff --git a/planetstack/core/dashboard/views/download_ssh_commands.py b/planetstack/core/dashboard/views/download_ssh_commands.py
new file mode 100644 (file)
index 0000000..ba20885
--- /dev/null
@@ -0,0 +1,16 @@
+from view_common import *
+from core.xoslib.objects.sliceplus import SlicePlus
+
+class DownloadSSHCommandsView(View):
+    url = r'^sshcommands/(?P<sliceid>\d+)/$'
+
+    def get(self, request, sliceid=None, **kwargs):
+        #slice = Slices.objects.get(id=sliceid);
+        #for sliver in slice.slivers.all():
+        #    if (sliver.instance_id && sliver.instance_name):
+
+        slice = SlicePlus.objects.get(id=sliceid)
+
+
+        return HttpResponse(slice.getSliceInfo()["sshCommands"], content_type='text/text')
+