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

The name of a View() attribute can not also be used as a field name in a View's YAML file. #423

Closed
stacywsmith opened this issue Aug 6, 2015 · 1 comment

Comments

@stacywsmith
Copy link
Contributor

If you attempt to use the name of a View() attribute as a field name in a View's YAML file, the View() attribute takes precedence and the field name is not accessible.

For an example/discussion of this, see:
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/junos-python-ez/8X0LmP_15fU/AztUGvKQDAAJ

This condition exists in the included VlanView in the vlan.yml file.

I suggest changing this:

VlanView:
  fields:
    instance: vlan-instance
    name: vlan-name 
    created: vlan-create-time
    status: vlan-status
    owner: vlan-owner
    tag: vlan-tag
    members: .//vlan-member-interface

to:

VlanView:
  fields:
    instance: vlan-instance
    vlan_name: vlan-name 
    created: vlan-create-time
    status: vlan-status
    owner: vlan-owner
    tag: vlan-tag
    members: .//vlan-member-interface


A similar condition also exists in _BfdSessionClientView in the bfd.yml file.

I suggest changing this:

_BfdSessionClientView:
  fields:
    name: client-name
    transmission_interval: client-transmission-interval
    reception_interval: client-reception-interval

to:

_BfdSessionClientView:
  fields:
    client_name: client-name
    transmission_interval: client-transmission-interval
    reception_interval: client-reception-interval
@ydnath ydnath added this to the R_2_1_0 milestone Sep 7, 2016
@ydnath ydnath removed this from the R_2_1_0 milestone Sep 5, 2017
chidanandpujar added a commit to chidanandpujar/py-junos-eznc that referenced this issue Mar 27, 2023
changed name to vlan_name for VlanTable
name to client_name for BfdSessionTable
chidanandpujar added a commit that referenced this issue Apr 3, 2023
@chidanandpujar
Copy link
Collaborator

fixed via #1240

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

No branches or pull requests

5 participants