dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email )

 (

9 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: mnesia_db_rest: add comment on why we create an euicc entry 
early
......................................................................

mnesia_db_rest: add comment on why we create an euicc entry early

Even though it is technically not necessary, we ensure that an
entry is present in the euicc table on each REST API call. Let's
add a comment to explain why we do it anyway.

Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Related: SYS#8100
---
M src/mnesia_db_rest.erl
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  jolly: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/src/mnesia_db_rest.erl b/src/mnesia_db_rest.erl
index 41b4a0c..0976beb 100644
--- a/src/mnesia_db_rest.erl
+++ b/src/mnesia_db_rest.erl
@@ -41,7 +41,13 @@

 % Create REST resource (order)
 create(Facility, EidValue, Order) ->
+    % Ensure that an euicc entry is present in the database for the given 
EidValue. In case no entry exists yet, a new
+    % entry is created with default parameters from sys.config, which is is 
sufficient in many usecases. From the
+    % technical perspective, this is just a convenience feature, which frees 
the REST API user from having to create an
+    % euicc entry manually before performming the first operation.
     ok = mnesia_db_euicc:create_if_not_exist(EidValue),
+
+    % Continue with the normal creation of the REST resource.
     ResourceId = uuid:uuid_to_string(uuid:get_v4_urandom()),
     Timestamp = os:system_time(seconds),
     Row = #rest{

--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42991?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Ifb9340655c5f36e074a1a92c0e234ef62c79b9d8
Gerrit-Change-Number: 42991
Gerrit-PatchSet: 10
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to