(self, cmdp)
return self.STATUS_ERROR
login: authenticate into docker repository e.g. dockerhub
        --username=username
        --password=password
        --registry=<url>         ex. https://registry-1.docker.io
login: authenticate into docker repository e.g. dockerhub
        --username=username
        --password=password
        --registry=<url>         ex. https://registry-1.docker.io
login : authenticate into docker repository e . g . dockerhub -- username = username -- password = password -- registry = <url > ex . https : // registry - 1 . docker . io
def do_login(self, cmdp):
        """
        login: authenticate into docker repository e.g. dockerhub
        --username=username
        --password=password
        --registry=<url>         ex. https://registry-1.docker.io
        """
        username = cmdp.get("--username=")
        password = cmdp.get("--password=")
        registry_url = cmdp.get("--registry=")
        if cmdp.missing_options():  # syntax error
            return self.STATUS_ERROR
        self._set_repository(registry_url, None, None, None)
        if not username:
            username = GET_INPUT("username: ")
        if not password:
            password = getpass("password: ")
        if password and password == password.upper():
            Msg().out("Warning: password in uppercase",
                      "Caps Lock ?", l=Msg.WAR)

        v2_auth_token = self.dockerioapi.get_v2_login_token(username, password)
        if self.keystore.put(self.dockerioapi.registry_url,
                             v2_auth_token, "") == 0:
            return self.STATUS_OK

        Msg().err("Error: invalid credentials")
        return self.STATUS_ERROR
def do_login ( self , cmdp ) : username = cmdp . get ( "--username=" ) password = cmdp . get ( "--password=" ) registry_url = cmdp . get ( "--registry=" ) if cmdp . missing_options ( ) : # syntax error return self . STATUS_ERROR self . _set_repository ( registry_url , None , None , None ) if not username : username = GET_INPUT ( "username: " ) if not password : password = getpass ( "password: " ) if password and password == password . upper ( ) : Msg ( ) . out ( "Warning: password in uppercase" , "Caps Lock ?" , l = Msg . WAR ) v2_auth_token = self . dockerioapi . get_v2_login_token ( username , password ) if self . keystore . put ( self . dockerioapi . registry_url , v2_auth_token , "" ) == 0 : return self . STATUS_OK Msg ( ) . err ( "Error: invalid credentials" ) return self . STATUS_ERROR