Delete a bridge by name

        :param bridge: bridge name
        :return:
973646
def delete(self, bridge):
        
        args = {
            'name': bridge,
        }

        self._bridge_chk.check(args)

        return self._client.json('bridge.delete', args)
414383
def delete(self, name):
    '''
    
    '''
    keys = self._client.keys('%s%s:*'%(self._prefix,name))

    pipe = self._client.pipeline(transaction=False)
    for key in keys:
      pipe.delete( key )
    pipe.execute()

    # Could be not technically the exact number of keys deleted, but is a close
    # enough approximation
    return len(keys)
1280064
def removeRemoteByName(self, name: str) -> int:
        
        remote = self.getRemote(name)
        rid = remote.uid
        self.removeRemote(remote)
        return rid
607814
def del_option_by_name(self, name):
        
        for o in list(self._options):
            assert isinstance(o, Option)
            if o.name == name:
                self._options.remove(o)
1215077
def remove_nio(self, nio):
        
        if self._hypervisor:
            yield from self._hypervisor.send('nio_bridge remove_nio "{name}" {nio}'.format(name=self._name, nio=nio))
        self._nios.remove(nio)
1162566
def vswitch_delete(self, vswitch_name, persist=True):
        
        self._networkops.delete_vswitch(vswitch_name, persist)
617417
def delete(self, name):
    '''
    
    '''
    # TODO: confirm that this does not use the combo index and determine
    # performance implications.
    num_deleted = 0
    for interval,config in self._intervals.items():
      # TODO: use write preference settings if we have them
      num_deleted += self._client[interval].remove( {'name':name} )['n']
    return num_deleted
638404
def unregisterAPI(self, name):
        
        if name.startswith('public/'):
            target = 'public'
            name = name[len('public/'):]
        else:
            target = self.servicename
            name = name
        removes = [m for m in self.handler.handlers.keys() if m.target == target and m.name == name]
        for m in removes:
            self.handler.unregisterHandler(m)
976478
def remove(self, name, **params):
        
        log = self._getparam('log', self._discard, **params)

        if name not in self.names:
            log.error("Attempt to remove %r which was never added", name)
            raise Exception("Command %r has never been added" % (name,))
        del self.names[name]
        rebuild = False
        for path in list(self.modules):
            if name in self.modules[path]:
                self.modules[path].remove(name)
            if len(self.modules[path]) == 0:
                del self.modules[path]
                rebuild = True
        if rebuild:
            self._build(name, **params)
189252
def absent(name):
    '''
    

    '''

    ret = {'name': name, 'changes': {}, 'result': False, 'comment': ''}

    # Comment and change messages
    comment_bridge_deleted = 'Bridge {0} deleted.'.format(name)
    comment_bridge_notdeleted = 'Unable to delete bridge: {0}.'.format(name)
    comment_bridge_notexists = 'Bridge {0} does not exist.'.format(name)
    changes_bridge_deleted = {name: {'old': 'Bridge {0} exists.'.format(name),
                                     'new': 'Bridge {0} deleted.'.format(name),
                                     }
                              }

    bridge_exists = __salt__['openvswitch.bridge_exists'](name)

    # Dry run, test=true mode
    if __opts__['test']:
        if not bridge_exists:
            ret['result'] = True
            ret['comment'] = comment_bridge_notexists
        else:
            ret['result'] = None
            ret['comment'] = comment_bridge_deleted

        return ret

    if not bridge_exists:
        ret['result'] = True
        ret['comment'] = comment_bridge_notexists
    else:
        bridge_delete = __salt__['openvswitch.bridge_delete'](name)
        if bridge_delete:
            ret['result'] = True
            ret['comment'] = comment_bridge_deleted
            ret['changes'] = changes_bridge_deleted
        else:
            ret['result'] = False
            ret['comment'] = comment_bridge_notdeleted

    return ret
1077238
def add_bridge(self, bridge):
        
        for group in bridge.groups:
            self._groups[group.name] = group
1051657
def _delete_element(name, element_type, data, server=None):
    '''
    
    '''
    _api_delete('{0}/{1}'.format(element_type, quote(name, safe='')), data, server)
    return name
569653
def delete(self, *names):
        
        names = [self.redis_key(n) for n in names]
        with self.pipe as pipe:
            return pipe.delete(*names)
140341
def destroy_by_name(name, driver):

    """"""

    matches = [node for node in list_nodes(driver) if node.name == name]
    if len(matches) == 0:
        logger.warn('no node named %s' % name)
        return False
    else:
        return all([node.destroy() for node in matches])
744092
def delete(self, version_name):
    
    name = ('%s/versions/%s' % (self._full_model_name, version_name))
    response = self._api.projects().models().versions().delete(name=name).execute()
    if 'name' not in response:
      raise Exception('Invalid response from service. "name" is not found.')
    _util.wait_for_long_running_operation(response['name'])
1011854
def remove_pipe(self, name):
        
        if name not in self.pipe_names:
            raise ValueError(Errors.E001.format(name=name, opts=self.pipe_names))
        return self.pipeline.pop(self.pipe_names.index(name))
316825
def nic_list(self, bridge):
        

        args = {
            'name': bridge,
        }

        self._bridge_chk.check(args)

        return self._client.json('bridge.nic-list', args)