def get_url(self, instance=True):
def convert(default_ns, nodes):<EOL><INDENT>ret = '<STR_LIT>'<EOL>for node in nodes:<EOL><INDENT>default_ns, id = self.device.convert_tag(default_ns, node.tag,<EOL>dst=Tag.JSON_NAME)<EOL>ret += '<STR_LIT:/>' + quote(id, safe='<STR_LIT>')<EOL>if self.is_config:<EOL><INDENT>n = Composer(self.device, node)<EOL>if n.schema_node.get('<STR_LIT:type>') == '<STR_LIT>':<EOL><INDENT>if node != self.node or instance:<EOL><INDENT>ret += '<STR_LIT>'.format(quote(node.text, safe='<STR_LIT>'))<EOL><DEDENT><DEDENT>elif n.schema_node.get('<STR_LIT:type>') == '<STR_LIT:list>':<EOL><INDENT>if node != self.node or instance:<EOL><INDENT>values = []<EOL>for key in n.keys:<EOL><INDENT>values.append(quote(node.find(key).text,<EOL>safe='<STR_LIT>'))<EOL><DEDENT>ret += '<STR_LIT>'.format('<STR_LIT:U+002C>'.join(values))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return ret<EOL><DEDENT>nodes = list(reversed(list(self.node.iterancestors())))[<NUM_LIT:1>:] +[self.node]<EOL>return '<STR_LIT>' + convert('<STR_LIT>', nodes)<EOL>
get_url

        High-level api: get_url returns a Restconf URL of the config node.

        Parameters
        ----------

        instance : `bool`
            True if the Restconf URL refers to only one instance of a list or
            leaf-list. False if the Restconf URL refers to all instances of a
            list or leaf-list.

        Returns
        -------

        str
            A Restconf URL.