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

Bug fixes in Junos-related components #55824

Merged
merged 76 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c2b425b
Merged junos-specific changes on 2019.2
Mar 18, 2019
f70aed5
Merged junos-specific changes on 2019.2
Mar 18, 2019
ffb1b59
Fixes FileNotFound exception with invalid dest option in junos.cli
Apr 1, 2019
4b80926
Fixed documentation for junos.diff
Apr 3, 2019
e241cf8
Fixed improper handling of dest and format options in rpc modules
Apr 3, 2019
f8f38a6
Implement exception handling around XML filter parsing
Apr 3, 2019
90e3f76
Porting fix from develop to 2019.2
Apr 4, 2019
403e197
Fixed documentation
Apr 4, 2019
704b376
Fixed documentation
Apr 4, 2019
4fb35fa
Merge pull request #87 from rsmekala/2019.2
Apr 4, 2019
d9e762f
Fixed rollback docstring: CLI example
Apr 5, 2019
7bec402
Merge remote-tracking branch 'upstream1/2019.2' into 2019.2
Apr 5, 2019
4b4b50d
Implemented exception handling around template rendering in junos.load
Apr 5, 2019
a34846d
Implemented exception handling around template rendering in junos.ins…
Apr 5, 2019
5203b8f
Fixes broken state module junos.diff
Apr 8, 2019
20fdfa4
Fixes broken state module junos.rollback
Apr 11, 2019
6b78415
Fixes broken state module junos.rpc
Apr 11, 2019
4a8818c
Adds documentation about zeroize functionality for non-root user
Apr 12, 2019
e20b06d
Adds error message for install_config in case invalid mode provided
Apr 12, 2019
c97e9b5
Handle LockError case in install_config gracefully
Apr 12, 2019
9678f7a
Replace string concatenation with format
Apr 12, 2019
89ca74a
Revert replacing cli command with rpc: junos.zeroize
Apr 12, 2019
e6be5be
Merge pull request #95 from rsmekala/2019.2
Apr 12, 2019
65e7bb3
Support dynamic config mode
Apr 15, 2019
a20863a
Changed CLI example to conform with new rpc module definition
Apr 22, 2019
153aa54
Added exception handling for invalid image path for install_os module
Apr 22, 2019
80d3188
Extended load() support to config_action:merge, to match PyEZ capabil…
Apr 23, 2019
afa1491
Added check to allow only 1 config_action in load()
Apr 23, 2019
26fda1c
Fixed reboot=True scenario for install_os
Apr 25, 2019
2d0d56c
Added comments to explain the behaviour in reboot scenario
Apr 25, 2019
f16d9ae
Added new option all_re. Updated documentation
Apr 25, 2019
58e14c2
Fixed #117
Apr 25, 2019
274a23c
Temporary fix for #117
Apr 25, 2019
f5fc7d0
Modified as per review comments
Apr 25, 2019
04b366c
Merge pull request #107 from rsmekala/2019.2
vnitinv Apr 25, 2019
fd7c4d5
Fixes junos.load template case
May 13, 2019
97d7832
Fixed test cases in 2019.2 branch
May 13, 2019
44a7ff9
Update junos_syslog.py
rsmekala Jul 1, 2019
95a2ce5
Merge pull request #129 from Juniper/syslog-patch
Jul 24, 2019
b679c06
Use cache_file instead of get_file
Sep 11, 2019
9f836e5
Merge remote-tracking branch 'upstream/2019.2' into 2019.2
Sep 11, 2019
ee67ce6
Revert "Use cache_file instead of get_file"
Sep 11, 2019
479c346
Revert "Use cache_file instead of get_file"
Sep 11, 2019
5843238
Merge branch 'master' into 2019.2
rsmekala Jan 9, 2020
963ce4d
Merge branch '2019.2' into 2019.2
rsmekala Feb 4, 2020
644be38
Merge branch '2019.2' of https://github.com/rsmekala/salt into 2019.2
Feb 4, 2020
fbf9b9b
added new testcases
Feb 4, 2020
97b16fb
Merge pull request #125 from rsmekala/2019.2
Feb 4, 2020
21065fe
Merge branch 'master' into 2019.2
rsmekala Feb 16, 2020
b69c483
code changes as per review comment by @twangboy
Mar 16, 2020
78ade09
code changes as per review comment by @twangboy
Mar 16, 2020
bb80719
Merge branch 'master' into 2019.2
twangboy Apr 1, 2020
e8d23db
resolve conflict with latest code
Apr 13, 2020
1f7abd1
Merge branch 'master' into 2019.2
Apr 13, 2020
13da0f1
Merge branch 'master' into 2019.2
Apr 14, 2020
ecfdec6
fix lint warnings as per saltpylint
Apr 14, 2020
e58ace8
Merge branch 'master' into 2019.2
sagetherage Apr 14, 2020
430d5bd
fix pylint, pydoc, and test failures due to junos-eznc version
Apr 15, 2020
4e69ce7
Revert "fix pylint, pydoc, and test failures due to junos-eznc version"
Apr 15, 2020
3a91b57
Revert "Revert "fix pylint, pydoc, and test failures due to junos-ezn…
Apr 15, 2020
ee26ced
Revert "fix pylint, pydoc, and test failures due to junos-eznc version"
Apr 15, 2020
796c7a1
working on fixing comments from saltstack unit runs
Apr 15, 2020
1ea15c4
fix: salt.states.junos.rst:20:Pygments lexer name 'set' is not known
Apr 15, 2020
e99f139
fix as per comment from @dmurphy18 and pre-commit changes
Apr 16, 2020
fb18ed4
import line changes as per pre-commit
Apr 17, 2020
d51e7c7
changes as per comment from salt team regarding interface syntax
Apr 20, 2020
95c4fff
changes as per comment from salt team regarding interface syntax
Apr 20, 2020
be75ccf
when called from junos.rpc from test, dest is intacct
Apr 20, 2020
9bc4f8c
added versionchanged salt/states/junos.py->diff
Apr 27, 2020
2d21b7c
pre-commit checks for darwin
Apr 27, 2020
f274d8b
pre-commit check for linux onf py 3.8 and 3.9
Apr 28, 2020
86c5e3e
Merge branch 'master' into 2019.2
dmurphy18 May 5, 2020
056f719
Merge branch 'master' into 2019.2
dmurphy18 May 5, 2020
419faa9
Merge branch 'master' into 2019.2
dmurphy18 May 5, 2020
ca9a480
Merge branch 'master' into 2019.2
dmurphy18 May 6, 2020
4025063
Merge branch 'master' into 2019.2
dmurphy18 May 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/static/darwin.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ docker
futures>=2.0; python_version < '3.0'
jmespath
jsonschema
junos-eznc
junos-eznc==2.4.0
jxmlease
keyring==5.7.1
kubernetes<4.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/static/linux.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GitPython
hgtools
jmespath
jsonschema
junos-eznc
junos-eznc==2.4.0
jxmlease
kazoo
keyring==5.7.1
Expand Down
34 changes: 17 additions & 17 deletions salt/engines/junos_syslog.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,29 @@
9. pid
10. raw (the raw event data forwarded from the device)

The topic title can consist of any of the combination of above fields, but the
topic has to start with ``jnpr/syslog``. Here are a couple example
combinations:
The topic title can consist of any of the combination of above fields,
but the topic has to start with 'jnpr/syslog'.
So, we can have different combinations:

- jnpr/syslog/hostip/daemon/event
- jnpr/syslog/daemon/severity
- jnpr/syslog/hostip/daemon/event
- jnpr/syslog/daemon/severity

The corresponding dynamic topic sent on salt event bus would look something like:

- jnpr/syslog/1.1.1.1/mgd/UI_COMMIT_COMPLETED
- jnpr/syslog/sshd/7
- jnpr/syslog/1.1.1.1/mgd/UI_COMMIT_COMPLETED
- jnpr/syslog/sshd/7

The default topic title is ``jnpr/syslog/hostname/event``.
The default topic title is 'jnpr/syslog/hostname/event'.

One can choose the type of data they want from the event bus. For example, if
one wants only events pertaining to a particular daemon, this can be specified
in the configuration file:
The user can choose the type of data they wants of the event bus.
Like, if one wants only events pertaining to a particular daemon, they can
specify that in the configuration file:

.. code-block:: yaml

daemon: mgd

One can even have a list of daemons:
One can even have a list of daemons like:

.. code-block:: yaml

Expand All @@ -72,15 +72,15 @@
For junos_syslog engine to receive events, syslog must be set on the junos device.
This can be done via following configuration:

.. code-block:: text
.. code-block:: bash

set system syslog host <ip-of-the-salt-device> port 516 any any

Below is a sample syslog event which is received from the junos device:

.. code-block:: text
.. code-block:: bash

<30>May 29 05:18:12 bng-ui-vm-9 mspd[1492]: No chassis configuration found
'<30>May 29 05:18:12 bng-ui-vm-9 mspd[1492]: No chassis configuration found'

The source for parsing the syslog messages is taken from:
https://gist.github.com/leandrosilva/3651640#file-xlog-py
Expand Down Expand Up @@ -154,7 +154,7 @@ def __init__(self):
priority = Suppress("<") + ints + Suppress(">")

# timestamp
month = Word(string.uppercase, string.lowercase, exact=3)
month = Word(string.ascii_uppercase, string.ascii_lowercase, exact=3)
day = ints
hour = Combine(ints + ":" + ints + ":" + ints)

Expand Down Expand Up @@ -319,7 +319,7 @@ def parseData(self, data, host, port, options):
if the event is to be sent on the bus.

"""
data = self.obj.parse(data)
data = self.obj.parse(data.decode())
data["hostip"] = host
log.debug(
"Junos Syslog - received %s from %s, sent from port %s", data, host, port
Expand Down
Loading