<?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: Pyats does not see hostname while connect in Tools</title>
    <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261768#M3648</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1845030"&gt;@Dombre&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share with us your testbed file? What's the platform/hardware name for destination device you want to connect to?&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2025 06:22:14 GMT</pubDate>
    <dc:creator>mfr-6</dc:creator>
    <dc:date>2025-02-18T06:22:14Z</dc:date>
    <item>
      <title>Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261513#M3647</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dombre_0-1739812940915.png" style="width: 400px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/240037i72A27296CCD33F67/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dombre_0-1739812940915.png" alt="Dombre_0-1739812940915.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hostname: DUT1(Master:1)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hi team. I've run into a problem, as you can see above - when trying to connect with this hostname, I get an error because the hostname doesn't match the prompt. Is there any way to change the prompt, or another way to solve this problem? (Changing the hostname is not possible, because when the switches are stacked, this suffix appears and i can`t remove it on my system).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2025 17:30:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261513#M3647</guid>
      <dc:creator>Dombre</dc:creator>
      <dc:date>2025-02-17T17:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261768#M3648</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1845030"&gt;@Dombre&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share with us your testbed file? What's the platform/hardware name for destination device you want to connect to?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 06:22:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261768#M3648</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-18T06:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261808#M3649</link>
      <description>&lt;P&gt;Without looking at your testbed could be a hostname mismatch between what you have on your testbed and the hostname of your device.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From &lt;A href="https://xrdocs.io/programmability/tutorials/pyats-series-tips-and-tricks/#mismatch-between-the-hostname-and-the-keys-in-the-testbed" target="_blank"&gt;https://xrdocs.io/programmability/tutorials/pyats-series-tips-and-tricks/#mismatch-between-the-hostname-and-the-keys-in-the-testbed&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;
&lt;P&gt;The name of the device in your testbed, and the hostname &lt;STRONG&gt;MUST&lt;/STRONG&gt; match. It’s case sensitive. In case it doesn’t match, you will have a similar error.&lt;/P&gt;
&lt;DIV class="language-plaintext highlighter-rouge"&gt;
&lt;DIV class="highlight"&gt;
&lt;PRE class="highlight"&gt;&lt;CODE&gt;unicon.core.errors.TimeoutError: Prompt timeout occured, please check the hostname 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;You can also specify in your Python script that you do not care if they don’t match by setting the &lt;CODE class="language-plaintext highlighter-rouge"&gt;learn_hostname&lt;/CODE&gt; argument to &lt;CODE class="language-plaintext highlighter-rouge"&gt;True&lt;/CODE&gt; in your device &lt;CODE class="language-plaintext highlighter-rouge"&gt;connect()&lt;/CODE&gt; method.&lt;/P&gt;
&lt;DIV class="language-plaintext highlighter-rouge"&gt;
&lt;DIV class="highlight"&gt;
&lt;PRE class="highlight"&gt;&lt;CODE&gt;device.connect(learn_hostname=True)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;As always full tracebacks are good to check erros, and better if they are text based so is easier to parse them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 08:48:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261808#M3649</guid>
      <dc:creator>Jesus Illescas</dc:creator>
      <dc:date>2025-02-18T08:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261810#M3650</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="IMG_5026.jpeg" style="width: 344px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/240116iB2E8FFB9F6C4C840/image-size/medium?v=v2&amp;amp;px=400" role="button" title="IMG_5026.jpeg" alt="IMG_5026.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/336505"&gt;@Jesus Illescas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1668340"&gt;@mfr-6&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my hostname is DUT1, but in CLI when the switch is stacked its «DUT1(Master:1)» &amp;nbsp;so connect function can’t see the hostname.&lt;BR /&gt;&lt;BR /&gt;I tried changing hostname in testbed, but it is useless because the connect function cant even read the hostname from the CLI, its in the buffer&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 09:40:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261810#M3650</guid>
      <dc:creator>Dombre</dc:creator>
      <dc:date>2025-02-18T09:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261868#M3651</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1845030"&gt;@Dombre&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;What's the platform/hardware of the stacked switch you want to connect to?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 11:09:18 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261868#M3651</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-18T11:09:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261891#M3652</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1668340"&gt;@mfr-6&lt;/a&gt;&amp;nbsp; its my own iosxe-like os&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 12:29:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261891#M3652</guid>
      <dc:creator>Dombre</dc:creator>
      <dc:date>2025-02-18T12:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261911#M3653</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1845030"&gt;@Dombre&lt;/a&gt;&amp;nbsp;- the prompt i see coming from your device looks like HP/Aruba-like device, or something similar. I'm afraid it's not supported by Unicon, the framework that deals with creating connections to devices, used by pyATS.&lt;BR /&gt;&lt;BR /&gt;Please see the list of supported devices here:&amp;nbsp;&lt;A href="https://pubhub.devnetcloud.com/media/unicon/docs/user_guide/supported_platforms.html#" target="_blank"&gt;https://pubhub.devnetcloud.com/media/unicon/docs/user_guide/supported_platforms.html#&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 13:05:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261911#M3653</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-18T13:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261919#M3654</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1668340"&gt;@mfr-6&lt;/a&gt;&amp;nbsp; i can connect to devices, everything works except this device that is stacked (it connects but then the command are not sent)&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 13:24:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5261919#M3654</guid>
      <dc:creator>Dombre</dc:creator>
      <dc:date>2025-02-18T13:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pyats does not see hostname while connect</title>
      <link>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5262298#M3655</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/1845030"&gt;@Dombre&lt;/a&gt;&amp;nbsp;yes, I see your struggle and the problem is that your device is not fully supported under certain conditions (in your case - once device is stacked) and that's because your device requires special prompt handling, but since unicon doesn't support that, it doesn't know how to handle prompt that includes "(Master:1)".&lt;BR /&gt;&lt;BR /&gt;The reason why it works with a switches not being stacked is because CLI interface is pretty much the same as iosxe one and as long as there are no discrepancies, all works good as all patterns of ios-xe are matched.&lt;BR /&gt;&lt;BR /&gt;I see this is important for you, so what about addressing your issue directly to the team who is responsible for pyATS? Drop them an email and include a link to this conversation, so they'll better understand what's the issue about.&lt;BR /&gt;Here's the contact info to pyATS team:&amp;nbsp;&lt;A href="mailto:pyats-support-ext@cisco.com" target="_blank"&gt;pyats-support-ext@cisco.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;pyATS is available for everyone for free, but it's closed-source, meaning that community cannot make adjustments to the code to add support for new device types - that's why issues like this need to be addressed to the team who's in charge of pyATS.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2025 06:33:50 GMT</pubDate>
      <guid>https://community.cisco.com/t5/tools/pyats-does-not-see-hostname-while-connect/m-p/5262298#M3655</guid>
      <dc:creator>mfr-6</dc:creator>
      <dc:date>2025-02-19T06:33:50Z</dc:date>
    </item>
  </channel>
</rss>

