ssh ple and iotlab updated in tools page
authorYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 2 Oct 2014 13:08:19 +0000 (15:08 +0200)
committerYasin <mohammed-yasin.rahman@lip6.fr>
Thu, 2 Oct 2014 13:08:19 +0000 (15:08 +0200)
portal/actions.py
portal/homeview.py
portal/templates/slice-tab-experiment.html

index b06ccdf..4f4608b 100644 (file)
@@ -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",
     }    
    
index b023652..00b279d 100644 (file)
@@ -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"
index 1430dae..ef6ac0c 100644 (file)
@@ -9,14 +9,27 @@
                on the reserved nodes. To access your slice on a resource just type the following command:
        </p>
        <p class="command">
-               $ ssh your_slice_name@planetlab-resource.hostname.com
+               $ ssh coverted_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
+       </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, 
                after witch you will be able to access the resource.
        </p>
        
        <h3>FIT IoT-Lab</h3>
+       <p>FIT IoT-Lab resources are accessible directly via SSH and <a href="https://devgrenoble.senslab.info/testbed/" target="_blank">web GUI.</a>
+               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:
+       </p>
+       <p class="command">
+               ssh onelab_username@fit3-dev.inrialpes.fr
+       </p>
        
        <h3>NITOS</h3>