Fix typo for self.list
Mistake was introduced in https://review.openstack.org/#/c/554950
Added an abstract method list to the base ResourceManager that
raises a notImplementedError if called (instead of using
abc.abstractmethod that would force the implementation of a list
method that might not be required for all resources)
Closes-Bug: #1820045
Change-Id: I0c69e1beeb452a95cc5988a462f733806afbfafc
(cherry picked from commit 0cd6b28292)
			
			
This commit is contained in:
		 Sagi Shnaidman
					Sagi Shnaidman
				
			
				
					committed by
					
						 Dougal Matthews
						Dougal Matthews
					
				
			
			
				
	
			
			
			 Dougal Matthews
						Dougal Matthews
					
				
			
						parent
						
							ac6de6cf29
						
					
				
				
					commit
					0b52bfc161
				
			| @@ -74,7 +74,15 @@ class ResourceManager(object): | |||||||
|         self.http_client = http_client |         self.http_client = http_client | ||||||
|  |  | ||||||
|     def find(self, **kwargs): |     def find(self, **kwargs): | ||||||
|         return [i for i in self._list() if _check_items(i, kwargs.items())] |         return [i for i in self.list() if _check_items(i, kwargs.items())] | ||||||
|  |  | ||||||
|  |     def list(self): | ||||||
|  |         """This is an abstract method | ||||||
|  |  | ||||||
|  |         This is added here so that the find method gains some clarity. | ||||||
|  |         It must be implemented by the child class in order to find to work | ||||||
|  |         """ | ||||||
|  |         raise NotImplementedError("abstract method list must be implemented") | ||||||
|  |  | ||||||
|     @staticmethod |     @staticmethod | ||||||
|     def _build_query_params(marker=None, limit=None, sort_keys=None, |     def _build_query_params(marker=None, limit=None, sort_keys=None, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user