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.
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.gitignore +1 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/PKG-INFO +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/PKG-INFO +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/SOURCES.txt +12 -3
- fp_ngfw_smc_python-1.0.35/pyproject.toml +62 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/__init__.py +2 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/__version__.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/access_rights.py +4 -4
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/certificate_authority.py +3 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/tls.py +9 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/tls_common.py +13 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/vpn.py +5 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/eca_client_config.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/monitoring_status.py +69 -20
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/reports.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/scheduled_tasks.py +9 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/system.py +127 -18
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/system_properties.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/tasks.py +10 -10
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/updates.py +7 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/servers.py +25 -26
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/users.py +7 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/common.py +5 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/configloader.py +6 -6
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/exceptions.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/session.py +98 -41
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/web.py +42 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/collection.py +7 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/mixins.py +3 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/model.py +23 -20
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/structs.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/util.py +2 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/compat.py +12 -9
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/addon.py +5 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/advanced_settings.py +6 -6
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/collection.py +25 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/contact_address.py +3 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engine.py +144 -98
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engine_vss.py +2 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/engines.py +23 -22
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/general.py +13 -10
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/ha_management.py +57 -25
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/interfaces.py +75 -24
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/node.py +13 -13
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/policy.py +7 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/resource.py +5 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/route.py +16 -16
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/sub_interfaces.py +24 -16
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/waiters.py +7 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/conf.py +3 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/alerts.py +9 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/common.py +12 -4
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/group.py +68 -37
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/helpers.py +7 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/netlink.py +9 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/network.py +17 -17
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/other.py +6 -6
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/profiles.py +7 -4
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/protocols.py +14 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/servers.py +164 -29
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/service.py +8 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/situations.py +9 -9
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/user.py +10 -4
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/group.py +21 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/ws_async.py +5 -6
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/type_of_servers.py +42 -12
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/update_package.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/file_filtering.py +4 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/interface.py +5 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/ips.py +6 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/layer2.py +6 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/layer3.py +5 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/qos.py +2 -17
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule.py +56 -21
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule_elements.py +32 -18
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/rule_nat.py +19 -16
- fp_ngfw_smc_python-1.0.35/smc/py.typed +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/access_list.py +15 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/bgp.py +5 -5
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/bgp_access_list.py +3 -3
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/ospf.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/prefix_list.py +2 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/route_map.py +4 -4
- fp_ngfw_smc_python-1.0.35/smc/tests/api_base_administration_bugs_test.py +91 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/api_web_debug_test.py +79 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/core_bugs_test.py +133 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/elements_bugs_test.py +97 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/engine_bugs_test.py +182 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/internal_gateway_test.py +75 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/monitoring_status_test.py +79 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/policy_vpn_bugs_test.py +99 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/smc_monitoring_entries_test.py +74 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/smc_request_headers_test.py +34 -0
- fp_ngfw_smc_python-1.0.35/smc/tests/system_import_interactive_test.py +98 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/application_access_portal.py +11 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/elements.py +20 -18
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/route.py +4 -4
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/ssl_vpn_portal.py +11 -7
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/HISTORY.rst +7 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/MANIFEST.in +1 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/pyproject.toml +5 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/requirements.txt +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/__version__.py +1 -1
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/calendar.py +20 -19
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/filters.py +27 -22
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/formats.py +13 -10
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/formatters.py +17 -11
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/query.py +39 -24
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/values.py +14 -10
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/alerts.py +21 -19
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/blacklist.py +24 -21
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/block_list.py +24 -21
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/connections.py +18 -16
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/logs.py +18 -13
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/neighbors.py +19 -17
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/routes.py +18 -16
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/sslvpn.py +13 -11
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/users.py +14 -12
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/vpns.py +25 -23
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/pubsub/subscribers.py +11 -9
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/wsocket.py +42 -33
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tox.ini +1 -2
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/tox.ini +1 -7
- fp_ngfw_smc_python-1.0.34/pyproject.toml +0 -101
- fp_ngfw_smc_python-1.0.34/smc/tests/docker_smc_bootstrap.py +0 -349
- fp_ngfw_smc_python-1.0.34/smc-monitoring/test.py +0 -403
- fp_ngfw_smc_python-1.0.34/smc-monitoring/tests/docker_smc_bootstrap.py +0 -324
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.coveragerc +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/.readthedocs.yaml +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/HISTORY.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/LICENSE +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/MANIFEST.in +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/README.rst +0 -0
- {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
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/requires.txt +0 -0
- {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
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/setup.cfg +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/.gitignore +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/actions/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/filter.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/license.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/role.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/upcoming_event.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/user_auth/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/api/entry_point.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/base/decorators.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/external_pki.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/hardware.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/lldp.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/core/session_monitoring.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/.gitignore +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/Makefile +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/index.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/administration.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/collections.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/elements.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/engine.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/extensions.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/installation.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/intro.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/logging.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/policy.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/reference.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/resources.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/session.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/pages/vpn.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/docs/requirements.txt +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/ssm.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/elements/tags.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/README.md +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/add_sidewinder_routes.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/aggregated_interface.py +0 -0
- {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
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/alert_policy_and_alert_rule.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/alias.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/application_access_portal.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/basic_requests.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/bgp.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/certify_component_ext_pki.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/cloud_engine.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/configure_ztna_addon.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/connection_type.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/custom_script.zip +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/domain_name.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/eca_configuration.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/elasticsearch_cluster.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/engine-node-health.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/engine_query_route.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/export_all.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/file_filtering_policy.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/firewall_policy_nat.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/gateway_certificates.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/gateway_profile.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ha_management.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/images/256.png +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/import_engine_upgrade.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/internal_gateway.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/internal_user_and_user_group.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ip_lists.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_cluster.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_cluster_ldap_replication.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/layer3_firewall.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/lldp.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/login_domain_username_password.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/match_expression.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/mini_reports.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/modem_interface.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/black_list.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/block_list.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/logs.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/neighbor.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/routing_monitoring.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring/vpn_sa.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/monitoring_status.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/netlink.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/network.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/policy_rule_source_vpn.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/profiles.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/protocol_agent.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/rule_cleanup.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/run_example.sh +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/scheduled_tasks.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/servers.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/service.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/situations.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ssl_vpn_portal.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/ssm_elements.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sub_policies.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/switch_interface.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sync_admins.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/sync_admins_config.json +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/system_properties.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/tasks.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/template_policies.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/test-parallel-multiprocessing.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/upcoming_event.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/update_server_profile.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/url_list_application.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/user_id_service.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/virtual_engines.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_profile.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_site.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/vpn_to_external_peer.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/examples/web_access_server.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/known_issues +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/policy/policy.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/routing/pim.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/tests/.gitignore +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/tests/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/vpn/policy.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/.coveragerc +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/LICENSE +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/README.rst +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/models/constants.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/monitors/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/smc_monitoring/pubsub/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34/smc → fp_ngfw_smc_python-1.0.35/smc-monitoring/smc_monitoring}/py.typed +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/__init__.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/test_filters.py +0 -0
- {fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc-monitoring/tests/test_queries.py +0 -0
{fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/fp_NGFW_SMC_python.egg-info/SOURCES.txt
RENAMED
|
@@ -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/
|
|
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
|
|
|
@@ -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:
|
{fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/tls.py
RENAMED
|
@@ -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
|
{fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/certificates/vpn.py
RENAMED
|
@@ -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:
|
{fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/monitoring_status.py
RENAMED
|
@@ -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
|
-
#
|
|
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
|
-
|
|
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
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return
|
|
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
|
-
|
|
274
|
-
|
|
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.
|
{fp_ngfw_smc_python-1.0.34 → fp_ngfw_smc_python-1.0.35}/smc/administration/scheduled_tasks.py
RENAMED
|
@@ -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):
|