Skip to content

paloalto_panos_brace_to_set does not handle banner correctly #780

@cheenpo

Description

@cheenpo

Environment

  • Python version:
  • netutils version:

Expected Behavior

The banner configuration is not being included in paloalto_panos_brace_to_set

Observed Behavior

The banner configuration is not included.
This is a multi-line PAN-OS banner definition:

deviceconfig {
        system {
          login-banner "####################################################
WARNING TO UNAUTHORIZED USERS:
This system is for use by authorized users only.
Any individual using this system, by such use,
acknowledges and consents to the right of the
company to monitor, access, use, and disclose any
information generated, received, or stored on the
systems, and waives any right of privacy or
expectation of privacy on the part of that
individual in connection with his or her use of
this system. Unauthorized and/or improper use of
this system, as delineated by corporate policies,
is not tolerated and the company may take formal
action against such individuals.
####################################################
";
}
}

I believe the main issue is that the function checks whether a line ends with login-banner ", which is not the case for multi-line PAN-OS banner.

Steps to Reproduce

  1. set the above to a string_of_config
  2. try the following command show_config_merged_set_format = paloalto_panos_brace_to_set(string_of_config, cfg_type="string")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions