From ad1b801fdfa48a26996efa6d4fbecd64c68d043d Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Fri, 6 Jan 2012 20:16:11 -0500 Subject: [PATCH] element should have it's 'username' attribute set to the sliver's plc slice name --- sfa/plc/plaggregate.py | 5 +++-- sfa/rspecs/elements/login.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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' ] -- 2.43.0