#NEWLINE# def _get_root_node( slice_urn , available ) : #NEWLINE# #INDENT# 'Create the root node and add all aggregates' #NEWLINE# from openflow.plugin.models import OpenFlowAggregate #NEWLINE# from expedient_geni.gopenflow.models import GCFOpenFlowAggregate #NEWLINE# root = et . Element ( RSPEC_TAG , { #NEWLINE# #INDENT# 'type' : 'openflow' , #NEWLINE# VERSION : CURRENT_ADV_VERSION , #NEWLINE# #UNINDENT# } ) #NEWLINE# aggregates = Aggregate . objects . filter_for_classes ( [ OpenFlowAggregate , GCFOpenFlowAggregate ] ) . filter ( available = True ) . exclude ( name__in = getattr ( settings , 'OPENFLOW_GAPI_FILTERED_AGGS' , [ ] ) ) #NEWLINE# for aggregate in aggregates : #NEWLINE# #INDENT# aggregate = aggregate . as_leaf_class ( ) #NEWLINE# _add_aggregate_node ( slice_urn , aggregate , slice_urn , available ) #NEWLINE# #UNINDENT# return root