Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix for NameError in cnos.py#39665

Merged
gundalow merged 1 commit into
ansible:develfrom
amuraleedhar:patch-41
May 9, 2018
Merged

Fix for NameError in cnos.py#39665
gundalow merged 1 commit into
ansible:develfrom
amuraleedhar:patch-41

Conversation

@amuraleedhar

Copy link
Copy Markdown
Contributor

Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules.
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5

SUMMARY

While executing the playbooks involving cnos modules, there comes an error where the files cnos_devicerules.py and cnos_errorcodes.py are not available in pythonpath. To mitigate this the change has to be made in import statement.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/module_utils/network/cnos/cnos.py

ANSIBLE VERSION

ansible 2.6.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible-2.6.0-py2.7.egg/ansible
executable location = /usr/local/bin/ansible
python version = 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4]

ADDITIONAL INFORMATION

This change has to be backported to Ansible 2.5 version as well.

Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
@ansibot

ansibot commented May 3, 2018

Copy link
Copy Markdown
Contributor

@ansibot ansibot added bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. networking Network category support:core labels May 3, 2018
@samdoran samdoran changed the title Fix for NameError Fix for NameError in cnos.py May 3, 2018
@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label May 3, 2018
@gundalow gundalow merged commit 3c32b48 into ansible:devel May 9, 2018
gundalow pushed a commit to gundalow/ansible that referenced this pull request May 9, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules.
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
(cherry picked from commit 3c32b48)
gundalow added a commit that referenced this pull request May 9, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules.
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
(cherry picked from commit 3c32b48)
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 12, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
tonal pushed a commit to tonal/ansible that referenced this pull request May 15, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
@amuraleedhar amuraleedhar deleted the patch-41 branch August 10, 2018 11:49
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
Issue : NameError: global name ‘cnos_devicerules’ is not defined. while running cnos modules. 
Device Rule file validates the range and type of data going into each CLI based on device type it is executed against.
This has to be backported to 2.5
@ansible ansible locked and limited conversation to collaborators May 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue/PR relates to a bug. networking Network category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants