You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<xsd:elementname="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?
That's just a fail-safe. Some xsd:string in JUNOS which rejects quoted strings with white spaces like:
koji@vsrx# set routing-instances "a a" instance-type vrf
error: instance_name: 'a a': Must be a non-reserved string of 128 characters or less with no spaces.
error: statement creation failed: a a
<xsd:elementname="name">
<xsd:annotation>
<xsd:documentation>Routing instance name</xsd:documentation>
<xsd:appinfo>
<flag>mustquote</flag>
<flag>identifier</flag>
<flag>nokeyword</flag>
<flag>current-product-support</flag>
<regex-matchdeprecate="deprecate">!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$</regex-match>
<regex-match-errordeprecate="deprecate">Must be a non-reserved string of 128 characters or less with no spaces.</regex-match-error>
<match>
<pattern>!^((__.*__)|(all)|(.*[ ].*)|("")|(.{129,}))$</pattern>
<message>Must be a non-reserved string of 128 characters or less with no spaces.</message>
</match>
<identifier/>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extensionbase="xsd:string">
<xsd:attributename="key"type="xsd:string"fixed="key"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<!-- </name> -->
Generally speaking, single-word should always be safe while "quoted strings" shouldn't. I know <regex-match deprecate="deprecate"> could be a hint in this case and there might be something else to determine which syntax can accept "quoted strings" but it's very hard to study all xsd:string unfortunately.
Just published v0.3.13 including #17 through #21. Also it will fix this issue under policy-options prefix-list xxx apply-path but I didn't translate all xsd:string into quote | arg. There are still things we need to figure out.
Activity
codeout commentedon May 18, 2020
That's just a fail-safe. Some
xsd:stringin JUNOS which rejects quoted strings with white spaces like:Generally speaking, single-word should always be safe while "quoted strings" shouldn't. I know
<regex-match deprecate="deprecate">could be a hint in this case and there might be something else to determine which syntax can accept "quoted strings" but it's very hard to study allxsd:stringunfortunately.codeout commentedon May 20, 2020
Just published v0.3.13 including #17 through #21. Also it will fix this issue under
policy-options prefix-list xxx apply-pathbut I didn't translate allxsd:stringintoquote | arg. There are still things we need to figure out.