fp-NGFW-SMC-python 1.0.34__tar.gz → 1.0.35__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.gitignore +1 -0
  2. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/PKG-INFO +1 -1
  3. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/PKG-INFO +1 -1
  4. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/SOURCES.txt +12 -3
  5. fp_ngfw_smc_python-1.0.35/pyproject.toml +62 -0
  6. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/__init__.py +2 -2
  7. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/__version__.py +1 -1
  8. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/access_rights.py +4 -4
  9. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/certificate_authority.py +3 -3
  10. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/tls.py +9 -0
  11. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/tls_common.py +13 -3
  12. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/vpn.py +5 -5
  13. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/eca_client_config.py +1 -1
  14. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/monitoring_status.py +69 -20
  15. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/reports.py +1 -1
  16. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/scheduled_tasks.py +9 -2
  17. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/system.py +127 -18
  18. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/system_properties.py +1 -1
  19. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/tasks.py +10 -10
  20. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/updates.py +7 -1
  21. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/servers.py +25 -26
  22. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/users.py +7 -2
  23. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/common.py +5 -0
  24. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/configloader.py +6 -6
  25. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/exceptions.py +1 -1
  26. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/session.py +98 -41
  27. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/web.py +42 -2
  28. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/collection.py +7 -7
  29. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/mixins.py +3 -0
  30. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/model.py +23 -20
  31. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/structs.py +1 -1
  32. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/util.py +2 -2
  33. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/compat.py +12 -9
  34. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/addon.py +5 -5
  35. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/advanced_settings.py +6 -6
  36. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/collection.py +25 -5
  37. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/contact_address.py +3 -3
  38. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engine.py +144 -98
  39. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engine_vss.py +2 -2
  40. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engines.py +23 -22
  41. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/general.py +13 -10
  42. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/ha_management.py +57 -25
  43. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/interfaces.py +75 -24
  44. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/node.py +13 -13
  45. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/policy.py +7 -7
  46. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/resource.py +5 -5
  47. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/route.py +16 -16
  48. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/sub_interfaces.py +24 -16
  49. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/waiters.py +7 -5
  50. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/conf.py +3 -3
  51. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/alerts.py +9 -5
  52. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/common.py +12 -4
  53. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/group.py +68 -37
  54. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/helpers.py +7 -7
  55. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/netlink.py +9 -7
  56. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/network.py +17 -17
  57. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/other.py +6 -6
  58. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/profiles.py +7 -4
  59. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/protocols.py +14 -5
  60. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/servers.py +164 -29
  61. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/service.py +8 -5
  62. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/situations.py +9 -9
  63. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/user.py +10 -4
  64. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/group.py +21 -0
  65. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/ws_async.py +5 -6
  66. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/type_of_servers.py +42 -12
  67. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/update_package.py +1 -1
  68. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/file_filtering.py +4 -3
  69. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/interface.py +5 -1
  70. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/ips.py +6 -2
  71. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/layer2.py +6 -2
  72. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/layer3.py +5 -1
  73. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/qos.py +2 -17
  74. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule.py +56 -21
  75. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule_elements.py +32 -18
  76. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule_nat.py +19 -16
  77. fp_ngfw_smc_python-1.0.35/smc/py.typed +0 -0
  78. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/access_list.py +15 -7
  79. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/bgp.py +5 -5
  80. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/bgp_access_list.py +3 -3
  81. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/ospf.py +1 -1
  82. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/prefix_list.py +2 -2
  83. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/route_map.py +4 -4
  84. fp_ngfw_smc_python-1.0.35/smc/tests/api_base_administration_bugs_test.py +91 -0
  85. fp_ngfw_smc_python-1.0.35/smc/tests/api_web_debug_test.py +79 -0
  86. fp_ngfw_smc_python-1.0.35/smc/tests/core_bugs_test.py +133 -0
  87. fp_ngfw_smc_python-1.0.35/smc/tests/elements_bugs_test.py +97 -0
  88. fp_ngfw_smc_python-1.0.35/smc/tests/engine_bugs_test.py +182 -0
  89. fp_ngfw_smc_python-1.0.35/smc/tests/internal_gateway_test.py +75 -0
  90. fp_ngfw_smc_python-1.0.35/smc/tests/monitoring_status_test.py +79 -0
  91. fp_ngfw_smc_python-1.0.35/smc/tests/policy_vpn_bugs_test.py +99 -0
  92. fp_ngfw_smc_python-1.0.35/smc/tests/smc_monitoring_entries_test.py +74 -0
  93. fp_ngfw_smc_python-1.0.35/smc/tests/smc_request_headers_test.py +34 -0
  94. fp_ngfw_smc_python-1.0.35/smc/tests/system_import_interactive_test.py +98 -0
  95. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/application_access_portal.py +11 -7
  96. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/elements.py +20 -18
  97. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/route.py +4 -4
  98. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/ssl_vpn_portal.py +11 -7
  99. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/HISTORY.rst +7 -1
  100. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/MANIFEST.in +1 -0
  101. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/pyproject.toml +5 -1
  102. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/requirements.txt +1 -1
  103. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/__version__.py +1 -1
  104. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/calendar.py +20 -19
  105. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/filters.py +27 -22
  106. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/formats.py +13 -10
  107. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/formatters.py +17 -11
  108. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/query.py +39 -24
  109. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/values.py +14 -10
  110. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/alerts.py +21 -19
  111. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/blacklist.py +24 -21
  112. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/block_list.py +24 -21
  113. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/connections.py +18 -16
  114. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/logs.py +18 -13
  115. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/neighbors.py +19 -17
  116. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/routes.py +18 -16
  117. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/sslvpn.py +13 -11
  118. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/users.py +14 -12
  119. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/vpns.py +25 -23
  120. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/pubsub/subscribers.py +11 -9
  121. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/wsocket.py +42 -33
  122. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tox.ini +1 -2
  123. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/tox.ini +1 -7
  124. fp_ngfw_smc_python-1.0.34/pyproject.toml +0 -101
  125. fp_ngfw_smc_python-1.0.34/smc/tests/docker_smc_bootstrap.py +0 -349
  126. fp_ngfw_smc_python-1.0.34/smc-monitoring/test.py +0 -403
  127. fp_ngfw_smc_python-1.0.34/smc-monitoring/tests/docker_smc_bootstrap.py +0 -324
  128. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.coveragerc +0 -0
  129. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.readthedocs.yaml +0 -0
  130. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/HISTORY.rst +0 -0
  131. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/LICENSE +0 -0
  132. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/MANIFEST.in +0 -0
  133. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/README.rst +0 -0
  134. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/dependency_links.txt +0 -0
  135. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/requires.txt +0 -0
  136. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/top_level.txt +0 -0
  137. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/setup.cfg +0 -0
  138. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/.gitignore +0 -0
  139. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/actions/__init__.py +0 -0
  140. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/__init__.py +0 -0
  141. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/__init__.py +0 -0
  142. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/filter.py +0 -0
  143. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/license.py +0 -0
  144. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/role.py +0 -0
  145. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/upcoming_event.py +0 -0
  146. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/__init__.py +0 -0
  147. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/__init__.py +0 -0
  148. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/entry_point.py +0 -0
  149. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/__init__.py +0 -0
  150. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/decorators.py +0 -0
  151. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/__init__.py +0 -0
  152. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/external_pki.py +0 -0
  153. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/hardware.py +0 -0
  154. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/lldp.py +0 -0
  155. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/session_monitoring.py +0 -0
  156. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/.gitignore +0 -0
  157. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/Makefile +0 -0
  158. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/index.rst +0 -0
  159. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/administration.rst +0 -0
  160. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/collections.rst +0 -0
  161. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/elements.rst +0 -0
  162. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/engine.rst +0 -0
  163. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/extensions.rst +0 -0
  164. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/installation.rst +0 -0
  165. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/intro.rst +0 -0
  166. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/logging.rst +0 -0
  167. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/policy.rst +0 -0
  168. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/reference.rst +0 -0
  169. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/resources.rst +0 -0
  170. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/session.rst +0 -0
  171. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/vpn.rst +0 -0
  172. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/requirements.txt +0 -0
  173. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/__init__.py +0 -0
  174. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/ssm.py +0 -0
  175. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/tags.py +0 -0
  176. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/README.md +0 -0
  177. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/__init__.py +0 -0
  178. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/add_sidewinder_routes.py +0 -0
  179. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/aggregated_interface.py +0 -0
  180. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/alert_chain_and_alert_chain_rule.py +0 -0
  181. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/alert_policy_and_alert_rule.py +0 -0
  182. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/alias.py +0 -0
  183. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/application_access_portal.py +0 -0
  184. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/basic_requests.py +0 -0
  185. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/bgp.py +0 -0
  186. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/certify_component_ext_pki.py +0 -0
  187. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/cloud_engine.py +0 -0
  188. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/configure_ztna_addon.py +0 -0
  189. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/connection_type.py +0 -0
  190. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/custom_script.zip +0 -0
  191. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/domain_name.py +0 -0
  192. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/eca_configuration.py +0 -0
  193. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/elasticsearch_cluster.py +0 -0
  194. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/engine-node-health.py +0 -0
  195. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/engine_query_route.py +0 -0
  196. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/export_all.py +0 -0
  197. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/file_filtering_policy.py +0 -0
  198. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/firewall_policy_nat.py +0 -0
  199. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/gateway_certificates.py +0 -0
  200. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/gateway_profile.py +0 -0
  201. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ha_management.py +0 -0
  202. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/images/256.png +0 -0
  203. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/import_engine_upgrade.py +0 -0
  204. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/internal_gateway.py +0 -0
  205. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/internal_user_and_user_group.py +0 -0
  206. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ip_lists.py +0 -0
  207. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_cluster.py +0 -0
  208. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_cluster_ldap_replication.py +0 -0
  209. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_firewall.py +0 -0
  210. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/lldp.py +0 -0
  211. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/login_domain_username_password.py +0 -0
  212. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/match_expression.py +0 -0
  213. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/mini_reports.py +0 -0
  214. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/modem_interface.py +0 -0
  215. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/black_list.py +0 -0
  216. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/block_list.py +0 -0
  217. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/logs.py +0 -0
  218. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/neighbor.py +0 -0
  219. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/routing_monitoring.py +0 -0
  220. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/vpn_sa.py +0 -0
  221. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring_status.py +0 -0
  222. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/netlink.py +0 -0
  223. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/network.py +0 -0
  224. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/policy_rule_source_vpn.py +0 -0
  225. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/profiles.py +0 -0
  226. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/protocol_agent.py +0 -0
  227. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/rule_cleanup.py +0 -0
  228. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/run_example.sh +0 -0
  229. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/scheduled_tasks.py +0 -0
  230. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/servers.py +0 -0
  231. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/service.py +0 -0
  232. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/situations.py +0 -0
  233. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ssl_vpn_portal.py +0 -0
  234. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ssm_elements.py +0 -0
  235. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sub_policies.py +0 -0
  236. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/switch_interface.py +0 -0
  237. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sync_admins.py +0 -0
  238. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sync_admins_config.json +0 -0
  239. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/system_properties.py +0 -0
  240. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/tasks.py +0 -0
  241. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/template_policies.py +0 -0
  242. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/test-parallel-multiprocessing.py +0 -0
  243. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/upcoming_event.py +0 -0
  244. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/update_server_profile.py +0 -0
  245. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/url_list_application.py +0 -0
  246. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/user_id_service.py +0 -0
  247. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/virtual_engines.py +0 -0
  248. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_profile.py +0 -0
  249. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_site.py +0 -0
  250. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_to_external_peer.py +0 -0
  251. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/web_access_server.py +0 -0
  252. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/known_issues +0 -0
  253. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/__init__.py +0 -0
  254. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/policy.py +0 -0
  255. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/__init__.py +0 -0
  256. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/pim.py +0 -0
  257. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/tests/.gitignore +0 -0
  258. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/tests/__init__.py +0 -0
  259. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/__init__.py +0 -0
  260. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/policy.py +0 -0
  261. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/.coveragerc +0 -0
  262. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/LICENSE +0 -0
  263. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/README.rst +0 -0
  264. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/__init__.py +0 -0
  265. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/__init__.py +0 -0
  266. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/constants.py +0 -0
  267. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/__init__.py +0 -0
  268. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/pubsub/__init__.py +0 -0
  269. {fp_ngfw_smc_python-1.0.34/smc → fp_ngfw_smc_python-1.0.35/smc-monitoring/smc_monitoring}/py.typed +0 -0
  270. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/__init__.py +0 -0
  271. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/test_filters.py +0 -0
  272. {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/test_queries.py +0 -0
@@ -26,3 +26,4 @@ qa/smc-test-module/terraform/**/*input
26
26
  qa/smc-test-module/docker/**/smc-python
27
27
  **/**/progress_report_*_result
28
28
  *.lock
29
+ LAST_SKILL_UPDATE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fp-NGFW-SMC-python
3
- Version: 1.0.34
3
+ Version: 1.0.35
4
4
  Summary: Python based API to Forcepoint NGFW Management Center
5
5
  Author-email: Forcepoint <PSIRT@forcepoint.com>
6
6
  License: Apache License (2.0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fp-NGFW-SMC-python
3
- Version: 1.0.34
3
+ Version: 1.0.35
4
4
  Summary: Python based API to Forcepoint NGFW Management Center
5
5
  Author-email: Forcepoint <PSIRT@forcepoint.com>
6
6
  License: Apache License (2.0)
@@ -25,10 +25,10 @@ smc-monitoring/MANIFEST.in
25
25
  smc-monitoring/README.rst
26
26
  smc-monitoring/pyproject.toml
27
27
  smc-monitoring/requirements.txt
28
- smc-monitoring/test.py
29
28
  smc-monitoring/tox.ini
30
29
  smc-monitoring/smc_monitoring/__init__.py
31
30
  smc-monitoring/smc_monitoring/__version__.py
31
+ smc-monitoring/smc_monitoring/py.typed
32
32
  smc-monitoring/smc_monitoring/wsocket.py
33
33
  smc-monitoring/smc_monitoring/models/__init__.py
34
34
  smc-monitoring/smc_monitoring/models/calendar.py
@@ -52,7 +52,6 @@ smc-monitoring/smc_monitoring/monitors/vpns.py
52
52
  smc-monitoring/smc_monitoring/pubsub/__init__.py
53
53
  smc-monitoring/smc_monitoring/pubsub/subscribers.py
54
54
  smc-monitoring/tests/__init__.py
55
- smc-monitoring/tests/docker_smc_bootstrap.py
56
55
  smc-monitoring/tests/test_filters.py
57
56
  smc-monitoring/tests/test_queries.py
58
57
  smc/actions/__init__.py
@@ -248,7 +247,17 @@ smc/routing/prefix_list.py
248
247
  smc/routing/route_map.py
249
248
  smc/tests/.gitignore
250
249
  smc/tests/__init__.py
251
- smc/tests/docker_smc_bootstrap.py
250
+ smc/tests/api_base_administration_bugs_test.py
251
+ smc/tests/api_web_debug_test.py
252
+ smc/tests/core_bugs_test.py
253
+ smc/tests/elements_bugs_test.py
254
+ smc/tests/engine_bugs_test.py
255
+ smc/tests/internal_gateway_test.py
256
+ smc/tests/monitoring_status_test.py
257
+ smc/tests/policy_vpn_bugs_test.py
258
+ smc/tests/smc_monitoring_entries_test.py
259
+ smc/tests/smc_request_headers_test.py
260
+ smc/tests/system_import_interactive_test.py
252
261
  smc/vpn/__init__.py
253
262
  smc/vpn/application_access_portal.py
254
263
  smc/vpn/elements.py
@@ -0,0 +1,62 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools",
4
+ "wheel",
5
+ "setuptools-scm[toml]",
6
+ "requests",
7
+ "pytz",
8
+ "urllib3"
9
+ ]
10
+ build-backend = "setuptools.build_meta"
11
+
12
+
13
+ [project]
14
+ name = 'fp-NGFW-SMC-python'
15
+ authors = [
16
+ {name = "Forcepoint", email = "PSIRT@forcepoint.com"},
17
+ ]
18
+ description = "Python based API to Forcepoint NGFW Management Center"
19
+ requires-python = ">=3.9"
20
+ license = {text = "Apache License (2.0)"}
21
+ dynamic = ["version", "readme"]
22
+ dependencies = [
23
+ "requests>=2.31.0",
24
+ "pytz>=2022.6",
25
+ "urllib3>=1.26.18"
26
+ ]
27
+ classifiers = [
28
+ "Development Status :: 5 - Production/Stable",
29
+ "Programming Language :: Python",
30
+ "Programming Language :: Python :: 3"
31
+ ]
32
+
33
+
34
+ [tool.setuptools.dynamic]
35
+ version = {attr = "smc.__version__"} # any module attribute compatible with ast.literal_eval
36
+ readme = {file = ["README.rst", "HISTORY.rst"]}
37
+
38
+
39
+ [tool.setuptools.packages.find]
40
+ # All the following settings are optional:
41
+ where = ["."] # ["."] by default
42
+ include = ["smc", "smc.*"] # ["*"] by default
43
+ exclude = ["smc.tests", "smc.docs"] # empty by default
44
+ namespaces = true # true by default
45
+
46
+
47
+ [tool.setuptools]
48
+ include-package-data = true
49
+ license-files = ["LICENSE"]
50
+
51
+ [tool.setuptools.package-data]
52
+ smc = ["py.typed"]
53
+
54
+ [tool.mypy]
55
+ # Run from this directory: `mypy` (no argument). Enforced by `make check-tests`.
56
+ python_version = "3.9"
57
+ ignore_missing_imports = true
58
+ files = ["smc", "smc-monitoring/smc_monitoring"]
59
+ exclude = '^smc/(tests|examples|docs)/'
60
+ check_untyped_defs = true
61
+ disallow_untyped_defs = true
62
+ disallow_incomplete_defs = true
@@ -20,7 +20,7 @@ from smc.base.util import import_submodules
20
20
 
21
21
  from .__version__ import __version__
22
22
 
23
- session_name = None
23
+ session_name: Optional[str] = None
24
24
  manager = SessionManager.create()
25
25
  session = manager.get_default_session()
26
26
 
@@ -42,7 +42,7 @@ try: # Python 2.7+
42
42
  from logging import NullHandler
43
43
  except ImportError:
44
44
 
45
- class NullHandler(logging.Handler):
45
+ class NullHandler(logging.Handler): # type: ignore[no-redef] # py2 fallback
46
46
  def emit(self, record: Any) -> None:
47
47
  pass
48
48
 
@@ -10,4 +10,4 @@
10
10
  # License for the specific language governing permissions and limitations
11
11
  # under the License.
12
12
 
13
- __version__ = '1.0.34'
13
+ __version__ = '1.0.35'
@@ -15,7 +15,7 @@ access permissions to either Engines, Policies or Domains.
15
15
  """
16
16
  from __future__ import annotations
17
17
 
18
- from typing import Any, Iterator, Optional, Union
18
+ from typing import Any, Iterator, Optional, Union, cast
19
19
 
20
20
  from smc.base.model import Element, ElementCreator
21
21
  from smc.base.structs import NestedDict
@@ -156,7 +156,7 @@ class Permission(NestedDict):
156
156
 
157
157
  :rtype: list(Element)
158
158
  """
159
- return [Element.from_href(element) for element in self.get("granted_elements")]
159
+ return [Element.from_href(element) for element in cast(list, self.get("granted_elements"))]
160
160
 
161
161
  @property
162
162
  def role(self) -> Any:
@@ -166,7 +166,7 @@ class Permission(NestedDict):
166
166
 
167
167
  :rtype: Role
168
168
  """
169
- return Element.from_href(self.get("role_ref"))
169
+ return Element.from_href(cast(str, self.get("role_ref")))
170
170
 
171
171
  @property
172
172
  def domain(self) -> Any:
@@ -230,7 +230,7 @@ class GrantedElementPermissions(NestedDict):
230
230
  """
231
231
  Granted Role containers.
232
232
  """
233
- return [AdminRoleContainer(container) for container in self.data.get("role_containers")]
233
+ return [AdminRoleContainer(container) for container in cast(list, self.data.get("role_containers"))]
234
234
 
235
235
 
236
236
  class AdminRoleContainer(NestedDict):
@@ -58,20 +58,20 @@ class CertificateAuthority(Element):
58
58
 
59
59
  if filename is not None:
60
60
  save_to_file(filename, result.content)
61
- return
61
+ return # type: ignore[return-value] # implicit None
62
62
 
63
63
  return result.content
64
64
 
65
65
  def duplicate(self, name: Any) -> Any:
66
66
  raise NotImplementedError(f"This method is not supported for {self.__class__.__name__}")
67
67
 
68
- def export(self, name: Any) -> Any:
68
+ def export(self, name: Any) -> Any: # type: ignore[override] # unsupported, signature differs
69
69
  raise NotImplementedError(f"This method is not supported for {self.__class__.__name__}")
70
70
 
71
71
  def add_category(self, name: Any) -> Any:
72
72
  raise NotImplementedError(f"This method is not supported for {self.__class__.__name__}")
73
73
 
74
- def categories(self, name: Any) -> Any:
74
+ def categories(self, name: Any) -> Any: # type: ignore[override] # unsupported, overrides a property
75
75
  raise NotImplementedError(f"This method is not supported for {self.__class__.__name__}")
76
76
 
77
77
  def rename(self, name: Any) -> Any:
@@ -602,6 +602,15 @@ class TLSServerCredential(
602
602
  """
603
603
  return self.make_request(method="create", resource="self_sign")
604
604
 
605
+ def sign_with_internal_ca(self) -> Any:
606
+ """
607
+ Sign the certificate in 'request' state with the SMC's internal CA
608
+ (the "Stonesoft Root CA" / "SG Root CA" certificate authority).
609
+
610
+ :raises ActionCommandFailed: failed to sign with reason
611
+ """
612
+ return self.make_request(method="create", resource="sign_with_internal_ca")
613
+
605
614
  @property
606
615
  def valid_from(self) -> Any:
607
616
  """
@@ -17,7 +17,7 @@ where the certificates/keys are stored, or providing in string format.
17
17
  """
18
18
  from __future__ import annotations
19
19
 
20
- from typing import Any, Optional, Union, Iterator
20
+ from typing import Any, Optional, Union, Iterator, TYPE_CHECKING, Callable
21
21
 
22
22
  import re
23
23
  from smc.compat import unicode
@@ -94,6 +94,10 @@ class ImportExportCertificate(object):
94
94
  classes.
95
95
  """
96
96
 
97
+ if TYPE_CHECKING:
98
+ typeof: str
99
+ make_request: Callable[..., Any]
100
+
97
101
  def import_certificate(self, certificate: Any) -> None:
98
102
  """
99
103
  Import a valid certificate. Certificate can be either a file path
@@ -133,7 +137,7 @@ class ImportExportCertificate(object):
133
137
 
134
138
  if filename is not None:
135
139
  save_to_file(filename, result.content)
136
- return
140
+ return # type: ignore[return-value] # implicit None
137
141
 
138
142
  return result.content
139
143
 
@@ -144,6 +148,9 @@ class ImportExportIntermediate(object):
144
148
  certificates
145
149
  """
146
150
 
151
+ if TYPE_CHECKING:
152
+ make_request: Callable[..., Any]
153
+
147
154
  def import_intermediate_certificate(self, certificate: Any) -> None:
148
155
  """
149
156
  Import a valid certificate. Certificate can be either a file path
@@ -181,7 +188,7 @@ class ImportExportIntermediate(object):
181
188
 
182
189
  if filename is not None:
183
190
  save_to_file(filename, result.content)
184
- return
191
+ return # type: ignore[return-value] # implicit None
185
192
 
186
193
  return result.content
187
194
 
@@ -192,6 +199,9 @@ class ImportPrivateKey(object):
192
199
  require private keys.
193
200
  """
194
201
 
202
+ if TYPE_CHECKING:
203
+ make_request: Callable[..., Any]
204
+
195
205
  def import_private_key(self, private_key: Any) -> None:
196
206
  """
197
207
  Import a private key. The private key can be a path to a file
@@ -15,7 +15,7 @@ and other VPN related connections. Each gateway certificate is signed by
15
15
  a VPN CA and uses the default internal CA by default.
16
16
  """
17
17
  from __future__ import annotations
18
- from typing import Any, Optional, Union, Iterator
18
+ from typing import Any, Optional, Union, Iterator, cast
19
19
  from smc.base.model import Element, ElementCreator, SubElement, ElementRef
20
20
  from smc.administration.certificates.tls_common import ImportExportCertificate
21
21
  from smc.api.exceptions import CertificateError, SMCOperationFailure, CertificateImportError
@@ -97,7 +97,7 @@ class GatewayCertificate(SubElement):
97
97
  cert_auth = element_resolver(signing_ca)
98
98
  json.update(certificate_authority_href=cert_auth)
99
99
  return ElementCreator(
100
- GatewayCertificate,
100
+ cast(Any, GatewayCertificate),
101
101
  exception=CertificateError,
102
102
  href=self.internal_gateway.get_relation("generate_certificate"),
103
103
  json=json
@@ -119,7 +119,7 @@ class GatewayCertificate(SubElement):
119
119
  cert_auth = element_resolver(signing_ca)
120
120
 
121
121
  return ElementCreator(
122
- GatewayCertificate,
122
+ cast(Any, GatewayCertificate),
123
123
  exception=CertificateError,
124
124
  href=self.internal_gateway.get_relation("generate_certificate"),
125
125
  json={
@@ -201,7 +201,7 @@ class GatewayCertificate(SubElement):
201
201
  return self.expiration_date
202
202
 
203
203
  def export_certificate(self, filename: Optional[str] = None) -> Any:
204
- export_result = ImportExportCertificate.export_certificate(self, filename)
204
+ export_result = ImportExportCertificate.export_certificate(cast(Any, self), filename)
205
205
  return export_result
206
206
 
207
207
 
@@ -261,7 +261,7 @@ class GatewayCertificateRequest(SubElement):
261
261
  return self.data.public_key_algorithm
262
262
 
263
263
  def export_certificate_request(self, filename: Optional[str] = None) -> Any:
264
- export_result = ImportExportCertificate.export_certificate(self, filename)
264
+ export_result = ImportExportCertificate.export_certificate(cast(Any, self), filename)
265
265
  return export_result
266
266
 
267
267
  def import_certificate_request(self, certificate: str) -> None:
@@ -75,7 +75,7 @@ class EcaClientConfig(Element):
75
75
 
76
76
  if filename is not None:
77
77
  save_to_file(filename, result.content)
78
- return
78
+ return # type: ignore[return-value] # implicit None
79
79
 
80
80
  return result.content
81
81
 
@@ -28,7 +28,7 @@ To get Monitoring Status for VPN and tunnels, do::
28
28
  """
29
29
  from __future__ import annotations
30
30
 
31
- from typing import Any, Optional, Union, Iterator
31
+ from typing import Any, Optional, Union, Iterator, TYPE_CHECKING
32
32
  import logging
33
33
  from smc.api.common import fetch_entry_point, SMCRequest
34
34
  from smc.api.exceptions import NotMonitored
@@ -38,6 +38,11 @@ from smc.core.resource import History
38
38
 
39
39
  logger = logging.getLogger(__name__)
40
40
 
41
+ # Present on every status payload, on every API version, but not declared
42
+ # as a property on any subclass - so __get_status_type()'s fallback must
43
+ # ignore them, like base-class attributes.
44
+ _ADDITIVE_ENVELOPE_FIELDS = frozenset({"element", "link"})
45
+
41
46
 
42
47
  class MonitoringStatus(object):
43
48
  """
@@ -75,6 +80,9 @@ class MonitoringStatus(object):
75
80
 
76
81
  """
77
82
 
83
+ if TYPE_CHECKING:
84
+ link: list[Any]
85
+
78
86
  def __init__(self, **data: Any) -> None:
79
87
  for d, v in data.items():
80
88
  # Made the code SMC 7.1 compatible
@@ -152,7 +160,7 @@ class MonitoringStatus(object):
152
160
  return self._result
153
161
 
154
162
  @property
155
- def history(self) -> Optional[History]:
163
+ def history(self) -> Optional[History]: # type: ignore[return] # implicit None
156
164
  """
157
165
  This function returns a history object.
158
166
  :return: history object.
@@ -165,24 +173,48 @@ class MonitoringStatus(object):
165
173
  result = SMCRequest(method="create", href=history_link).create()
166
174
  return History(**result.json)
167
175
 
168
- @result.setter
176
+ @result.setter # type: ignore[no-redef,attr-defined] # setter not adjacent to its getter
169
177
  def result(self, value: Any) -> None:
170
178
  self._result = value
171
179
 
180
+ @staticmethod
181
+ def __self_link_type(links: Any) -> Optional[str]:
182
+ """
183
+ :param links: the "link" list of the monitoring status payload, if
184
+ any (absent on older SMC versions)
185
+ :return: the "self" link's "type" token, or None if there is no
186
+ such link or its "type" is missing/null (some API versions)
187
+ :rtype: str
188
+ """
189
+ for link_dict in links or []:
190
+ if link_dict.get("rel") == "self":
191
+ return link_dict.get("type")
192
+ return None
193
+
172
194
  @staticmethod
173
195
  def __get_status_type(data: Any) -> Any:
174
196
  """
175
197
  :return: status class related to data
176
198
  :rtype: MonitoringStatus
177
199
  """
178
- # status by default
200
+ # Explicit discriminator: the "self" link's "type" token identifies
201
+ # the concrete type regardless of any additive field. No match ->
202
+ # fall through to the attribute-matching fallback below unchanged.
203
+ # A match returns immediately, so every entry in
204
+ # status_type_by_link_type must be trustworthy, not a guess.
205
+ link_type = MonitoringStatus.__self_link_type(data.get("link"))
206
+ if link_type in status_type_by_link_type:
207
+ return status_type_by_link_type[link_type]
208
+ # Fallback: infer the type from which attributes are present.
209
+ # status by default.
179
210
  result = MonitoringStatus
180
211
  for st in status_type:
181
212
  find = True
182
213
  nb_found = 0
183
214
  for attr in data:
184
- # don't check attributes from superclass
185
- if hasattr(MonitoringStatus, attr):
215
+ # don't check attributes from superclass, nor the additive
216
+ # envelope fields (not diagnostic of the subclass either)
217
+ if hasattr(MonitoringStatus, attr) or attr in _ADDITIVE_ENVELOPE_FIELDS:
186
218
  continue
187
219
  # if attribute from data not in status type, we continue to next type
188
220
  if not hasattr(st, attr):
@@ -214,10 +246,10 @@ class MonitoringStatus(object):
214
246
  return status(**result.json)
215
247
 
216
248
  def __str__(self) -> str:
217
- result = "{}=>".format(self.__class__.__name__)
218
- for attr in vars(self):
219
- result += "{} = {}, ".format(attr, getattr(self, attr))
220
- return result
249
+ attrs = ", ".join(
250
+ "{} = {!r}".format(attr, getattr(self, attr)) for attr in vars(self)
251
+ )
252
+ return "{}=>{}".format(self.__class__.__name__, attrs)
221
253
 
222
254
 
223
255
  class ServerStatus(MonitoringStatus):
@@ -270,16 +302,8 @@ class EngineNodeStatus(MonitoringStatus):
270
302
  state, version, current policy, ... of the specified Node.
271
303
  """
272
304
 
273
- @property
274
- def installed_policy(self) -> Optional[str]:
275
- """
276
- :return: The Last Uploaded Policy.
277
- :rtype: str
278
- """
279
- return self._installed_policy
280
-
281
- def installed_policy(self, value: Any) -> None:
282
- self._installed_policy = value
305
+ #: The Last Uploaded Policy, None when the server does not send it.
306
+ installed_policy: Optional[str] = None
283
307
 
284
308
  @property
285
309
  def installed_policy_ref(self) -> Any:
@@ -739,3 +763,28 @@ class VPNEndpointTunnelStatus(VPNGatewayTunnelStatus):
739
763
  status_type = [ServerStatus, EngineNodeStatus, SDWANBranchStatus, SDWANBranchToBranchStatus,
740
764
  SDWANNetlinkElementStatus, VPNStatus, VPNGatewayTunnelStatus,
741
765
  VPNEndpointTunnelStatus]
766
+
767
+ # Maps a monitoring status's "self" link "type" token (the server DTO's
768
+ # @XmlRootElement name, not a snake_case class name) to its
769
+ # MonitoringStatus subclass. Missing key -> safe, falls through to
770
+ # status_type above. Wrong key -> not safe, __get_status_type() returns on
771
+ # a hit and skips that fallback, so a wrong class misclassifies. Every
772
+ # entry must be confirmed, not guessed.
773
+ #
774
+ # "application_health_status" is real but deliberately absent: no
775
+ # ApplicationHealthStatus class exists, and callers read these payloads via
776
+ # dict(vars(status)), which depends on the base class's plain attributes.
777
+ #
778
+ # "sdwan_branch_tunnel_status" -> SDWANBranchToBranchStatus is withheld:
779
+ # real token, but the class was only inferred by elimination, not confirmed
780
+ # live. Falls through to status_type until confirmed.
781
+ status_type_by_link_type = {
782
+ "smc_server_status": ServerStatus,
783
+ "engine_node_status": EngineNodeStatus,
784
+ "sdwan_branch_status": SDWANBranchStatus,
785
+ # "sdwan_branch_tunnel_status": SDWANBranchToBranchStatus, # unconfirmed, see note above
786
+ "netlink_element_status": SDWANNetlinkElementStatus,
787
+ "vpn_status": VPNStatus,
788
+ "gateway_tunnel_status": VPNGatewayTunnelStatus,
789
+ "endpoint_tunnel_status": VPNEndpointTunnelStatus,
790
+ }
@@ -237,7 +237,7 @@ class Report(Element):
237
237
  headers={"accept": "application/pdf"},
238
238
  )
239
239
 
240
- def export_text(self, filename: Optional[str] = None) -> Optional[Any]:
240
+ def export_text(self, filename: Optional[str] = None) -> Optional[Any]: # type: ignore[return] # implicit None
241
241
  """
242
242
  Export in text format. Optionally provide a filename to
243
243
  save to.
@@ -99,9 +99,12 @@ date::
99
99
  for obtaining millisecond times for scheduled tasks.
100
100
  """
101
101
  from __future__ import annotations
102
- from typing import Any, Optional, Union, Iterator
102
+ from typing import Any, Optional, Union, Iterator, TYPE_CHECKING, cast, Callable
103
103
 
104
104
  from smc.base.model import Element, SubElement, ElementCreator, ElementRef
105
+
106
+ if TYPE_CHECKING:
107
+ from smc.base.model import ElementCache
105
108
  from smc.api.exceptions import ActionCommandFailed, UnsupportedEngineFeature, InvalidEngineNode
106
109
  from smc.administration.tasks import Task
107
110
  from smc.base.structs import NestedDict
@@ -338,6 +341,10 @@ class ScheduledTaskMixin(object):
338
341
  Actions common to all scheduled tasks.
339
342
  """
340
343
 
344
+ if TYPE_CHECKING:
345
+ data: ElementCache
346
+ make_request: Callable[..., Any]
347
+
341
348
  def start(self) -> Task:
342
349
  """
343
350
  Start the scheduled task now. Task can then be tracked by
@@ -430,7 +437,7 @@ class ScheduledTaskMixin(object):
430
437
  :return: list of Elements
431
438
  :rtype: list
432
439
  """
433
- return [Element.from_href(href) for href in self.data.get("resources")]
440
+ return [Element.from_href(href) for href in cast(list, self.data.get("resources"))]
434
441
 
435
442
 
436
443
  class RefreshPolicyTask(ScheduledTaskMixin, Element):