示例#1
0
    def disassociate(cls, context, address):
        db_fixed = db.floating_ip_disassociate(context, str(address))

        return cls(context=context, address=address,
                   fixed_ip_id=db_fixed['id'],
                   fixed_ip=objects.FixedIP._from_db_object(
                       context, objects.FixedIP(context), db_fixed,
                       expected_attrs=['network']))
示例#2
0
    def disassociate(cls, context, address):
        db_fixed = db.floating_ip_disassociate(context, str(address))

        return cls(context=context, address=address,
                   fixed_ip_id=db_fixed['id'],
                   fixed_ip=objects.FixedIP._from_db_object(
                       context, objects.FixedIP(context), db_fixed,
                       expected_attrs=['network']))
示例#3
0
文件: floating_ip.py 项目: CLisa/nova
    def disassociate(cls, context, address):
        db_fixed = db.floating_ip_disassociate(context, address)

        floating = FloatingIP(
            context=context, address=address,
            fixed_ip_id=db_fixed['id'],
            fixed_ip=fixed_ip.FixedIP._from_db_object(
                context, fixed_ip.FixedIP(), db_fixed,
                expected_attrs=['network']))
        return floating
    def disassociate(cls, context, address):
        db_fixed = db.floating_ip_disassociate(context, address)

        floating = FloatingIP(
            context=context, address=address,
            fixed_ip_id=db_fixed['id'],
            fixed_ip=fixed_ip.FixedIP._from_db_object(
                context, fixed_ip.FixedIP(), db_fixed,
                expected_attrs=['network']))
        return floating
示例#5
0
    def disassociate(cls, context, address):
        db_fixed = db.floating_ip_disassociate(context, address)

        return cls(
            context=context,
            address=address,
            fixed_ip_id=db_fixed["id"],
            fixed_ip=objects.FixedIP._from_db_object(
                context, objects.FixedIP(context), db_fixed, expected_attrs=["network"]
            ),
        )