Skip to content

apply-path takes a quoted string #22

Open
@vincentbernat

Description

@vincentbernat

Hey!

With the latest master, I still have issues with apply-path:

set policy-options prefix-list ipvX-bgp-neighbors apply-path "routing-instances <*> protocols bgp group <*> neighbor <*>"

Generated parser is:

            b(str("policy-options"),
                c(
                    b(a(str("prefix-list"), arg),
                        c(
                              prefix_list_items,
                            a(str("apply-path"), arg)
                        )
                    )
                )
            ),

Last arg could be replaced by quote.

XML says:

                  <xsd:element name="apply-path" minOccurs="0" type="xsd:string">
                    <xsd:annotation>
                      <xsd:documentation>Apply IP prefixes from a configuration statement</xsd:documentation>
                      <xsd:appinfo>
                        <flag>ephemeral-db-exclude</flag>
                        <flag>twig-dynamic-db-ok</flag>
                        <flag>current-product-support</flag>
                      </xsd:appinfo>
                    </xsd:annotation>
                  </xsd:element>

To me, it seems when we have an xsd:string, we should use quote | arg. In ruler.rb, all occurrences of quote | arg seems to be special case. I am fine by adding apply-path to the list, but out of curiosity, why not always use quote | arg?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions