Skip to content

[BUG] NSOClient object has no attribute 'get_datastore_data' #60741

@ReigenDing

Description

@ReigenDing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbroken, incorrect, or confusing behaviorneeds-triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions