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:
@@ -687,6 +687,11 @@ def virtual_interface_delete_by_instance(context, instance_id):
|
|||||||
return IMPL.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):
|
def virtual_interface_get_all(context):
|
||||||
"""Gets all virtual interfaces from the table."""
|
"""Gets all virtual interfaces from the table."""
|
||||||
return IMPL.virtual_interface_get_all(context)
|
return IMPL.virtual_interface_get_all(context)
|
||||||
|
@@ -1640,6 +1640,18 @@ def virtual_interface_delete_by_instance(context, instance_uuid):
|
|||||||
soft_delete()
|
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
|
@require_context
|
||||||
@pick_context_manager_reader
|
@pick_context_manager_reader
|
||||||
def virtual_interface_get_all(context):
|
def virtual_interface_get_all(context):
|
||||||
|
Reference in New Issue
Block a user