saltstack / saltstack/salt

[BUG] NSOClient object has no attribute 'get_datastore_data'

Open
#60,741 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description
A clear and concise description of what the bug is.
NSOClient object has no method 'get_datastore_data' but 'get_data' or 'get_datastore'
Setup
(Please provide relevant configs and/or SLS files (be sure to remove sensitive info).

proxy:
  proxytype: cisconso
  host: ip
  port: 22
  use_ssl: false
  username: u
  password: p

Steps to Reproduce the behavior
(Include debug logs if possible and relevant)

  • add proxytype: cisconso
  • start proxy
  • accept key cisconso
  • execute salt 'cisconso' cisconso.get_data datastore=running path=devices/ex0/routes

Expected behavior
A clear and concise description of what you expected to happen.
normally get the config of device

Screenshots
If applicable, add screenshots to help explain your problem.

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
          Salt: 3002.2
 
Dependency Versions:
          cffi: 1.14.6
      cherrypy: unknown
      dateutil: Not Installed
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.0.1
       libgit2: Not Installed
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     pycparser: 2.20
      pycrypto: Not Installed
  pycryptodome: 3.10.1
        pygit2: Not Installed
        Python: 3.8.10 (default, Jun  2 2021, 10:49:15)
  python-gnupg: Not Installed
        PyYAML: 5.4.1
         PyZMQ: 22.2.1
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: ubuntu 20.04 focal
        locale: utf-8
       machine: x86_64
       release: 5.11.0-25-generic
        system: Linux
       version: Ubuntu 20.04 focal

Additional context
Add any other context about the problem here.

    The minion function caused an exception: Traceback (most recent call last):
      File "~/venv/salt/salt/metaproxy/proxy.py", line 482, in thread_return
        return_data = minion_instance.executors[fname](
      File "~/venv/salt/salt/executors/direct_call.py", line 12, in execute
        return func(*args, **kwargs)
      File "~/venv/salt/salt/modules/cisconso.py", line 61, in get_data
        return _proxy_cmd("get_data", datastore, path)
      File "~/venv/salt/salt/modules/cisconso.py", line 158, in _proxy_cmd
        return __proxy__[proxy_cmd](*args, **kwargs)
      File "~/venv/salt/salt/proxy/cisconso.py", line 287, in get_data
        return client.get_datastore_data(datastore, path)
    AttributeError: 'NSOClient' object has no attribute 'get_datastore_data'
ERROR: Minions returned with non-zero exit code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with salt/proxy/cisconso.py at get_data and the traceback's call to client.get_datastore_data; compare that client method with the available NSOClient methods mentioned in the report. Reproduce the cisconso.get_data command against a running proxy and confirm it returns the device configuration without the AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.