Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port for gNMI connection should be plugin-specific parameter #1

Open
jbemmel opened this issue Aug 18, 2022 · 2 comments
Open

Port for gNMI connection should be plugin-specific parameter #1

jbemmel opened this issue Aug 18, 2022 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@jbemmel
Copy link

jbemmel commented Aug 18, 2022

As suggested in https://karneliuk.com/wp-content/uploads/2022/08/Karneliuk_com_nornir_pygnmi.pdf slide 4

See e.g. https://salt-nornir.readthedocs.io/en/latest/Pillar%20and%20Inventory%20Examples.html#juniper-junos

proxy:
  proxytype: nornir

hosts:
  vmx1:
    hostname: 192.168.217.150
    platform: juniper_junos
    username: nornir
    password: nornir
    connection_options:
     ...
      scrapli_netconf:
        port: 830
        extras:
          transport: system # or paramiko, ssh2
          ssh_config_file: True
          auth_strict_key: False
      scrapli:
        platform: juniper_junos
        port: 22
        extras:
          transport: system # or asyncssh, ssh2, paramiko
          auth_strict_key: false
          ssh_config_file: false

Note how scrapli_netconf uses port 830, while scrapli uses port 22. The port is plugin specific, different plugins can use different ports to talk to a given device (in parallel)

@akarneliuk
Copy link
Owner

Hey @jbemmel ,

That is already working, I've just tested. Example:

---
c-1-s1:
  hostname: 192.168.101.18
  groups:
    - spine
  connection_options:
    pygnmi:
      port: 12345
      extras:
        path_cert: "./certs/c-1-b1.pem"
        skip_verify: True
        debug: True
...

And in debug you would see:

GRPC Target
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
192.168.101.18:12345
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


GRPC Channel options
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[('grpc.ssl_target_name_override', 'c-1-b1.lab.karneliuk.com')]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I will amend documentation, thanks.

Best,
Anton

@akarneliuk akarneliuk self-assigned this Aug 18, 2022
@akarneliuk akarneliuk added the documentation Improvements or additions to documentation label Aug 18, 2022
@akarneliuk
Copy link
Owner

Updated.

Please, let me know if anything else is needed.

Best,
Anton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants