Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorYasin <mohammed-yasin.rahman@lip6.fr>
Mon, 6 Oct 2014 13:18:46 +0000 (15:18 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Mon, 6 Oct 2014 13:18:46 +0000 (15:18 +0200)
portal/slicetabexperiment.py
portal/templates/slice-tab-experiment.html

index cca8afb..b1020a1 100644 (file)
@@ -18,6 +18,11 @@ class ExperimentView (FreeAccessView, ThemeView):
     template_name = 'slice-tab-experiment.html'
 
     def get (self, request, slicename, state=None):
+  
+        username = self.request.user    
         
-        return render_to_response(self.template, { 'theme' : self.theme }, context_instance=RequestContext(request))
+        split_slicename = slicename.split('.')
+        ple_slicename = split_slicename[0] + '8' + split_slicename[1] + '_' + split_slicename[2]
+
+        return render_to_response(self.template, { 'theme' : self.theme,'slicename':slicename, 'ple_slicename':ple_slicename, 'username':username }, context_instance=RequestContext(request))
 
index 4d58fe5..b6c7c5c 100644 (file)
@@ -9,13 +9,9 @@
                on the reserved nodes. To access your slice on a resource just type the following command:
        </p>
        <p class="command">
-               $ ssh converted_slice_name@planetlab-resource.hostname.com
-       </p>
-       <p>You need to convert your typical slicename into a specific format in order to do SSH. An example below will demonstrate the conversion:</p>
-       <p class="command">
-               Typical slice_name = onelab.upmc.mytestslice<br>
-               converted_slice_name = onelab8upmc_mytestslice
+               $ ssh {{ple_slicename}}@planetlab-resource.hostname.com
        </p>
+       <p><strong>NOTE:</strong> Your typical slicename <b>{{slicename}}</b> has been converted to PlanetLab specific format <b>{{ple_slicename}}</b> in order to do SSH.</p>
        <p>Please note that the first '.' is replaced by number 8 and the rest of the dot/s are replaced by underscore/s.</p>
        <p>
                Be aware that after you reserve a PlanetLab Europe resource your slice will be deployed with a delay of about 15 minutes, 
@@ -28,7 +24,7 @@
                the following command:
        </p>
        <p class="command">
-               ssh onelab_username@fit3-dev.inrialpes.fr
+               ssh {{username}}@fit3-dev.inrialpes.fr
        </p>
        
        <h3>NITOS</h3>
@@ -38,7 +34,7 @@
         The NITOS server address is nitlab.inf.uth.gr, so to connect to the NITOS server:
        </p>
        <p class="command">
-       $ ssh your_slice_name@nitlab.inf.uth.gr
+       $ ssh {{slicename}}@nitlab.inf.uth.gr
        </p>
        
        <p>