Juniper / py-junos-netconify

Junos console/bootstrap automation Python module
Apache License 2.0
67 stars 30 forks source link

Avocent console server handling, warning before commit ignore #27

Closed ojagodzinski closed 3 years ago

ojagodzinski commented 9 years ago

After this changes it is possible to use Netconf by console when there is Avocent console server in the way (usage in ansible-junos-stdlib):

      - name: Zeroconfig Junos
        junos_install_config:
          host=host
          user=user
          passwd=passwd
          file=somefile.conf
          console="--telnet=avocent_ip_addr,avocent_port"
          logfile=config.log

Second commit handles/ignores errors before successful commit message:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/12.3R8/junos">
rcmd: getaddrinfo: hostname nor servname provided, or not known
rcmd: getaddrinfo: hostname nor servname provided, or not known
rcmd: getaddrinfo: hostname nor servname provided, or not known
rcmd: getaddrinfo: hostname nor servname provided, or not known
<rpc-error>
<error-type>protocol</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>warning</error-severity>
<error-message>
Could not connect to fpc-1 : Can't assign requested address
</error-message>
</rpc-error>
<rpc-error>
<error-type>protocol</error-type>
<error-tag>operation-failed</error-tag>
<error-severity>warning</error-severity>
<error-message>
Cannot connect to other RE, ignoring it
</error-message>
</rpc-error>
<commit-results>
<routing-engine junos:style="normal">
<name>fpc0</name>
<commit-check-success/>
<commit-success/>
</routing-engine>
</commit-results>
<ok/>
</rpc-reply>
shermdog commented 9 years ago

Hi @ojagodzinski ,

Thank you for the pulls. I'll review these during our next update cycle.

Thanks again, -Rick

ojagodzinski commented 9 years ago

@shermdog Any update in this case?