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.
- {ipfabric-7.2.1 → ipfabric-7.2.2}/PKG-INFO +1 -1
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/auth.py +4 -8
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/nist.py +13 -5
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/shared.py +8 -1
- {ipfabric-7.2.1 → ipfabric-7.2.2}/pyproject.toml +1 -1
- {ipfabric-7.2.1 → ipfabric-7.2.2}/LICENSE +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/NOTICES.md +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/README.md +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/api.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/client.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/graphs.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/icmp.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/constants.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/networkSettings.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/pathLookupSettings.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/graph_parameters.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/graph_settings.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/shared_view.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/graph_result.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/protocols.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/output_models/trace.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/authentication.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/config_export.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/device.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/discovery.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/extensions.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/global_search.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/intent.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/intent_check.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/inventory.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/jobs.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/matrix.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/oas.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/rbac.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/security.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/site_separation.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/snapshot.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/snapshots.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/table.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/addressing.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/cloud.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/dhcp.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/fhrp.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/interfaces.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/ip_telephony.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/load_balancing.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/managed_networks.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/management.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/mpls.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/multicast.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/neighbors.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/oam.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/platforms.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/port_channels.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/qos.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/routing.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/sdn.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/sdwan.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/security.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/stp.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/vlans.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/technology/wireless.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/users.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/models/vendor_api.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/v7.0.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/oas/v7.2.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/cve_report.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/device_search.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/global_search.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/route_search.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/shared.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/scripts/techsupport.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/api_tokens.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/appliance.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/attributes.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/authentication.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/discovery.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/local_users.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/rbac.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/seeds.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/settings.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/site_separation.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/settings/vendor_api.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/configuration.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/discovery_history.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/feature_matrix.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/__init__.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/policies.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/managed_rbac/roles.json +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/rbac.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/restore_intents.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/site_seperation_report.py +0 -0
- {ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/tools/vulnerabilities.py +0 -0
|
@@ -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
|
|
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
|
|
14
|
+
from httpx._types import CertTypes
|
|
15
15
|
from packaging.version import Version
|
|
16
|
-
from pydantic import field_validator, Field, AliasChoices, PrivateAttr
|
|
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(
|
|
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
|
|
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:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ipfabric-7.2.1 → ipfabric-7.2.2}/ipfabric/diagrams/input_models/factory_defaults/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|