def delete_network_precommit(self, context):
segments = context.network_segments<EOL>for segment in segments:<EOL><INDENT>if not self.check_segment(segment):<EOL><INDENT>return  <EOL><DEDENT>vlan_id = segment.get(api.SEGMENTATION_ID)<EOL>if not vlan_id:<EOL><INDENT>return  <EOL><DEDENT>self.ucsm_db.delete_vlan_entry(vlan_id)<EOL>if any([True for ip, ucsm in CONF.ml2_cisco_ucsm.ucsms.items()<EOL>if ucsm.sp_template_list]):<EOL><INDENT>self.ucsm_db.delete_sp_template_for_vlan(vlan_id)<EOL><DEDENT>if any([True for ip, ucsm in CONF.ml2_cisco_ucsm.ucsms.items()<EOL>if ucsm.vnic_template_list]):<EOL><INDENT>self.ucsm_db.delete_vnic_template_for_vlan(vlan_id)<EOL><DEDENT><DEDENT>
Delete entry corresponding to Network's VLAN in the DB.