Skip to content

Commit

Permalink
Add parse for EraseCryto for SSDs and modify certs
Browse files Browse the repository at this point in the history
  • Loading branch information
cayop committed Jun 9, 2024
1 parent 919d935 commit c9aface
Show file tree
Hide file tree
Showing 6 changed files with 416 additions and 105 deletions.
8 changes: 5 additions & 3 deletions ereuse_devicehub/inventory/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
TransferCustomerDetails,
)
from ereuse_devicehub.parser.models import PlaceholdersLog, SnapshotsLog
from ereuse_devicehub.parser.parser import ParseSnapshotLsHw
from ereuse_devicehub.parser.parser import ParseSnapshotLsHw, ParseSnapshot
from ereuse_devicehub.parser.schemas import Snapshot_lite
from ereuse_devicehub.resources.action.models import Snapshot, Trade, VisualTest
from ereuse_devicehub.resources.action.schemas import Snapshot as SnapshotSchema
Expand Down Expand Up @@ -339,16 +339,18 @@ def save(self, commit=True, user_trusts=True):

if self.is_wb_lite_snapshot(self.version):
self.snapshot_json = schema_lite.load(snapshot_json)
snapshot_json = ParseSnapshotLsHw(self.snapshot_json).snapshot_json
snapshot_json = ParseSnapshot(self.snapshot_json).snapshot_json
# snapshot_json = ParseSnapshotLsHw(self.snapshot_json).snapshot_json
else:
self.version = snapshot_json.get('version')
system_uuid = self.get_uuid(debug)
if system_uuid:
snapshot_json['device']['system_uuid'] = system_uuid
self.get_fields_extra(debug, snapshot_json)

try:

snapshot_json = schema.load(snapshot_json)

response = self.build(
snapshot_json, create_new_device=self.create_new_devices
)
Expand Down
Loading

0 comments on commit c9aface

Please sign in to comment.