def __get_uri(self, server):
        """Return the URI for the given server dict."""
        # Select the connection mode (with or without password)
        if server['password'] != "":
            if server['status'] == 'PROTECTED':
                # Try with the preconfigure password (only if status is PROTECTED)
                clear_password = self.password.get_password(server['name'])
                if clear_password is not None:
                    server['password'] = self.password.sha256_hash(clear_password)
            return 'http://{}:{}@{}:{}'.format(server['username'], server['password'],
                                               server['ip'], server['port'])
        else:
            return 'http://{}:{}'.format(server['ip'], server['port'])
Return the URI for the given server dict.