(self, cmdp)
return self._search_repositories(expression, pause, no_trunc)
search: search dockerhub for container images
        search [options]  <expression>
        -a                                              :do not pause
        --no-trunc                                      :do not trunc lines
        --list-tags                                     :list repository tags
        --index=<url>                ex. https://index.docker.io/v1
        --registry=<url>             ex. https://registry-1.docker.io
        --httpproxy=socks4://user:pass@host:port        :use http proxy
        --httpproxy=socks5://user:pass@host:port        :use http proxy
        --httpproxy=socks4://host:port                  :use http proxy
        --httpproxy=socks5://host:port                  :use http proxy
        --httpproxy=socks4a://user:pass@host:port       :use http proxy
        --httpproxy=socks5h://user:pass@host:port       :use http proxy
        --httpproxy=socks4a://host:port                 :use http proxy
        --httpproxy=socks5h://host:port                 :use http proxy
search: search dockerhub for container images
        search [options]  <expression>
        -a                                              :do not pause
        --no-trunc                                      :do not trunc lines
        --list-tags                                     :list repository tags
        --index=<url>                ex. https://index.docker.io/v1
        --registry=<url>             ex. https://registry-1.docker.io
        --httpproxy=socks4://user:pass
search : search dockerhub for container images search [ options ] <expression > - a : do not pause -- no - trunc : do not trunc lines -- list - tags : list repository tags -- index = <url > ex . https : // index . docker . io / v1 -- registry = <url > ex . https : // registry - 1 . docker . io -- httpproxy = socks4 : // user : pass
def do_search(self, cmdp):
        """
                search: search dockerhub for container images
        search [options]  <expression>
        -a                                              :do not pause
        --no-trunc                                      :do not trunc lines
        --list-tags                                     :list repository tags
        --index=<url>                ex. https://index.docker.io/v1
        --registry=<url>             ex. https://registry-1.docker.io
        --httpproxy=socks4://user:pass@host:port        :use http proxy
        --httpproxy=socks5://user:pass@host:port        :use http proxy
        --httpproxy=socks4://host:port                  :use http proxy
        --httpproxy=socks5://host:port                  :use http proxy
        --httpproxy=socks4a://user:pass@host:port       :use http proxy
        --httpproxy=socks5h://user:pass@host:port       :use http proxy
        --httpproxy=socks4a://host:port                 :use http proxy
        --httpproxy=socks5h://host:port                 :use http proxy
        """
        pause = not cmdp.get("-a")
        index_url = cmdp.get("--index=")
        registry_url = cmdp.get("--registry=")
        http_proxy = cmdp.get("--httpproxy=")
        no_trunc = cmdp.get("--no-trunc")
        list_tags = cmdp.get("--list-tags")
        expression = cmdp.get("P1")
        if cmdp.missing_options():               # syntax error
            return self.STATUS_ERROR
        self._set_repository(registry_url, index_url, expression, http_proxy)
        (dummy, dummy, expression, dummy) = self._split_imagespec(expression)
        self.dockerioapi.search_init(pause)
        v2_auth_token = self.keystore.get(self.dockerioapi.registry_url)
        self.dockerioapi.set_v2_login_token(v2_auth_token)
        if list_tags:
            return self._list_tags(expression)

        return self._search_repositories(expression, pause, no_trunc)
def do_search ( self , cmdp ) : pause = not cmdp . get ( "-a" ) index_url = cmdp . get ( "--index=" ) registry_url = cmdp . get ( "--registry=" ) http_proxy = cmdp . get ( "--httpproxy=" ) no_trunc = cmdp . get ( "--no-trunc" ) list_tags = cmdp . get ( "--list-tags" ) expression = cmdp . get ( "P1" ) if cmdp . missing_options ( ) : # syntax error return self . STATUS_ERROR self . _set_repository ( registry_url , index_url , expression , http_proxy ) ( dummy , dummy , expression , dummy ) = self . _split_imagespec ( expression ) self . dockerioapi . search_init ( pause ) v2_auth_token = self . keystore . get ( self . dockerioapi . registry_url ) self . dockerioapi . set_v2_login_token ( v2_auth_token ) if list_tags : return self . _list_tags ( expression ) return self . _search_repositories ( expression , pause , no_trunc )