def create_scalingip(context, content):
LOG.info('<STR_LIT>',<EOL>context.tenant_id, content)<EOL>network_id = content.get('<STR_LIT>')<EOL>ip_address = content.get('<STR_LIT>')<EOL>requested_ports = content.get('<STR_LIT>', [])<EOL>network = _get_network(context, network_id)<EOL>port_fixed_ips = {}<EOL>for req_port in requested_ports:<EOL><INDENT>port = _get_port(context, req_port['<STR_LIT>'])<EOL>fixed_ip = _get_fixed_ip(context, req_port.get('<STR_LIT>'),<EOL>port)<EOL>port_fixed_ips[port.id] = {"<STR_LIT:port>": port, "<STR_LIT>": fixed_ip}<EOL><DEDENT>scip = _allocate_ip(context, network, None, ip_address, ip_types.SCALING)<EOL>_create_flip(context, scip, port_fixed_ips)<EOL>return v._make_scaling_ip_dict(scip)<EOL>
Allocate or reallocate a scaling IP.

    :param context: neutron api request context.
    :param content: dictionary describing the scaling ip, with keys
        as listed in the RESOURCE_ATTRIBUTE_MAP object in
        neutron/api/v2/attributes.py.  All keys will be populated.

    :returns: Dictionary containing details for the new scaling IP.  If values
        are declared in the fields parameter, then only those keys will be
        present.