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

Major refactor of PFSenseModuleBase supporting generate_module pfsensible module generator #112

Open
wants to merge 62 commits into
base: master
Choose a base branch
from

Commits on Apr 29, 2024

  1. [module_base] Refactor

    - Allow for managing root_elt, elements
    - Add _find_this_element_index
    - Handle no existing elements
    - Implement _create_target and _find_target for node
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    c6933dd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5cf4c74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a67cda View commit details
    Browse the repository at this point in the history
  4. [module_base] Allow setting root_is_exclusive; self.obj default to {}…

    …; _find_target only for root_is_exclusive == False
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    d7b929c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fe33ad8 View commit details
    Browse the repository at this point in the history
  6. [module_base] Add key, root_is_exclusive defaults to True; root_is_ex…

    …clusive affects _copy_and_add_target(); _get_obj_name() uses key
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    dbc449d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d7ca82f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f9185d9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    bb235e1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    22e40a8 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    af6a85b View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2397e58 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    e9370d4 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    fd58189 View commit details
    Browse the repository at this point in the history
  15. [pfsense_alias] Refactor _params_to_obj() and add url

    - Add url parameter, deprecate address for urltable/urltable_ports
    - Use map_param_if and param_force
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    2d1dd71 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    db0f352 View commit details
    Browse the repository at this point in the history
  17. [pfsense_alias] Use PFSenseModuleBase _get_obj_name and _log_fields

    Remove unneeded test for type presence, don't mark it default
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    254360b View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    ad5ecac View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    998a629 View commit details
    Browse the repository at this point in the history
  20. [generate_module] Better name generation; Do not overwrite module fil…

    …e; Detect "type"; Scrape more web help text
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    8ed3cb6 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    b2c7775 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    2d1ee75 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    1beca47 View commit details
    Browse the repository at this point in the history
  24. Add *.swp to .gitignore

    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    5c52c2d View commit details
    Browse the repository at this point in the history
  25. [generate_module] Refactor

    - Drop .py
    - Store files in tmpdir
    - Option to keep tmpfile, overwrite output
    - Use '-' in options
    - Handle number and password inputs
    - Collect min, step, and placeholder attributes
    - Template fixes
    - Collect info in params_full and merge
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    723bf26 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    8c5953b View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    031b2f7 View commit details
    Browse the repository at this point in the history
  28. [generate_module] Mark items required if they have "element-required"…

    … class, add to REQUIRED_IF; Add key to PFSenseModuleBase init
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    8a667b2 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    f91f037 View commit details
    Browse the repository at this point in the history
  30. [module_base] Store refid in obj; Use diff["after"] for logging compa…

    …rison instead of obj, handle bool better
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    814955a View commit details
    Browse the repository at this point in the history
  31. [pfsense_ca] Use PFSenseModuleBase _create_target, logging; Drop pfSe…

    …nse < 2.5.0 support; Fix certificate in tests to not have extra newlines
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    cd2b183 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5f1be15 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    665648d View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    8f20ba2 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    8ad7928 View commit details
    Browse the repository at this point in the history
  36. [generate_module] Handle web pages with different input methods that …

    …do not create different types of elements
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    633ef2e View commit details
    Browse the repository at this point in the history
  37. [module_base] Use root_elt.findall() instead of get_elements; Reset s…

    …elf.elements in _copy_and_add_target - needed by some modules like user
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    295ae99 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    1df96cd View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    9069191 View commit details
    Browse the repository at this point in the history
  40. [module_base] Initialize instance vars; Add arg_route for parsing and…

    … validating - implement _validate_params
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    42692a6 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    edb2e85 View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    13b0e3f View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    71e9a5f View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    4378b7a View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    40c8606 View commit details
    Browse the repository at this point in the history
  46. [generate_module] Enhancements

    - Add --name-param, and default to key
    - Strip 'manage' from url for module name
    - Detect lists in XML
    - Better list doc/example
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    61503bd View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    59fab4b View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    ec59b80 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    396c0c6 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    a12ed88 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    c9c2ee3 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    6e73cd7 View commit details
    Browse the repository at this point in the history
  53. [pfsense_ipsec] Start using expanded PFSenseModuleBase; Start droppin…

    …g support for older pfsense
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    c6cb4f1 View commit details
    Browse the repository at this point in the history
  54. [module_base] Bugfixes and enhancements

    - Handle root paths
    - Make diff['after'] reflect _remove_deleted_params
    - Allow map_param to move items into nested dictionaries
    - Fix handling lack of 'state'
    - Fix bool_style
    - Allow passing obj to params_to_obj
    - Remove bool params from obj, unset bools from parameters
    - Add fail message for not finding package
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    95cd167 View commit details
    Browse the repository at this point in the history
  55. [pfsense_nat_outbound] Refactor

    - Use bool_values, set root
    - targetip -> target for pfSense 2.7.1 pf+ 23.09
    - Add diff support
    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    efdb97a View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    91032dc View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    011c8d5 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    20c43a8 View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    5734adb View commit details
    Browse the repository at this point in the history
  60. [tests/plays] README

    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    85b1249 View commit details
    Browse the repository at this point in the history
  61. [module_base] style

    opoplawski committed Apr 29, 2024
    Configuration menu
    Copy the full SHA
    266ab05 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    c6a6a78 View commit details
    Browse the repository at this point in the history