From: Yasin
Date: Mon, 6 Oct 2014 13:18:46 +0000 (+0200)
Subject: Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
X-Git-Tag: myslice-1.2~1^2~17
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1f8c2c50c3810598d61659dd7b1a238ef4def369;hp=aad516bfc9396270961493b33a875f7cd2a3f941;p=myslice.git
Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
---
diff --git a/portal/slicetabexperiment.py b/portal/slicetabexperiment.py
index cca8afbd..b1020a16 100644
--- a/portal/slicetabexperiment.py
+++ b/portal/slicetabexperiment.py
@@ -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))
diff --git a/portal/templates/slice-tab-experiment.html b/portal/templates/slice-tab-experiment.html
index 4d58fe51..b6c7c5c4 100644
--- a/portal/templates/slice-tab-experiment.html
+++ b/portal/templates/slice-tab-experiment.html
@@ -9,13 +9,9 @@
on the reserved nodes. To access your slice on a resource just type the following command:
- $ ssh converted_slice_name@planetlab-resource.hostname.com
-
- You need to convert your typical slicename into a specific format in order to do SSH. An example below will demonstrate the conversion:
-
- Typical slice_name = onelab.upmc.mytestslice
- converted_slice_name = onelab8upmc_mytestslice
+ $ ssh {{ple_slicename}}@planetlab-resource.hostname.com
+ NOTE: Your typical slicename {{slicename}} has been converted to PlanetLab specific format {{ple_slicename}} in order to do SSH.
Please note that the first '.' is replaced by number 8 and the rest of the dot/s are replaced by underscore/s.
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:
- ssh onelab_username@fit3-dev.inrialpes.fr
+ ssh {{username}}@fit3-dev.inrialpes.fr
NITOS
@@ -38,7 +34,7 @@
The NITOS server address is nitlab.inf.uth.gr, so to connect to the NITOS server:
- $ ssh your_slice_name@nitlab.inf.uth.gr
+ $ ssh {{slicename}}@nitlab.inf.uth.gr