Checks if given volume exists with the expected driver

 @param [String] name of the volume
 @param [String] driver to expect on the volume if already existing
 @raise [DriverMismatchError] If the volume is found but using a different driver than expected
194545
def volume_exist?(volume_name, driver)
      begin
        debug "volume #{volume_name} exists"
        volume = Docker::Volume.get(volume_name)
        if volume && volume.info['Driver'] == driver
          return true
        elsif volume && volume.info['Driver'] != driver
          raise DriverMismatchError.new("Volume driver not as expected. Expected #{driver}, existing volume has #{volume.info['Driver']}")
        end
      rescue Docker::Error::NotFoundError
        debug "volume #{volume_name} does NOT exist"
        false
      rescue => error
        abort error
      end
    end
962532
def queue_exists(self, name):
        
        try:
            queue = self._manager.head(name)
            return True
        except exc.NotFound:
            return False
1129163
def volume_show(name, profile=None, **kwargs):
    '''
    

    '''
    conn = _auth(profile, **kwargs)
    return conn.volume_show(name)
874218
def method_name_exist(self, meth_name):
        

        methods = self.current_class.get_methods()
        for m in methods:
            if m.name == meth_name:
                return True
        return False
989827
def method_missing( name, *opts )
      raise NoMethodError.new( name.to_s ) unless name.to_s =~ /([a-z]*)_([a-z]*)/
 
      # command_processors
      if $2 == "processors"
        commands[$1.to_sym][:outputs] = opts.first[:outputs]
        commands[$1.to_sym][:exceptions] = opts.first[:exceptions]
      end
    end
1325627
def search_driver_connection_pool(driver_class, driver_config)
      if RailsKvsDriver::KVS_CONNECTION_POOL.has_key?(driver_class.name)
        RailsKvsDriver::KVS_CONNECTION_POOL[driver_class.name].each do |pool_set|
          return pool_set[:pool] if equal_driver_config?(pool_set[:config], driver_config)
        end
      end

      return nil
    end
117240
def has_name?( other, ns=nil )
      if ns
        return (namespace() == ns and name() == other)
      elsif other.include? ":"
        return fully_expanded_name == other
      else
        return name == other
      end
    end
1197293
def _assert_dirs_exist(self, setting_name):
        
        v = self._get_setting(setting_name)
        if (not os.path.isdir(os.path.split(v)[0])) or os.path.isdir(v):
            self.raise_config_error(
                setting_name,
                v,
                str,
                'a file path in an existing directory',
                is_none_allowed=False,
            )
47384
def check_exists(required, input)
      required.inject(true) do |result, key|
        input[key] && result
      end
    end
1344143
def volume_delete(self, name):
        '''
        
        '''
        if self.volume_conn is None:
            raise SaltCloudSystemExit('No cinder endpoint available')
        nt_ks = self.volume_conn
        try:
            volume = self.volume_show(name)
        except KeyError as exc:
            raise SaltCloudSystemExit('Unable to find {0} volume: {1}'.format(name, exc))
        if volume['status'] == 'deleted':
            return volume
        response = nt_ks.volumes.delete(volume['id'])
        return volume
309858
def find(name)
      request = Message::Find.new(Thread.mailbox, name)
      methods = send_request request
      return nil if methods.is_a? NilClass
      rsocket # open relay pipe to avoid race conditions
      actor = DCell::ActorProxy.create.new self, name, methods
      add_actor actor
    end
746376
def update(self, volume, display_name=None, display_description=None):
        
        return volume.update(display_name=display_name,
                display_description=display_description)
762065
def exists?(vm_name = nil)
      return (vm_names.count > 0) if vm_name.nil?
      vm_names.include? vm_name.to_sym
    end
562617
function( name ) {
		if ( ! munit.isString( name ) || ! name.length ) {
			throw new Error( "Name not found for removing formatter" );
		}

		if ( render._formatHash[ name ] ) {
			delete render._formatHash[ name ];
			render._formats = render._formats.filter(function( f ) {
				return f.name !== name;
			});
		}
	}
959410
def _name_exists(self, name):
        
        for i in range(self.count()):
            if self.tabText(i) == name:
                return True
        return False
1033456
public void expectExactMatch(String name, String anotherName) {
        expectExactMatch(name, anotherName, messages.get(Validation.EXACT_MATCH_KEY.name(), name, anotherName));
    }
22244
def exists(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    try:
        conn.describe_cache_clusters(name)
        return True
    except boto.exception.BotoServerError as e:
        log.debug(e)
        return False