Add VirtualInterface.destroy()
This adds a destroy() method for VirtualInterface which has not been required before but is now. Change-Id: Ie00f52153a816049f8efcc9aa8071371ce0b7e5a Related-Bug: #1602357
This commit is contained in:
parent
2714909fe8
commit
27d98d29c6
@ -687,6 +687,11 @@ def virtual_interface_delete_by_instance(context, instance_id):
|
||||
return IMPL.virtual_interface_delete_by_instance(context, instance_id)
|
||||
|
||||
|
||||
def virtual_interface_delete(context, id):
|
||||
"""Delete virtual interface by id."""
|
||||
return IMPL.virtual_interface_delete(context, id)
|
||||
|
||||
|
||||
def virtual_interface_get_all(context):
|
||||
"""Gets all virtual interfaces from the table."""
|
||||
return IMPL.virtual_interface_get_all(context)
|
||||
|
@ -1640,6 +1640,18 @@ def virtual_interface_delete_by_instance(context, instance_uuid):
|
||||
soft_delete()
|
||||
|
||||
|
||||
@require_context
|
||||
@pick_context_manager_writer
|
||||
def virtual_interface_delete(context, id):
|
||||
"""Delete virtual interface records.
|
||||
|
||||
:param id: id of the interface
|
||||
"""
|
||||
_virtual_interface_query(context).\
|
||||
filter_by(id=id).\
|
||||
soft_delete()
|
||||
|
||||
|
||||
@require_context
|
||||
@pick_context_manager_reader
|
||||
def virtual_interface_get_all(context):
|
||||
|
Loading…
Reference in New Issue
Block a user