Skip to content

Commit

Permalink
Handle deletion of vmi correctly in schema transformer
Browse files Browse the repository at this point in the history
Currently, schema transformer only deletes VMi from its internal database when
link to VM goes away. This causes problems for VMIs which are not attached to
any VMI (e.g. VMI created for TOR). As a result, when another VMI with same name
is created, schema transformer does not link it to the default RI. With this
change, if the link to its parent goes away, we will delete the VMI locally.

Change-Id: Ic17a31f67a3ca7ee6d7c136bf1d348224f561646
Closes-Bug: 1477371
  • Loading branch information
Sachin Bansal committed Sep 11, 2015
1 parent 980d993 commit f78e704
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/schema-transformer/to_bgp.py
Expand Up @@ -3119,6 +3119,11 @@ def delete_virtual_machine_interface_virtual_machine(self, idents, meta):
vm.delete_interface(vmi_name)
# end delete_virtual_machine_interface_virtual_machine

def delete_project_virtual_machine_interface(self, idents, meta):
vmi_name = idents['virtual-machine-interface']
VirtualMachineInterfaceST.delete(vmi_name)
# end delete_project_virtual_machine_interface

def add_virtual_machine_service_instance(self, idents, meta):
vm_name = idents['virtual-machine']
si_name = idents['service-instance']
Expand Down

0 comments on commit f78e704

Please sign in to comment.