#NEWLINE# def _updated_subnetpool_dict( self , model , new_pool ) : #NEWLINE# #INDENT# updated = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# new_prefixes = new_pool . get ( 'prefixes' , constants . ATTR_NOT_SPECIFIED ) #NEWLINE# orig_prefixes = [ str ( x . cidr ) for x in model [ 'prefixes' ] ] #NEWLINE# if ( new_prefixes is not constants . ATTR_NOT_SPECIFIED ) : #NEWLINE# #INDENT# orig_set = netaddr . IPSet ( orig_prefixes ) #NEWLINE# new_set = netaddr . IPSet ( new_prefixes ) #NEWLINE# if ( not orig_set . issubset ( new_set ) ) : #NEWLINE# #INDENT# msg = _ ( 'Existing prefixes must be a subset of the new prefixes' ) #NEWLINE# raise n_exc . IllegalSubnetPoolPrefixUpdate ( msg = msg ) #NEWLINE# #UNINDENT# new_set . compact ( ) #NEWLINE# updated [ 'prefixes' ] = [ str ( x . cidr ) for x in new_set . iter_cidrs ( ) ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# updated [ 'prefixes' ] = orig_prefixes #NEWLINE# #UNINDENT# for key in [ 'id' , 'name' , 'ip_version' , 'min_prefixlen' , 'max_prefixlen' , 'default_prefixlen' , 'is_default' , 'shared' , 'default_quota' , 'address_scope_id' , 'standard_attr' , 'description' ] : #NEWLINE# #INDENT# self . _write_key ( key , updated , model , new_pool ) #NEWLINE# #UNINDENT# return updated