#NEWLINE# def create( self , link , extras ) : #NEWLINE# #INDENT# "\n        As nova does not support creation of L2 networks we don't.\n        " #NEWLINE# if ( link . target . identifier == '/network/public' ) : #NEWLINE# #INDENT# if ( ( not ( 'org.openstack.network.floating.pool' in link . attributes ) ) and ( os_addon . OS_NET_LINK in link . mixins ) ) : #NEWLINE# #INDENT# raise AttributeError ( 'Please specify the pool name when using this mixin!' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( os_addon . OS_NET_LINK in link . mixins ) : #NEWLINE# #INDENT# pool = link . attributes [ 'org.openstack.network.floating.pool' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# pool = None #NEWLINE# #UNINDENT# #UNINDENT# address = net . add_floating_ip ( link . source . attributes [ 'occi.core.id' ] , pool , link [ 'nova_ctx' ] ) #NEWLINE# link . attributes [ 'occi.networkinterface.interface' ] = 'eth0' #NEWLINE# link . attributes [ 'occi.networkinterface.mac' ] = 'aa:bb:cc:dd:ee:ff' #NEWLINE# link . attributes [ 'occi.networkinterface.state' ] = 'active' #NEWLINE# link . attributes [ 'occi.networkinterface.address' ] = address #NEWLINE# link . attributes [ 'occi.networkinterface.gateway' ] = '0.0.0.0' #NEWLINE# link . attributes [ 'occi.networkinterface.allocation' ] = 'static' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise AttributeError ( 'Currently not supported.' )