def update_floating_ip(self, floating_ip, port_fixed_ips):
url = "<STR_LIT>" % (CONF.QUARK.floating_ip_base_url,<EOL>floating_ip["<STR_LIT>"])<EOL>timeout = CONF.QUARK.unicorn_api_timeout_seconds<EOL>req = self._build_request_body(floating_ip, port_fixed_ips)<EOL>try:<EOL><INDENT>LOG.info("<STR_LIT>"<EOL>% (url, req))<EOL>r = requests.put(url, data=json.dumps(req), timeout=timeout)<EOL><DEDENT>except Exception as e:<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>% (floating_ip.id, e.message))<EOL>raise ex.RegisterFloatingIpFailure(id=floating_ip.id)<EOL><DEDENT>if r.status_code != <NUM_LIT:200> and r.status_code != <NUM_LIT>:<EOL><INDENT>msg = "<STR_LIT>""<STR_LIT>" % (r.status_code, r.json())<EOL>LOG.error("<STR_LIT>" % msg)<EOL>raise ex.RegisterFloatingIpFailure(id=floating_ip.id)<EOL><DEDENT>
Update an existing floating ip with Unicorn

        :param floating_ip: The quark.db.models.IPAddress to update
        :param port_fixed_ips: A dictionary containing the port and fixed ips
        to associate the floating IP with.  Has the structure of:
        {"<id of port>": {"port": <quark.db.models.Port>,
         "fixed_ip": "<fixed ip address>"}}
        :return: None