From b6a79b7a6ab98203d873cb57be927b59810952cd Mon Sep 17 00:00:00 2001 From: Paul Hewlett Date: Tue, 6 Jul 2021 09:05:07 +0100 Subject: [PATCH] Remove unused behaviours Problem: Some defined behaviours have been removed from archivist. Solution: "Firmware", "Maintenance", "LocationUpdate" and "UserAttributes" behaviours removed from examples and tests. Signed-off-by: Paul Hewlett --- README.md | 2 +- examples/access_policy_create.py | 2 +- examples/create_asset.py | 3 --- examples/create_event.py | 3 --- functests/execaccess_policies.py | 2 +- unittests/testaccess_policies.py | 2 +- unittests/testassets.py | 3 --- 7 files changed, 4 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 9b1d2df9..04ba82ff 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ attrs = { "some_custom_attribute": "value" # You can add any custom value as long as # it does not start with arc_ } -behaviours = ["Attachments", "Firmware", "LocationUpdate", "Maintenance", "RecordEvidence"] +behaviours = ["Attachments", "RecordEvidence"] # The first argument is the behaviours of the asset # The second argument is the attributes of the asset diff --git a/examples/access_policy_create.py b/examples/access_policy_create.py index 3bdb1646..55d261a9 100644 --- a/examples/access_policy_create.py +++ b/examples/access_policy_create.py @@ -54,7 +54,7 @@ def main(): { "asset_attributes_read": ["toner_colour", "toner_type"], "asset_attributes_write": ["toner_colour"], - "behaviours": ["Attachments", "Firmware", "Maintenance", "RecordEvidence"], + "behaviours": ["Attachments", "RecordEvidence"], "event_arc_display_type_read": ["toner_type", "toner_colour"], "event_arc_display_type_write": ["toner_replacement"], "include_attributes": [ diff --git a/examples/create_asset.py b/examples/create_asset.py index cef1e9ca..d9b75603 100644 --- a/examples/create_asset.py +++ b/examples/create_asset.py @@ -37,9 +37,6 @@ def create_asset(arch): } behaviours = [ "Attachments", - "Firmware", - "LocationUpdate", - "Maintenance", "RecordEvidence", ] diff --git a/examples/create_event.py b/examples/create_event.py index 6391434e..4f817af1 100644 --- a/examples/create_event.py +++ b/examples/create_event.py @@ -82,9 +82,6 @@ def create_asset(arch): } behaviours = [ "Attachments", - "Firmware", - "LocationUpdate", - "Maintenance", "RecordEvidence", ] diff --git a/functests/execaccess_policies.py b/functests/execaccess_policies.py index 23dd9e7c..3636f4de 100644 --- a/functests/execaccess_policies.py +++ b/functests/execaccess_policies.py @@ -44,7 +44,7 @@ "subjects/6a951b62-0a26-4c22-a886-1082297b063b", "subjects/a24306e5-dc06-41ba-a7d6-2b6b3e1df48d", ], - "behaviours": ["Attachments", "Firmware", "Maintenance", "RecordEvidence"], + "behaviours": ["Attachments", "RecordEvidence"], "include_attributes": [ "arc_display_name", "arc_display_type", diff --git a/unittests/testaccess_policies.py b/unittests/testaccess_policies.py index f9fd954e..601491cc 100644 --- a/unittests/testaccess_policies.py +++ b/unittests/testaccess_policies.py @@ -54,7 +54,7 @@ "subjects/6a951b62-0a26-4c22-a886-1082297b063b", "subjects/a24306e5-dc06-41ba-a7d6-2b6b3e1df48d", ], - "behaviours": ["Attachments", "Firmware", "Maintenance", "RecordEvidence"], + "behaviours": ["Attachments", "RecordEvidence"], "include_attributes": [ "arc_display_name", "arc_display_type", diff --git a/unittests/testassets.py b/unittests/testassets.py index d2bb95a4..bf2132ea 100644 --- a/unittests/testassets.py +++ b/unittests/testassets.py @@ -25,10 +25,7 @@ BEHAVIOURS = [ - "Firmware", - "Maintenance", "RecordEvidence", - "LocationUpdate", "Attachments", ] PRIMARY_IMAGE = {