def _create_floatingip_gbp(self, context, floatingip,<EOL>initial_status=FLOATINGIP_STATUS_ACTIVE):
result = None<EOL>fip = floatingip['<STR_LIT>']<EOL>if not fip.get('<STR_LIT>'):<EOL><INDENT>router_type_name = cfg.CONF.routing.default_router_type<EOL>driver = self._get_router_type_driver(context,<EOL>router_type_name)<EOL>if driver:<EOL><INDENT>fip_ctxt = driver_context.FloatingipContext(floatingip)<EOL>driver.create_floatingip_precommit(context, fip_ctxt)<EOL>nat_pool_list = getattr(context, '<STR_LIT>', [])<EOL>for nat_pool in nat_pool_list:<EOL><INDENT>if not nat_pool:<EOL><INDENT>continue<EOL><DEDENT>fip['<STR_LIT>'] = nat_pool['<STR_LIT>']<EOL>try:<EOL><INDENT>result = super(L3RouterApplianceDBMixin,<EOL>self).create_floatingip(context,<EOL>floatingip)<EOL>router_ids = ([result['<STR_LIT>']]<EOL>if result['<STR_LIT>'] else [])<EOL><DEDENT>except n_exc.IpAddressGenerationFailure as ex:<EOL><INDENT>LOG.info("<STR_LIT>",<EOL>ex.message)<EOL><DEDENT>if result:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if not result:<EOL><INDENT>result = super(L3RouterApplianceDBMixin,<EOL>self).create_floatingip(context,<EOL>floatingip, initial_status)<EOL>router_ids = [result['<STR_LIT>']] if result['<STR_LIT>'] else []<EOL><DEDENT>context.result = result<EOL>if driver:<EOL><INDENT>driver.create_floatingip_postcommit(context, fip_ctxt)<EOL><DEDENT>self._notify_affected_routers(context, router_ids, '<STR_LIT>')<EOL>return result<EOL>
Group Based Policy hanlding of Floating IP Creation.

        This version of the create_flaotingip is needed for the GBP workflow,
        as the pre-/post-commmit calls for creating the floating IP must be
        peformed in a loop with the database call in the grandparent class.