03-21-2022 09:43 AM
Hi,
I have a question while trying to build an app that's monitoring vPC status.
I'm using 'show vpc role' command to get the data as XML and parse in my app.
However, I'm getting different results from CLI and from the API, which is causing some confusion to me.
When I execute the command 'show vpc role' on CLI, I get this response where 'dual active detection status' is 0:
When I execute this command via API, I get this property with value 1024:
<?xml version="1.0"?>
<ins_api>
<type>cli_show</type>
<version>1.0</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<vpc-peer-status>peer-ok</vpc-peer-status>
<vpc-peer-status-reason>SUCCESS</vpc-peer-status-reason>
<vpc-current-role>secondary</vpc-current-role>
<dual-active-detected>1024</dual-active-detected>
<vpc-system-mac>00:23:04:ee:be:14</vpc-system-mac>
<vpc-system-prio>32667</vpc-system-prio>
<vpc-local-system-mac>c4:b2:39:92:b9:87</vpc-local-system-mac>
<vpc-local-system-prio>32667</vpc-local-system-prio>
</body>
<input>show vpc role</input>
<msg>Success</msg>
<code>200</code>
</output>
</outputs>
</ins_api>
How should I interpret the 1024 value?
03-21-2022 02:40 PM
Hello,
what if you add the line marked in bold ?
<?xml version="1.0"?>
<ins_api>
<type>cli_show</type>
<version>1.0</version>
<sid>eoc</sid>
<outputs>
<output>
<body>
<vpc-peer-status>peer-ok</vpc-peer-status>
<vpc-peer-status-reason>SUCCESS</vpc-peer-status-reason>
<vpc-current-role>secondary</vpc-current-role>
<dual-active-detected>1024</dual-active-detected>
<vpc-system-mac>00:23:04:ee:be:14</vpc-system-mac>
<vpc-system-prio>32667</vpc-system-prio>
<vpc-local-system-mac>c4:b2:39:92:b9:87</vpc-local-system-mac>
<vpc-local-system-prio>32667</vpc-local-system-prio>
</body>
<input>show vpc role</input>
<msg>Success</msg>
<code>200</code>
<output_format>xml</output_format>
</output>
</outputs>
</ins_api>
03-22-2022 01:58 AM
Hey Georg,
I'm not understanding your reply, as the XML that I posted in the question is the NX-OS response from the Nexus switch.
The request that we are sending to the switch indeed contains the ouput_format field set to XML.
03-22-2022 02:11 AM
Hello,
sorry for the misunderstanding, the output_format is supposed to be in the request. You say it is already in there, so that cannot be the issue. Can you post the entire app code you are using ?
I have tried to find a relation between the number 1024 and the actual output '0' ( which apparently means that DAD has been detected). Can you try and find out what value is returned when DAD is not active ?
03-22-2022 09:38 AM
Hi,
Unfortunately we can't change this value on this setup - honestly, I don't know much about Cisco Nexus to trigger that change.
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