def list_pods(self, namespace=None):
if namespace:<EOL><INDENT>return [Pod(name=p.metadata.name, namespace=namespace, spec=p.spec)<EOL>for p in self.core_api.list_namespaced_pod(namespace, watch=False).items]<EOL><DEDENT>return [Pod(name=p.metadata.name, namespace=p.metadata.namespace, spec=p.spec)<EOL>for p in self.core_api.list_pod_for_all_namespaces(watch=False).items]<EOL>
List all available pods.

:param namespace: str, if not specified list pods for all namespaces
:return: collection of instances of :class:`conu.backend.k8s.pod.Pod`