def delete_interface(call=None, kwargs=None):
 global netconn
 if (not netconn):
  netconn = get_conn(NetworkManagementClient)
 if (kwargs.get('resource_group') is None):
  kwargs['resource_group'] = config.get_cloud_config_value('resource_group', {}, __opts__, search_global=True)
 ips = []
 iface = netconn.network_interfaces.get(kwargs['resource_group'], kwargs['iface_name'])
 iface_name = iface.name
 for ip_ in iface.ip_configurations:
  ips.append(ip_.name)
 poller = netconn.network_interfaces.delete(kwargs['resource_group'], kwargs['iface_name'])
 poller.wait()
 for ip_ in ips:
  poller = netconn.public_ip_addresses.delete(kwargs['resource_group'], ip_)
  poller.wait()
 return {iface_name: ips}

def delete_interface ( call = None , kwargs = None ) : global netconn if ( not netconn ) : netconn = get_conn ( NetworkManagementClient ) if ( kwargs . get ( 'resource_group' ) is None ) : kwargs [ 'resource_group' ] = config . get_cloud_config_value ( 'resource_group' , { } , __opts__ , search_global = True ) ips = [ ] iface = netconn . network_interfaces . get ( kwargs [ 'resource_group' ] , kwargs [ 'iface_name' ] ) iface_name = iface . name for ip_ in iface . ip_configurations : ips . append ( ip_ . name ) poller = netconn . network_interfaces . delete ( kwargs [ 'resource_group' ] , kwargs [ 'iface_name' ] ) poller . wait ( ) for ip_ in ips : poller = netconn . public_ip_addresses . delete ( kwargs [ 'resource_group' ] , ip_ ) poller . wait ( ) return { iface_name : ips }
create a network interface .