09-05-2019 07:49 AM
Hi,
I want to apply a boolean operation in the if-ned-id function, in particular an OR for two types of NEDs.
Is this supported?
Tried without success:
<?if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0 or if-ned-id hw-nc-1.0:hw-nc-1.0?>
<?(if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0) or (if-ned-id hw-nc-1.0:hw-nc-1.0)?>
Roque
Solved! Go to Solution.
09-05-2019 08:25 AM
Tried without success:
<?if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0 or if-ned-id hw-nc-1.0:hw-nc-1.0?>
<?(if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0) or (if-ned-id hw-nc-1.0:hw-nc-1.0)?>
You just have to separate the ned-id's with a space or a newline. Don't use "if-ned-id" twice in the instruction. So:
<?if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0 hw-nc-1.0:hw-nc-1.0?>
No other 'boolean operation' makes sense here. (you can even have more than two ned-id's, and it will pass if any one of them is loaded).
/Ram
09-05-2019 08:25 AM
Tried without success:
<?if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0 or if-ned-id hw-nc-1.0:hw-nc-1.0?>
<?(if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0) or (if-ned-id hw-nc-1.0:hw-nc-1.0)?>
You just have to separate the ned-id's with a space or a newline. Don't use "if-ned-id" twice in the instruction. So:
<?if-ned-id zte-nc-1-nc-1.0:zte-nc-1-nc-1.0 hw-nc-1.0:hw-nc-1.0?>
No other 'boolean operation' makes sense here. (you can even have more than two ned-id's, and it will pass if any one of them is loaded).
/Ram
09-06-2019 03:22 AM
09-06-2019 03:25 AM
Hi Ram,
Maybe an additional question, do you know if I can run XPATH string functions in "if-ned-id" call? The user story would be "every cisco-ios-* NED or every huawei-vrp* NED".
Thanks!
Roque
09-06-2019 04:00 AM
Maybe an additional question, do you know if I can run XPATH string functions in "if-ned-id" call? The user story would be "every cisco-ios-* NED or every huawei-vrp* NED".
No. Currently, the implementation only splits the contents based on whitespace or newlines, and checks if any of the ned-id's are loaded. There is no support for wildcards or xpath string functions as of now.
/Ram
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide