Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/logic/servers.py   synnefo(Download)
        # the user specified or a random one.
        if network.subnets.filter(ipversion=4).exists():
            ipaddress = ips.allocate_ip(network, userid=userid,
                                        address=address)
        elif address is not None:
            ipaddress = ips.allocate_public_ip(user_id)
        else:
            ipaddress = ips.allocate_ip(network, user_id)
    else:
        raise ValueError("Unknown category: %s" % category)

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/logic/backend.py   synnefo(Download)
 
    if version == 4:
        ipaddress = ips.allocate_ip(port.network, userid, address=new_address)
        ipaddress.nic = port
        ipaddress.save()

src/s/y/synnefo-HEAD/snf-cyclades-app/synnefo/api/ports.py   synnefo(Download)
                                                    for_update=True)
    elif fixed_ip_address:
        ipaddress = ips.allocate_ip(network, user_id,
                                    address=fixed_ip_address)