From: Tony Mack Date: Sat, 7 Jan 2012 01:16:11 +0000 (-0500) Subject: element should have it's 'username' attribute set to the sliver's plc slice... X-Git-Tag: sfa-2.0-9~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ad1b801fdfa48a26996efa6d4fbecd64c68d043d;p=sfa.git element should have it's 'username' attribute set to the sliver's plc slice name --- diff --git a/sfa/plc/plaggregate.py b/sfa/plc/plaggregate.py index d5812107..1cace7a9 100644 --- a/sfa/plc/plaggregate.py +++ b/sfa/plc/plaggregate.py @@ -127,7 +127,8 @@ class PlAggregate: # most likely a default/global sliver attribute (node_id == None) if tag['node_id'] not in slivers: sliver = Sliver({'sliver_id': urn_to_sliver_id(slice_urn, slice['slice_id'], ""), - 'name': 'plab-vserver', + 'name': slice['name'], + 'type': 'plab-vserver', 'tags': []}) slivers[tag['node_id']] = sliver slivers[tag['node_id']]['tags'].append(tag) @@ -221,7 +222,7 @@ class PlAggregate: rspec_node['slivers'] = [sliver] # slivers always provide the ssh service - login = Login({'authentication': 'ssh-keys', 'hostname': node['hostname'], 'port':'22'}) + login = Login({'authentication': 'ssh-keys', 'hostname': node['hostname'], 'port':'22', 'username': sliver['name']}) service = Services({'login': login}) rspec_node['services'] = [service] rspec_nodes.append(rspec_node) diff --git a/sfa/rspecs/elements/login.py b/sfa/rspecs/elements/login.py index ae42641b..99dc5c3b 100644 --- a/sfa/rspecs/elements/login.py +++ b/sfa/rspecs/elements/login.py @@ -4,5 +4,6 @@ class Login(Element): fields = [ 'authentication', 'hostname', - 'port' + 'port', + 'username' ]