def _remove_vlan_from_all_service_profiles(self, handle, vlan_id, ucsm_ip):
service_profile_list = []<EOL>for key, value in six.iteritems(self.ucsm_sp_dict):<EOL><INDENT>if (ucsm_ip in key) and value:<EOL><INDENT>service_profile_list.append(value)<EOL><DEDENT><DEDENT>if not service_profile_list:<EOL><INDENT>return<EOL><DEDENT>try:<EOL><INDENT>handle.StartTransaction()<EOL>for service_profile in service_profile_list:<EOL><INDENT>virtio_port_list = (<EOL>CONF.ml2_cisco_ucsm.ucsms[ucsm_ip].ucsm_virtio_eth_ports)<EOL>eth_port_paths = ["<STR_LIT>" % (service_profile, ep)<EOL>for ep in virtio_port_list]<EOL>obj = handle.GetManagedObject(<EOL>None,<EOL>self.ucsmsdk.LsServer.ClassId(),<EOL>{self.ucsmsdk.LsServer.DN: service_profile})<EOL>if obj:<EOL><INDENT>for eth_port_path in eth_port_paths:<EOL><INDENT>eth = handle.GetManagedObject(<EOL>obj, self.ucsmsdk.VnicEther.ClassId(),<EOL>{self.ucsmsdk.VnicEther.DN: eth_port_path},<EOL>True)<EOL>if eth:<EOL><INDENT>vlan_name = self.make_vlan_name(vlan_id)<EOL>vlan_path = eth_port_path + "<STR_LIT>" + vlan_name<EOL>vlan = handle.GetManagedObject(eth,<EOL>self.ucsmsdk.VnicEtherIf.ClassId(),<EOL>{self.ucsmsdk.VnicEtherIf.DN: vlan_path})<EOL>if vlan:<EOL><INDENT>handle.RemoveManagedObject(vlan)<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>handle.CompleteTransaction()<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise cexc.UcsmConfigDeleteFailed(config=vlan_id,<EOL>ucsm_ip=ucsm_ip,<EOL>exc=e)<EOL><DEDENT>
Deletes VLAN Profile config from server's ethernet ports.