From: Yasin
Date: Thu, 2 Oct 2014 13:08:19 +0000 (+0200)
Subject: ssh ple and iotlab updated in tools page
X-Git-Tag: myslice-1.2~1^2~22
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8a25cdc6e98ebc42bc57d9025ba6590b486c3737;p=myslice.git
ssh ple and iotlab updated in tools page
---
diff --git a/portal/actions.py b/portal/actions.py
index b06ccdfe..4f4608bf 100644
--- a/portal/actions.py
+++ b/portal/actions.py
@@ -807,7 +807,7 @@ def iotlab_create_user (wsgi_request, request, namespace = None, as_admin=False)
"structure" : request['authority_hrn'],
"city" : "N/A",
"country" : "N/A",
- "sshPublicKey" : [request['public_key']],
+ "sshPublicKey" : request['public_key'],
"motivations" : "SFA federation",
}
diff --git a/portal/homeview.py b/portal/homeview.py
index b0236525..00b279d2 100644
--- a/portal/homeview.py
+++ b/portal/homeview.py
@@ -77,14 +77,15 @@ class HomeView (FreeAccessView, ThemeView):
account_query = Query().get('local:account').select('user_id','platform_id','auth_type','config')
platform_details = execute_query(self.request, platform_query)
account_details = execute_query(self.request, account_query)
- for platform_detail in platform_details:
- for account_detail in account_details:
- if platform_detail['platform_id'] == account_detail['platform_id']:
- if 'config' in account_detail and account_detail['config'] is not '':
- account_config = json.loads(account_detail['config'])
- if 'myslice' in platform_detail['platform']:
- acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
- acc_user_cred = account_config.get('delegated_user_credential','N/A')
+ if platform_details is not None and platform_details != {}:
+ for platform_detail in platform_details:
+ for account_detail in account_details:
+ if platform_detail['platform_id'] == account_detail['platform_id']:
+ if 'config' in account_detail and account_detail['config'] is not '':
+ account_config = json.loads(account_detail['config'])
+ if 'myslice' in platform_detail['platform']:
+ acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
+ acc_user_cred = account_config.get('delegated_user_credential','N/A')
# assigning values
if acc_auth_cred=={} or acc_auth_cred=='N/A':
pi = "is_not_pi"
@@ -133,15 +134,16 @@ class HomeView (FreeAccessView, ThemeView):
# XXX Something like an invalid session seems to make the execute fail sometimes, and thus gives an error on the main page
platform_details = execute_query(self.request, platform_query)
account_details = execute_query(self.request, account_query)
- for platform_detail in platform_details:
- for account_detail in account_details:
- if 'platform_id' in platform_detail:
- if platform_detail['platform_id'] == account_detail['platform_id']:
- if 'config' in account_detail and account_detail['config'] is not '':
- account_config = json.loads(account_detail['config'])
- if 'myslice' in platform_detail['platform']:
- acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
- acc_user_cred = account_config.get('delegated_user_credential','N/A')
+ if platform_details is not None and platform_details != {}:
+ for platform_detail in platform_details:
+ for account_detail in account_details:
+ if 'platform_id' in platform_detail:
+ if platform_detail['platform_id'] == account_detail['platform_id']:
+ if 'config' in account_detail and account_detail['config'] is not '':
+ account_config = json.loads(account_detail['config'])
+ if 'myslice' in platform_detail['platform']:
+ acc_auth_cred = account_config.get('delegated_authority_credentials','N/A')
+ acc_user_cred = account_config.get('delegated_user_credential','N/A')
# assigning values
if acc_auth_cred=={} or acc_auth_cred=='N/A':
pi = "is_not_pi"
diff --git a/portal/templates/slice-tab-experiment.html b/portal/templates/slice-tab-experiment.html
index 1430dae6..ef6ac0c3 100644
--- a/portal/templates/slice-tab-experiment.html
+++ b/portal/templates/slice-tab-experiment.html
@@ -9,14 +9,27 @@
on the reserved nodes. To access your slice on a resource just type the following command:
- $ ssh your_slice_name@planetlab-resource.hostname.com
+ $ ssh coverted_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
+
+ 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,
after witch you will be able to access the resource.
FIT IoT-Lab
+ FIT IoT-Lab resources are accessible directly via SSH and web GUI.
+ To acess IoT-Lab resources using web GUI, use the same login and password of OneLab portal. To acess Iot-Lab resources using SSH type
+ the following command:
+
+
+ ssh onelab_username@fit3-dev.inrialpes.fr
+
NITOS