Index: fedd/federation/experiment_partition.py
===================================================================
--- fedd/federation/experiment_partition.py	(revision 814b5e5b5dc9a550eb5f9f31c2323ace176d7d37)
+++ fedd/federation/experiment_partition.py	(revision f769cb349909de3ef4cdd95a91f13f06be537a69)
@@ -74,8 +74,10 @@
 
 	if seer_master:
-	    mdomain = tbparams[seer_master].get('domain', '.example.com')
-	    mproject = tbparams[seer_master].get('project', 'project')
-	    muser = tbparams[seer_master].get('user', 'root')
-	    smbshare = tbparams[seer_master].get('smbshare', 'USERS')
+	    mdomain = tbparams[seer_master].get_attribute('domain', 
+		    '.example.com')
+	    mproject = tbparams[seer_master].get_attribute('project', 
+		    'project')
+	    muser = tbparams[seer_master].get_attribute('user', 'root')
+	    smbshare = tbparams[seer_master].get_attribute('smbshare', 'USERS')
 	else:
 	    mdomain = '.example.com'
@@ -84,6 +86,6 @@
 	    smbshare = 'USERS'
 
-	dproject = tbparams[dt].get('project', 'project')
-	ddomain = tbparams[dt].get('domain', '.example.com')
+	dproject = tbparams[dt].get_attribute('project', 'project')
+	ddomain = tbparams[dt].get_attribute('domain', '.example.com')
 
 	if (st in masters and dt not in masters) or \
@@ -108,5 +110,5 @@
 	if conn_type == "ssh":
 	    try:
-		aid = tbparams[st]['allocID']['fedid']
+		aid = tbparams[st].allocID
 	    except:
 		self.log.debug("[new_portal_node] Can't get alloc id for %s?" \
@@ -178,6 +180,6 @@
 
     def new_portal_substrate(self, st, dt, eid, tbparams, expid):
-	ddomain = tbparams[dt].get('domain', ".example.com")
-	dproject = tbparams[dt].get('project', 'project')
+	ddomain = tbparams[dt].get_attribute('domain', ".example.com")
+	dproject = tbparams[dt].get_attribute('project', 'project')
 	tsubstrate = \
 		topdl.Substrate(name='%s-%s' % (st, dt),
@@ -189,5 +191,5 @@
 			)
 	segment_element = topdl.Segment(
-		id= tbparams[dt]['allocID'],
+		id= {'fedid': tbparams[dt].allocID },
 		type='emulab',
 		uri = self.tbmap.get(testbed_base(dt), None),
@@ -222,5 +224,5 @@
 	for tb in tbs.keys():
 	    seg = topdl.Segment(
-		    id = tbparams[tb]['allocID'],
+		    id = { 'fedid':tbparams[tb].allocID },
 		    type='emulab',
 		    uri = self.tbmap.get(testbed_base(tb), None),
@@ -231,10 +233,11 @@
 		    attribute=[ topdl.Attribute(
 			attribute='%s_endpoint' % tb_name, 
-			value=tbparams[tb][tb_name]),
+			value=tbparams[tb].get_attribute(tb_name)),
 			]
 		    )
 	    vlan_key = "%s_vlans" % tb_name
-	    if vlan_key in tbparams[tb]:
-		seg.set_attribute(vlan_key, tbparams[tb][vlan_key])
+	    if tbparams[tb].get_attribute(vlan_key) is not None:
+		seg.set_attribute(vlan_key, 
+			tbparams[tb].get_attribute(vlan_key))
 	    segs.append(seg)
 
@@ -242,5 +245,5 @@
 	    # vlan_id
 	    try:
-		aid = tbparams[tb]['allocID']['fedid']
+		aid = tbparams[tb].allocID
 		self.auth.set_attribute(aid, store_key)
 	    except:
@@ -292,6 +295,7 @@
 
 	if seer_master:
-	    mdomain = tbparams[seer_master].get('domain', '.example.com')
-	    mproject = tbparams[seer_master].get('project', 'project')
+	    mdomain = tbparams[seer_master].get_attribute('domain',
+		    '.example.com')
+	    mproject = tbparams[seer_master].get_attribute('project', 'project')
 	else:
 	    mdomain = '.example.com'
@@ -311,5 +315,5 @@
 
 		try:
-		    aid = tbparams[tb]['allocID']['fedid']
+		    aid = tbparams[tb].allocID
 		except:
 		    self.log.debug("[create_direct_substrate] " + 
@@ -370,9 +374,9 @@
 		connInfo[st] = [ ]
 	    for dt in [ t for t in tbs.keys() if t != st]:
-		sproject = tbparams[st].get('project', 'project')
-		dproject = tbparams[dt].get('project', 'project')
-		sdomain = tbparams[st].get('domain', ".example.com")
-		ddomain = tbparams[dt].get('domain', ".example.com")
-		aid = tbparams[dt]['allocID']['fedid']
+		sproject = tbparams[st].get_attribute('project', 'project')
+		dproject = tbparams[dt].get_attribute('project', 'project')
+		sdomain = tbparams[st].get_attribute('domain', ".example.com")
+		ddomain = tbparams[dt].get_attribute('domain', ".example.com")
+		aid = tbparams[dt].allocID
 
 		seer_master = None
@@ -386,8 +390,11 @@
 
 		if seer_master:
-		    mdomain = tbparams[seer_master].get('domain', '.example.com')
-		    mproject = tbparams[seer_master].get('project', 'project')
-		    muser = tbparams[seer_master].get('user', 'root')
-		    smbshare = tbparams[seer_master].get('smbshare', 'USERS')
+		    mdomain = tbparams[seer_master].get_attribute('domain',
+			    '.example.com')
+		    mproject = tbparams[seer_master].get_attribute('project', 
+			    'project')
+		    muser = tbparams[seer_master].get_attribute('user', 'root')
+		    smbshare = tbparams[seer_master].get_attribute('smbshare',
+			    'USERS')
 		else:
 		    mdomain = '.example.com'
@@ -541,5 +548,5 @@
 		# transits is applicable, use the internet.
 		for d in self.direct_transit:
-		    if all([tbparams[x].has_key(d) for x in tbs]):
+		    if all([tbparams[x].get_attribute(d) for x in tbs]):
 			self.create_direct_substrate(s, topo, tbs, tbparams, 
 				masters, eid, connInfo, expid, d)
@@ -574,6 +581,6 @@
 		    for tb_name in self.direct_transit:
 
-			if tbparams[mtb].has_key(tb_name) \
-				and tbparams[tb].has_key(tb_name):
+			if tbparams[mtb].get_attribute(tb_name) \
+				and tbparams[tb].get_attribute(tb_name):
 
 			    idx = len([x for x in topo.keys() \
@@ -593,5 +600,5 @@
 				    )
 			    seg = topdl.Segment(
-				    id= tbparams[mtb]['allocID'],
+				    id= {'fedid': tbparams[mtb].allocID},
 				    type='emulab',
 				    uri = self.tbmap.get(testbed_base(mtb),
@@ -605,8 +612,9 @@
 					    for n, v in (\
 						('domain', 
-						    tbparams[mtb].get('domain',
+						    tbparams[mtb].getattribute(
+							'domain',
 							".example.com")),
 						('experiment', "%s/%s" % \
-							(tbparams[mtb].get(
+							(tbparams[mtb].get_attribute(
 							    'project', 
 							    'project'), 
@@ -623,5 +631,5 @@
 			    mcsub = csub.clone()
 			    seg = topdl.Segment(
-				    id= tbparams[tb]['allocID'],
+				    id= { 'fedid': tbparams[tb].allocID},
 				    type='emulab',
 				    uri = self.tbmap.get(testbed_base(tb),
@@ -635,8 +643,10 @@
 					    for n, v in (\
 						('domain', 
-						    tbparams[tb].get('domain',
+						    tbparams[tb].get_attribute(
+							'domain',
 							".example.com")),
 						('experiment', "%s/%s" % \
-							(tbparams[tb].get('project', 
+							(tbparams[tb].get_attribute(
+							    'project', 
 							    'project'), 
 							    eid)),)
