Example #1
0
def bm_pxe_ip_create(context, address, server_address, session=None):
    if not session:
        session = get_session()
    ref = models.BareMetalPxeIp()
    ref.address = address
    ref.server_address = server_address
    ref.save(session=session)
    return ref
Example #2
0
def new_bm_pxe_ip(**kwargs):
    x = bm_models.BareMetalPxeIp()
    x.id = kwargs.pop('id', None)
    x.address = kwargs.pop('address', None)
    x.server_address = kwargs.pop('server_address', None)
    x.bm_node_id = kwargs.pop('bm_node_id', None)
    if len(kwargs) > 0:
        raise test.TestingException("unknown field: %s" %
                                    ','.join(kwargs.keys()))
    return x
Example #3
0
File: api.py Project: ameade/nova
def bm_pxe_ip_create(context, address, server_address):
    ref = models.BareMetalPxeIp()
    ref.address = address
    ref.server_address = server_address
    _save(ref)
    return ref