ipfabric 7.2.1__tar.gz → 7.2.2__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 (104) hide show
  1. {ipfabric-7.2.1 → ipfabric-7.2.2}/PKG-INFO +1 -1
  2. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/auth.py +4 -8
  3. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/nist.py +13 -5
  4. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/shared.py +8 -1
  5. {ipfabric-7.2.1 → ipfabric-7.2.2}/pyproject.toml +1 -1
  6. {ipfabric-7.2.1 → ipfabric-7.2.2}/LICENSE +0 -0
  7. {ipfabric-7.2.1 → ipfabric-7.2.2}/NOTICES.md +0 -0
  8. {ipfabric-7.2.1 → ipfabric-7.2.2}/README.md +0 -0
  9. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/__init__.py +0 -0
  10. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/api.py +0 -0
  11. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/client.py +0 -0
  12. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/__init__.py +0 -0
  13. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/graphs.py +0 -0
  14. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/icmp.py +0 -0
  15. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/__init__.py +0 -0
  16. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/constants.py +0 -0
  17. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/__init__.py +0 -0
  18. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/networkSettings.json +0 -0
  19. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/pathLookupSettings.json +0 -0
  20. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/graph_parameters.py +0 -0
  21. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/graph_settings.py +0 -0
  22. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/shared_view.py +0 -0
  23. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/__init__.py +0 -0
  24. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/graph_result.py +0 -0
  25. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/protocols.py +0 -0
  26. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/trace.py +0 -0
  27. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/__init__.py +0 -0
  28. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/authentication.py +0 -0
  29. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/config_export.py +0 -0
  30. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/device.py +0 -0
  31. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/discovery.py +0 -0
  32. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/extensions.py +0 -0
  33. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/global_search.py +0 -0
  34. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/intent.py +0 -0
  35. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/intent_check.py +0 -0
  36. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/inventory.py +0 -0
  37. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/jobs.py +0 -0
  38. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/matrix.py +0 -0
  39. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/oas.py +0 -0
  40. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/rbac.py +0 -0
  41. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/security.py +0 -0
  42. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/site_separation.py +0 -0
  43. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/snapshot.py +0 -0
  44. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/snapshots.py +0 -0
  45. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/table.py +0 -0
  46. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/__init__.py +0 -0
  47. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/addressing.py +0 -0
  48. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/cloud.py +0 -0
  49. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/dhcp.py +0 -0
  50. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/fhrp.py +0 -0
  51. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/interfaces.py +0 -0
  52. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/ip_telephony.py +0 -0
  53. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/load_balancing.py +0 -0
  54. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/managed_networks.py +0 -0
  55. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/management.py +0 -0
  56. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/mpls.py +0 -0
  57. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/multicast.py +0 -0
  58. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/neighbors.py +0 -0
  59. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/oam.py +0 -0
  60. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/platforms.py +0 -0
  61. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/port_channels.py +0 -0
  62. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/qos.py +0 -0
  63. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/routing.py +0 -0
  64. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/sdn.py +0 -0
  65. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/sdwan.py +0 -0
  66. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/security.py +0 -0
  67. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/stp.py +0 -0
  68. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/vlans.py +0 -0
  69. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/wireless.py +0 -0
  70. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/users.py +0 -0
  71. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/vendor_api.py +0 -0
  72. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/__init__.py +0 -0
  73. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/v7.0.json +0 -0
  74. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/v7.2.json +0 -0
  75. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/__init__.py +0 -0
  76. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/cve_report.py +0 -0
  77. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/device_search.py +0 -0
  78. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/global_search.py +0 -0
  79. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/route_search.py +0 -0
  80. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/shared.py +0 -0
  81. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/techsupport.py +0 -0
  82. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/__init__.py +0 -0
  83. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/api_tokens.py +0 -0
  84. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/appliance.py +0 -0
  85. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/attributes.py +0 -0
  86. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/authentication.py +0 -0
  87. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/discovery.py +0 -0
  88. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/local_users.py +0 -0
  89. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/rbac.py +0 -0
  90. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/seeds.py +0 -0
  91. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/settings.py +0 -0
  92. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/site_separation.py +0 -0
  93. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/vendor_api.py +0 -0
  94. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/__init__.py +0 -0
  95. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/configuration.py +0 -0
  96. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/discovery_history.py +0 -0
  97. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/feature_matrix.py +0 -0
  98. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/__init__.py +0 -0
  99. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/policies.json +0 -0
  100. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/roles.json +0 -0
  101. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/rbac.py +0 -0
  102. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/restore_intents.py +0 -0
  103. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/site_seperation_report.py +0 -0
  104. {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/vulnerabilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ipfabric
3
- Version: 7.2.1
3
+ Version: 7.2.2
4
4
  Summary: Python package for interacting with IP Fabric
5
5
  License: MIT
6
6
  Keywords: ipfabric,ip-fabric,community-fabric
@@ -9,22 +9,18 @@ from time import sleep
9
9
  from typing import Optional, Union, Generator, Any, Type, Literal, Mapping
10
10
 
11
11
  import jwt
12
- from httpx import Client, BaseTransport, URL, Request, Response, Auth, Timeout, post, Proxy
12
+ from httpx import Client, BaseTransport, URL, Request, Response, Auth, Timeout, post
13
13
  from httpx._client import EventHook
14
- from httpx._types import CertTypes, URLTypes
14
+ from httpx._types import CertTypes
15
15
  from packaging.version import Version
16
- from pydantic import field_validator, Field, AliasChoices, PrivateAttr, InstanceOf
16
+ from pydantic import field_validator, Field, AliasChoices, PrivateAttr
17
17
  from pydantic_settings import BaseSettings, SettingsConfigDict, PydanticBaseSettingsSource, InitSettingsSource
18
18
 
19
- from ipfabric.tools.shared import raise_for_status, valid_snapshot
19
+ from ipfabric.tools.shared import raise_for_status, valid_snapshot, ProxyTypes, TimeoutTypes
20
20
 
21
21
  logger = logging.getLogger("ipfabric")
22
22
 
23
23
  RE_VERSION = re.compile(r"v?(\d(\.\d*)?)")
24
- ProxyTypes = Union[None, URLTypes, InstanceOf[Proxy]]
25
- TimeoutTypes = Union[
26
- Optional[float], tuple[Optional[float], Optional[float], Optional[float], Optional[float]], Timeout, None
27
- ]
28
24
 
29
25
 
30
26
  def log_request(request: Request):
@@ -2,9 +2,10 @@ from time import sleep
2
2
  from typing import Optional, Union
3
3
 
4
4
  from httpx import Client, ReadTimeout, HTTPStatusError
5
- from httpx._types import ProxyTypes, TimeoutTypes
6
5
  from pydantic import BaseModel, ConfigDict, field_validator
7
6
 
7
+ from ipfabric.tools.shared import ProxyTypes, TimeoutTypes
8
+
8
9
  UNSUPPORTED_VENDORS = [
9
10
  "azure",
10
11
  "aws",
@@ -299,9 +300,9 @@ class NIST(Client):
299
300
  return cves
300
301
  except ReadTimeout:
301
302
  return CVEs(total_results=0, cves=[], error="Timeout", cpe=cpe)
302
- except HTTPStatusError:
303
+ except HTTPStatusError as e:
303
304
  if attempt > self.retries:
304
- return CVEs(total_results=0, cves=[], error="HTTP Error", cpe=cpe)
305
+ return CVEs(total_results=0, cves=[], error=f"HTTP Error {e.response.status_code}", cpe=cpe)
305
306
  else:
306
307
  return self._query_cve(cpe, attempt + 1)
307
308
 
@@ -314,10 +315,17 @@ class NIST(Client):
314
315
  return [CPE(**_["cpe"]) for _ in data["products"] if "cpe" in _]
315
316
  except ReadTimeout:
316
317
  return [CPE(cpeName="", cpeNameId="", deprecated=False, created="", lastModified="", error="Timeout")]
317
- except HTTPStatusError:
318
+ except HTTPStatusError as e:
318
319
  if attempt > self.retries:
319
320
  return [
320
- CPE(cpeName="", cpeNameId="", deprecated=False, created="", lastModified="", error="HTTP Error")
321
+ CPE(
322
+ cpeName="",
323
+ cpeNameId="",
324
+ deprecated=False,
325
+ created="",
326
+ lastModified="",
327
+ error=f"HTTP Error {e.response.status_code}",
328
+ )
321
329
  ]
322
330
  else:
323
331
  return self._query_cpe(params, attempt + 1)
@@ -18,7 +18,9 @@ from uuid import UUID
18
18
 
19
19
  import macaddress
20
20
  from dateutil import parser
21
- from httpx import HTTPStatusError, Response
21
+ from httpx import Response, Timeout, Proxy, HTTPStatusError
22
+ from httpx._types import URLTypes
23
+ from pydantic import InstanceOf
22
24
  from pytz import BaseTzInfo, utc
23
25
 
24
26
  logger = logging.getLogger("ipfabric")
@@ -34,6 +36,11 @@ VALID_IP = Union[IPv4Address, IPv4Network, IPv4Interface]
34
36
  VALID_IPv6 = Union[IPv6Address, IPv6Network, IPv6Interface]
35
37
  SLUG = re.compile(r"^[a-zA-Z0-9_\-.#:]*$")
36
38
 
39
+ ProxyTypes = Union[None, URLTypes, InstanceOf[Proxy]]
40
+ TimeoutTypes = Union[
41
+ Optional[float], tuple[Optional[float], Optional[float], Optional[float], Optional[float]], Timeout, None
42
+ ]
43
+
37
44
 
38
45
  def valid_snapshot(snapshot: Union[None, str], init: bool = False) -> str:
39
46
  if snapshot is None:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ipfabric"
3
- version = "7.2.1"
3
+ version = "7.2.2"
4
4
  description = "Python package for interacting with IP Fabric"
5
5
  authors = [
6
6
  "Solution Architecture <solution.architecture@ipfabric.io>"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes