You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
scp commit_permissions.py ansible@192.168.99.111:/var/db/scripts/commit/
|
from junos import Junos
from junos import Junos_Context
from junos import Junos_Configuration
import jcs
def main():
# Get configuration root object
root = Junos_Configuration
message = "Permission all is assigned to invalid class."
# Warn about any login classes with the all permission set
for element in root.findall("./system/login/class[permissions='all']"):
jcs.emit_warning("class:" + element.find('name').text + " " + message)
if __name__ == '__main__':
main()
|
---|