Merge "db: querry to retrieve all pci device by parent address"
This commit is contained in:
commit
3dc2055611
@ -1545,6 +1545,12 @@ def pci_device_get_all_by_instance_uuid(context, instance_uuid):
|
||||
return IMPL.pci_device_get_all_by_instance_uuid(context, instance_uuid)
|
||||
|
||||
|
||||
def pci_device_get_all_by_parent_addr(context, node_id, parent_addr):
|
||||
"""Get all PCI devices by parent address."""
|
||||
return IMPL.pci_device_get_all_by_parent_addr(context, node_id,
|
||||
parent_addr)
|
||||
|
||||
|
||||
def pci_device_destroy(context, node_id, address):
|
||||
"""Delete a PCI device record."""
|
||||
return IMPL.pci_device_destroy(context, node_id, address)
|
||||
|
@ -6439,6 +6439,13 @@ def pci_device_get_all_by_node(context, node_id):
|
||||
all()
|
||||
|
||||
|
||||
def pci_device_get_all_by_parent_addr(context, node_id, parent_addr):
|
||||
return model_query(context, models.PciDevice).\
|
||||
filter_by(compute_node_id=node_id).\
|
||||
filter_by(parent_addr=parent_addr).\
|
||||
all()
|
||||
|
||||
|
||||
@require_context
|
||||
@main_context_manager.reader
|
||||
def pci_device_get_all_by_instance_uuid(context, instance_uuid):
|
||||
|
Loading…
x
Reference in New Issue
Block a user