Scott Baker | c0ec1d8 | 2015-01-25 11:49:56 -0800 | [diff] [blame^] | 1 | from view_common import * |
| 2 | from core.xoslib.objects.sliceplus import SlicePlus |
| 3 | |
| 4 | class DownloadSSHCommandsView(View): |
| 5 | url = r'^sshcommands/(?P<sliceid>\d+)/$' |
| 6 | |
| 7 | def get(self, request, sliceid=None, **kwargs): |
| 8 | #slice = Slices.objects.get(id=sliceid); |
| 9 | #for sliver in slice.slivers.all(): |
| 10 | # if (sliver.instance_id && sliver.instance_name): |
| 11 | |
| 12 | slice = SlicePlus.objects.get(id=sliceid) |
| 13 | |
| 14 | |
| 15 | return HttpResponse(slice.getSliceInfo()["sshCommands"], content_type='text/text') |
| 16 | |