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

Fixed Console' object has no attribute '_use_filter' error when executed Table/View script #1335

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

dineshbaburam91
Copy link
Collaborator

The use_filter parameter is supported only on SSH connection, not on telnet/serial connection.
Need enhancement to support use_filter on telnet connection.

Testcase

Using telnet mode table/view script execution

% cat issue_1314.py 
from jnpr.junos import Device
from jnpr.junos.op.systemstorage import SystemStorageTable 
from jnpr.junos.factory.factory_loader import FactoryLoader
import yaml

with Device(host="x.x.x.x", user="xxx", passwd="xxx", mode = "telnet") as dev:
    ss = SystemStorageTable(dev).get()
    print(ss)

Output:

% python3 issue_1314.py
SystemStorageTable:x.x.x.x: 4 items

Using ssh mode table/view script execution

% cat issue_1314.py 
from jnpr.junos import Device
from jnpr.junos.op.systemstorage import SystemStorageTable 
from jnpr.junos.factory.factory_loader import FactoryLoader
import yaml

with Device(host="x.x.x.x", user="xxx", passwd="xxx", port=22) as dev:
    ss = SystemStorageTable(dev).get()
    print(ss)

Output:

% python3 issue_1314.py
SystemStorageTable:x.x.x.x: 4 items

Copy link
Collaborator

@chidanandpujar chidanandpujar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@chidanandpujar chidanandpujar merged commit 1f78e3f into Juniper:master Oct 14, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants