#NEWLINE# def get_as_elem( self ) : #NEWLINE# #INDENT# '\n        Return the node as an ElementTree element.\n        \n        @return: the NodeSpec element\n        @rtype: C{xml.etree.ElementTree.Element}\n        ' #NEWLINE# node_elem = et . Element ( 'NodeSpec' , dict ( name = self . name , type = self . type , init_params = self . init_params , cpu_min = self . cpu_min , cpu_share = self . cpu_share , cpu_pct = self . cpu_pct , disk_max = self . disk_max ) ) #NEWLINE# net_if = et . SubElement ( node_elem , 'net_if' ) #NEWLINE# for iface in self . planetlabinterface_set . all ( ) : #NEWLINE# #INDENT# net_if . append ( iface . get_as_elem ( ) ) #NEWLINE# #UNINDENT# return node_elem