blob: 96d13934a433e9b307f18ae25b44caff049e2b24 [file] [log] [blame]
Scott Bakerc0ec1d82015-01-25 11:49:56 -08001from view_common import *
2from core.xoslib.objects.sliceplus import SlicePlus
3
Scott Bakera4887352015-01-25 17:05:14 -08004# This was intended to serve as a download feature for the tenant view. Found
5# a better way to do it. This is deprecated.
6
Scott Bakerc0ec1d82015-01-25 11:49:56 -08007class DownloadSSHCommandsView(View):
8 url = r'^sshcommands/(?P<sliceid>\d+)/$'
9
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):
14
15 slice = SlicePlus.objects.get(id=sliceid)
16
Scott Bakerc0ec1d82015-01-25 11:49:56 -080017 return HttpResponse(slice.getSliceInfo()["sshCommands"], content_type='text/text')
18