(self, dir_only=True)
return containers_list
Get a list of all containers in the local repo
        dir_only: is optional and indicates
                  if True a summary list of container_ids and names
                  if False  an extended listing containing further
                  container information
Get a list of all containers in the local repo
        dir_only: is optional and indicates
                  if True a summary list of container_ids and names
                  if False  an extended listing containing further
                  container information
Get a list of all containers in the local repo dir_only : is optional and indicates if True a summary list of container_ids and names if False an extended listing containing further container information
def get_containers_list(self, dir_only=True):
        """Get a list of all containers in the local repo
        dir_only: is optional and indicates
                  if True a summary list of container_ids and names
                  if False  an extended listing containing further
                  container information
        """
        containers_list = []
        if not os.path.isdir(self.containersdir):
            return []
        for fname in os.listdir(self.containersdir):
            container_dir = self.containersdir + '/' + fname
            if os.path.isdir(container_dir):
                try:
                    filep = open(container_dir + "/imagerepo.name", 'r')
                except (IOError, OSError):
                    reponame = ""
                else:
                    reponame = filep.read()
                    filep.close()
                if dir_only:
                    containers_list.append(container_dir)
                elif not os.path.islink(container_dir):
                    names = self.get_container_name(fname)
                    if not names:
                        names = ""
                    containers_list.append((fname, reponame, str(names)))
        return containers_list
def get_containers_list ( self , dir_only = True ) : containers_list = [ ] if not os . path . isdir ( self . containersdir ) : return [ ] for fname in os . listdir ( self . containersdir ) : container_dir = self . containersdir + '/' + fname if os . path . isdir ( container_dir ) : try : filep = open ( container_dir + "/imagerepo.name" , 'r' ) except ( IOError , OSError ) : reponame = "" else : reponame = filep . read ( ) filep . close ( ) if dir_only : containers_list . append ( container_dir ) elif not os . path . islink ( container_dir ) : names = self . get_container_name ( fname ) if not names : names = "" containers_list . append ( ( fname , reponame , str ( names ) ) ) return containers_list