Deletes the specified virtual MFA device.

    CLI Example:

    .. code-block:: bash

        salt myminion boto_iam.delete_virtual_mfa_device serial_num
976169
def delete_virtual_mfa_device(serial, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = __utils__['boto3.get_connection_func']('iam')()
    try:
        conn.delete_virtual_mfa_device(SerialNumber=serial)
        log.info('Deleted virtual MFA device %s.', serial)
        return True
    except botocore.exceptions.ClientError as e:
        log.debug(e)
        if 'NoSuchEntity' in six.text_type(e):
            log.info('Virtual MFA device %s not found.', serial)
            return True
        log.error('Failed to delete virtual MFA device %s.', serial)
        return False
643269
def delete(event, saltenv='base', test=None):
    '''
    
    '''
    sevent = salt.utils.event.get_event(
            'master',
            __opts__['sock_dir'],
            __opts__['transport'],
            opts=__opts__,
            listen=True)

    master_key = salt.utils.master.get_master_key('root', __opts__)

    __jid_event__.fire_event({'event': event, 'key': master_key}, 'salt/reactors/manage/delete')

    res = sevent.get_event(wait=30, tag='salt/reactors/manage/delete-complete')
    return res['result']
896680
def delete(instance_id, profile=None, **kwargs):
    '''
    

    '''
    conn = _auth(profile, **kwargs)
    return conn.delete(instance_id)
579470
def deleteJID(self, bare_jid):
        

        yield self.runInactiveDeviceCleanup()

        self.__sessions_cache.pop(bare_jid, None)
        self.__devices_cache.pop(bare_jid, None)
        self.__trust_cache.pop(bare_jid, None)

        yield self._storage.deleteJID(bare_jid)
914289
def MI_deleteInstance(self,
                          env,
                          instanceName):
        # pylint: disable=invalid-name
        

        logger = env.get_logger()
        logger.log_debug('CIMProvider MI_deleteInstance called...')
        self.delete_instance(env=env, instance_name=instanceName)
        logger.log_debug('CIMProvider MI_deleteInstance returning')
318987
def DbDeleteDeviceAlias(self, argin):
        
        self._log.debug("In DbDeleteDeviceAlias()")
        self.db.delete_device_alias(argin)
80720
def has_port_profile_to_delete(self, profile_name, device_id):
        """"""
        count = self.session.query(ucsm_model.PortProfileDelete).filter_by(
            profile_id=profile_name, device_id=device_id).count()
        return count != 0
1093713
def delete_fwrule(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The delete_fwrule function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'A name must be specified when deleting a firewall rule.'
        )
        return False

    name = kwargs['name']
    conn = get_conn()

    __utils__['cloud.fire_event'](
        'event',
        'delete firewall',
        'salt/cloud/firewall/deleting',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    try:
        result = conn.ex_destroy_firewall(
            conn.ex_get_firewall(name)
        )
    except ResourceNotFoundError as exc:
        log.error(
            'Rule %s was not found. Exception was: %s',
            name, exc, exc_info_on_loglevel=logging.DEBUG
        )
        return False

    __utils__['cloud.fire_event'](
        'event',
        'deleted firewall',
        'salt/cloud/firewall/deleted',
        args={
            'name': name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )
    return result
1257357
def delete(self, device_id: int):
        
        device = self._get_or_abort(device_id)
        session.delete(device)
        session.commit()
        return '', 204
583405
def prompt_4_mfa_serial(input = None):
    
    return prompt_4_value('Enter your MFA serial:', required = False, regex = re_mfa_serial_format, regex_format = mfa_serial_format, input = input)
341491
def _process_removed_port(self, device):
        """"""
        LOG.debug("Trying to remove the port %r", device)
        self._update_port_status_cache(device, device_bound=False)
        self._port_unbound(device, vnic_deleted=True)

        LOG.debug("The port was successfully removed.")
        self._removed_ports.discard(device)
1119547
def clear_vdp_vsi(self, port_uuid):
        
        try:
            LOG.debug("Clearing VDP VSI MAC %(mac)s UUID %(uuid)s",
                      {'mac': self.vdp_vif_map[port_uuid].get('mac'),
                       'uuid': self.vdp_vif_map[port_uuid].get('vsiid')})
            del self.vdp_vif_map[port_uuid]
        except Exception:
            LOG.error("VSI does not exist")
        self.clear_oui(port_uuid)
343671
def remove(self):
        

        xmlrpc = XMLRPCConnection()
        try:
            xmlrpc.connection.remove_vrf(
                {
                    'vrf': { 'id': self.id },
                    'auth': self._auth_opts.options
                })
        except xmlrpclib.Fault as xml_fault:
            raise _fault_to_exception(xml_fault)
        if self.id in _cache['VRF']:
            del(_cache['VRF'][self.id])
361200
def enable_mfa_device(self,
                          user_name,
                          serial_number,
                          authentication_code_1,
                          authentication_code_2):
        """"""
        user = self.get_user(user_name)
        if serial_number in user.mfa_devices:
            raise IAMConflictException(
                "EntityAlreadyExists",
                "Device {0} already exists".format(serial_number)
            )

        user.enable_mfa_device(
            serial_number,
            authentication_code_1,
            authentication_code_2
        )
143824
def delete(self, deviceId, measurementId):
        
        record = self.measurements.get(deviceId)
        if record is not None:
            popped = record.pop(measurementId, None)
            return popped, 200 if popped else 400
        return None, 400
103145
def remove_nio(self, port_number):
        

        if port_number not in self._nios:
            raise DynamipsError("Port {} is not allocated".format(port_number))

        # remove VCs mapped with the port
        for source, destination in self._active_mappings.copy().items():
            if len(source) == 3 and len(destination) == 3:
                # remove the virtual channels mapped with this port/nio
                source_port, source_vpi, source_vci = source
                destination_port, destination_vpi, destination_vci = destination
                if port_number == source_port:
                    log.info('ATM switch "{name}" [{id}]: unmapping VCC between port {source_port} VPI {source_vpi} VCI {source_vci} and port {destination_port} VPI {destination_vpi} VCI {destination_vci}'.format(name=self._name,
                                                                                                                                                                                                                     id=self._id,
                                                                                                                                                                                                                     source_port=source_port,
                                                                                                                                                                                                                     source_vpi=source_vpi,
                                                                                                                                                                                                                     source_vci=source_vci,
                                                                                                                                                                                                                     destination_port=destination_port,
                                                                                                                                                                                                                     destination_vpi=destination_vpi,
                                                                                                                                                                                                                     destination_vci=destination_vci))
                    yield from self.unmap_pvc(source_port, source_vpi, source_vci, destination_port, destination_vpi, destination_vci)
                    yield from self.unmap_pvc(destination_port, destination_vpi, destination_vci, source_port, source_vpi, source_vci)
            else:
                # remove the virtual paths mapped with this port/nio
                source_port, source_vpi = source
                destination_port, destination_vpi = destination
                if port_number == source_port:
                    log.info('ATM switch "{name}" [{id}]: unmapping VPC between port {source_port} VPI {source_vpi} and port {destination_port} VPI {destination_vpi}'.format(name=self._name,
                                                                                                                                                                              id=self._id,
                                                                                                                                                                              source_port=source_port,
                                                                                                                                                                              source_vpi=source_vpi,
                                                                                                                                                                              destination_port=destination_port,
                                                                                                                                                                              destination_vpi=destination_vpi))
                    yield from self.unmap_vp(source_port, source_vpi, destination_port, destination_vpi)
                    yield from self.unmap_vp(destination_port, destination_vpi, source_port, source_vpi)

        nio = self._nios[port_number]
        if isinstance(nio, NIOUDP):
            self.manager.port_manager.release_udp_port(nio.lport, self._project)
        log.info('ATM switch "{name}" [{id}]: NIO {nio} removed from port {port}'.format(name=self._name,
                                                                                         id=self._id,
                                                                                         nio=nio,
                                                                                         port=port_number))

        del self._nios[port_number]
        return nio
1243177
def delete_firmware_image(self, image_id):
        
        api = self._get_api(update_service.DefaultApi)
        api.firmware_image_destroy(image_id=image_id)
        return