<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Are their any examples of NSO tfcp:policy rule syntax? in NSO Developer Hub Discussions</title>
    <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465205#M629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SUPER APPRECIATE!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your latest gets me through the front door.&amp;nbsp; &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2017 19:24:06 GMT</pubDate>
    <dc:creator>eric.n.dunn.ctr</dc:creator>
    <dc:date>2017-08-17T19:24:06Z</dc:date>
    <item>
      <title>Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465199#M623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having no success in finding examples of how to write a &lt;STRONG&gt;tfcp:policy&lt;/STRONG&gt; rule syntax in the ncs_cli or the NSO web interface?&lt;/P&gt;&lt;P&gt;Would someone point me in the right direction or provide some simple examples?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 11:57:48 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465199#M623</guid>
      <dc:creator>eric.n.dunn.ctr</dc:creator>
      <dc:date>2019-03-01T11:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465200#M624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eric&lt;/P&gt;&lt;P&gt;never tried this - but...&lt;/P&gt;&lt;P&gt;a) found the YANG file... often times good/interesting info is directly incorporated here...&lt;/P&gt;&lt;P&gt;E.g. (for me)&lt;/P&gt;&lt;P&gt;./nso-4.4.2/src/ncs/configuration_policy/tailf-configuration-policy.yang&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which includes:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #0000ff;"&gt;&amp;nbsp; description&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "This module defines configuration policies.&amp;nbsp; A configuration policy&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enforces custom validation rules on the configuration data.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; These rules assert that the user-defined conditions are always&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; true in committed data.&amp;nbsp; If a configuration change is done such&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; that a policy rule would evaluate to false, the configuration&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; change is rejected by the system.";&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and:&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; description&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "An XPath 1.0 expression that is evaluated when the configuration&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is validated, either when a validate operation is performed,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or at commit time.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The result of the expression is converted to a boolean using&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the standard XPath rules.&amp;nbsp; If the result is 'false', validation&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fails with an error or a warning, as specified in the 'action'&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; choice.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For example, in order to verify that no ethernet interface has&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a MTU other than 1500, the following expression can be given:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #800000;"&gt;&lt;STRONG style=": ; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach '/interfaces/interface[type = ethernet]'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 10pt; color: #800000;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr 'mtu != 1500'&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800000; font-size: 10pt; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; error 'Ethernet interface {name} must have MTU 1500'&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i tried that... (had to use " and not ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800000; font-size: 10pt; font-family: 'courier new', courier;"&gt;admin@ncs% set policy rule foo foreach "/interfaces/interface[type = ethernet]" expr "mtu != 1500" error-message "Ethernet interface {name} must have MTU 1500"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[ok][2017-08-17 08:48:20]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs% commit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;Commit complete.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[ok][2017-08-17 08:48:35]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs% show policy rule&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;rule foo {&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "/interfaces/interface[type = ethernet]";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "mtu != 1500";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; error-message "Ethernet interface {name} must have MTU 1500";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[ok][2017-08-17 08:48:50]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs%&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs% delete policy rule foo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[ok][2017-08-17 08:49:52]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;admin@ncs% commit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;Commit complete.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[ok][2017-08-17 08:49:53]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="color: #800000; font-family: 'courier new', courier;"&gt;[edit]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #800000; font-size: 10pt; font-family: 'courier new', courier;"&gt;admin@ncs%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perhaps this helps...&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 15:56:25 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465200#M624</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-17T15:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465201#M625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This can be very useful at times.&lt;/P&gt;&lt;P&gt;And, you forgot single quotes around 'ethernet' (or whatever value you want to compare against, e.g. 'ethernetCsmacd') in the foreach expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 16:23:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465201#M625</guid>
      <dc:creator>Jan Lindblad</dc:creator>
      <dc:date>2017-08-17T16:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465202#M626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jan&lt;/P&gt;&lt;P&gt;good comment - i just pulled the example from the YANG file description field... - to help the original poster.&lt;/P&gt;&lt;P&gt;didn't actually try it fully -- but it is an interesting !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 16:27:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465202#M626</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-17T16:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465203#M627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick replies &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying to test (fail) the policy by the following:&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: 'courier new', courier; color: #800000;"&gt;foreach&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "/ios:interface[type = GigabitEthernet]";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: 'courier new', courier; color: #800000;"&gt;expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "mtu != 1500";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: 'courier new', courier; color: #800000;"&gt;error-message "Ethernet interface {name} must have MTU 1500";&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: 'courier new', courier; color: #800000;"&gt;---&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: arial; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: 'courier new', courier; color: #800000;"&gt;set devices device s00-rtr config ios:interface GigabitEthernet 0/0/3 mtu 4400&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;---&lt;/P&gt;&lt;P&gt;... but it allows it to configure and commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 17:43:03 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465203#M627</guid>
      <dc:creator>eric.n.dunn.ctr</dc:creator>
      <dc:date>2017-08-17T17:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465204#M628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting...&lt;/P&gt;&lt;P&gt;So... i went and tried this (yours...) it fails...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Went to look for more details... (tail -f *.* in logs ) and all that... saw some errors..&lt;/P&gt;&lt;P&gt;17-Aug-2017::10:58:46.491 Evaluating XPath for policy: foo:&lt;/P&gt;&lt;P&gt;&amp;nbsp; /ios:interface[type = 'GigabitEthernet']&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;keypath not found: "/ios:interface"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Decided (after trying a few things) to look for more guidance...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Noticed that there is a section in the &lt;STRONG&gt;NSO Users Guide (e.g. nso_user_guide-4.4.2.pdf)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;on page 85....&lt;/STRONG&gt; This guide provides an example that differs somewhat from the one in the YANG file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example 19. Policies&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;ncs(config)# &lt;STRONG&gt;policy rule gb-one-zero&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;ncs(config-rule-gb-one-zero)# &lt;STRONG&gt;foreach /ncs:devices/device[starts-with(name,'ce')]/config&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;ncs(config-rule-gb-one-zero)# &lt;STRONG&gt;expr ios:interface/ios:GigabitEthernet[ios:name='0/1']&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;ncs(config-rule-gb-one-zero)# &lt;STRONG&gt;warning-message "{../name} should have 0/1 interface"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #0000ff;"&gt;ncs(config-rule-gb-one-zero)# &lt;STRONG&gt;commit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'courier new', courier;"&gt;zork(config-rule-gb-one-zero)# top&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I "tested" it...&amp;nbsp; modified slightly to have "error-message" instead of "warning-message"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-family: 'courier new', courier;"&gt;admin@ncs% &lt;STRONG&gt;switch cli&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config)# &lt;STRONG&gt;policy rule foo&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;Value for 'expr' (&amp;lt;string&amp;gt;):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config-rule-foo)# &lt;STRONG&gt;foreach /ncs:devices/device[starts-with(name,'c')]/config&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config-rule-foo)# &lt;STRONG&gt;expr ios:interface/ios:GigabitEthernet[ios:name='0/1']&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config-rule-foo)# &lt;STRONG&gt;error-message "{../name} should have 0/1 interface"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config-rule-foo)# &lt;STRONG&gt;commit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;Commit complete.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-family: 'courier new', courier;"&gt;admin@ncs(config-rule-foo)#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;trying this out...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800080; font-family: 'courier new', courier;"&gt;admin@ncs(config)# &lt;STRONG&gt;no devices device c0 config ios:interface GigabitEthernet 0/1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config)# &lt;STRONG&gt;validate&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;&lt;STRONG&gt;Failed: c0 should have 0/1 interface&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config)# &lt;STRONG&gt;commit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;&lt;STRONG&gt;Aborted: c0 should have 0/1 interface&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; color: #800080;"&gt;admin@ncs(config)#&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;that seems to work...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(have not tried to re-format the MTU example you had...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;gregg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 19:03:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465204#M628</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-17T19:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465205#M629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SUPER APPRECIATE!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your latest gets me through the front door.&amp;nbsp; &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 19:24:06 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465205#M629</guid>
      <dc:creator>eric.n.dunn.ctr</dc:creator>
      <dc:date>2017-08-17T19:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465206#M630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;awesome!&lt;/P&gt;&lt;P&gt;(I learned new things today too!&amp;nbsp; thanks for asking the question)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 19:32:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465206#M630</guid>
      <dc:creator>gschudel</dc:creator>
      <dc:date>2017-08-17T19:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465207#M631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Eric,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here some of the examples I use for IOS/XR/Juniper in my demos:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I force the loopback 0 to never be in shutdown mode.&lt;/P&gt;&lt;P&gt;2) I force the ISIS metric to be always greater than 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;P&gt;Roque&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tfcp:policy {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule loopback-up-ios {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not(config/ios:interface/ios:Loopback[ios:name='0']/ios:shutdown);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "Loopback 0 is cannot be shutdown";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule loopback-up-juniper {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device/config/junos:configuration/interfaces/interface[name='lo0'];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not(disable);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "Loopback 0 cannot be shutdown";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule loopback-up-ios-xr {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device/config/cisco-ios-xr:interface/Loopback[id='0'];&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; not(shutdown);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "Loopback 0 cannot be shutdown";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule isis-metric-juniper {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device/config/junos:configuration/protocols/isis/interface/level/metric;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;gt;99;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "ISIS metric MUST be larger than 100";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule isis-metric-iosxr {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device/config/cisco-ios-xr:router/isis/tag/interface/address-family/ipv4/unicast/metric;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;gt;99;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "ISIS metric MUST be larger than 100";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:rule isis-metric-ios {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:foreach&amp;nbsp; /devices/device/config/ios:interface/GigabitEthernet/isis/metric;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:expr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;gt;99;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tfcp:error-message "ISIS metric MUST be larger than 100";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 10:43:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465207#M631</guid>
      <dc:creator>rogaglia</dc:creator>
      <dc:date>2017-08-18T10:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Are their any examples of NSO tfcp:policy rule syntax?</title>
      <link>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465208#M632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again, you've been a &lt;STRONG style="text-decoration: underline;"&gt;HUGE&lt;/STRONG&gt; help!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 13:15:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/nso-developer-hub-discussions/are-their-any-examples-of-nso-tfcp-policy-rule-syntax/m-p/3465208#M632</guid>
      <dc:creator>eric.n.dunn.ctr</dc:creator>
      <dc:date>2017-08-18T13:15:31Z</dc:date>
    </item>
  </channel>
</rss>

