1 from view_common import *
2 from core.xoslib.objects.sliceplus import SlicePlus
4 # This was intended to serve as a download feature for the tenant view. Found
5 # a better way to do it. This is deprecated.
7 class DownloadSSHCommandsView(View):
8 url = r'^sshcommands/(?P<sliceid>\d+)/$'
10 def get(self, request, sliceid=None, **kwargs):
11 #slice = Slices.objects.get(id=sliceid);
12 #for sliver in slice.slivers.all():
13 # if (sliver.instance_id && sliver.instance_name):
15 slice = SlicePlus.objects.get(id=sliceid)
17 return HttpResponse(slice.getSliceInfo()["sshCommands"], content_type='text/text')