Skip to content

Commit 54c9b4f

Browse files
committed
Warn of moved properties
No effects were observed on Make-managed files. References: * ucoProject/UCO#632 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
1 parent 75f7a59 commit 54c9b4f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

case_mapping/uco/observable.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from datetime import datetime
22
from typing import Any, Dict, List, Optional, Union
3+
from warnings import warn
34

45
from cdo_local_uuid import local_uuid
56

@@ -1329,6 +1330,17 @@ def __init__(
13291330
os_isLimitAdTrackingEnabled: Optional[bool] = None,
13301331
**kwargs: Any,
13311332
):
1333+
if "os_manufacturer" in kwargs:
1334+
warn(
1335+
"'os_manufacturer' should not be used on an OperatingSystemFacet as of UCO 1.4.0. Instead, use 'manufacturer' on a SoftwareFacet attached to the same OperatingSystem object.",
1336+
DeprecationWarning,
1337+
)
1338+
if "os_version" in kwargs:
1339+
warn(
1340+
"'os_version' should not be used on an OperatingSystemFacet as of UCO 1.4.0. Instead, use 'version' on a SoftwareFacet attached to the same OperatingSystem object.",
1341+
DeprecationWarning,
1342+
)
1343+
13321344
super().__init__()
13331345

13341346
self["@type"] = "uco-observable:OperatingSystemFacet"

0 commit comments

Comments
 (0)