Subject: [netmod] Query about must statement syntax

From: "Ivory, William" <[email-masked]>
Date: Tue, 7 Jan 2020 10:31:10 +0000

Hi,

I've got a must statement that causes a compilation error on a Cisco NCS device (admittedly ancient (NCS version 3.4.4), but can't update it), as follows:

must "(../../packets * current()) <= (../../interval * 1000)";

Error is 'error: XPath syntax error: 40: unknown operator current'

However, our internal XPATH compiler thinks this is valid, and if I change the order in the must statement to the following, the NCS is happy:

must "(current() * ../../packets) <= (../../interval * 1000)";

Can anyone confirm if there is a genuine error in the original must statement, or is it valid XPATH?

Thanks,

William

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 07 Jan 2020 12:42:36 +0100 (CET)

Hi,

> statement, or is it valid XPATH? 

The XPath expression is legal.

/martin

---

From: "Ivory, William" <[email-masked]>
Date: Tue, 7 Jan 2020 11:44:23 +0000

Thanks for confirming.

William

On Tue, 2020-01-07 at 12:42 +0100, Martin Bjorklund wrote:

Hi,

"Ivory, William" <[email-masked]<mailto:[email-masked]>> wrote:

Hi,

Can anyone confirm if there is a genuine error in the original must

statement, or is it valid XPATH?

/martin