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

Change subject: esipa_rest_utils: re-align to SGP.32 Section 2.11.2
......................................................................

esipa_rest_utils: re-align to SGP.32 Section 2.11.2

Section 2.11.2: rename EuiccPackageResultDataSigned.configureAutoEnableResult 
to EuiccPackageResultDataSigned.configureImmediateEnableResult

Change-Id: Ib4e6a4b4cb4d26a391346169b9047515496dd308
Related: SYS#8100
---
M contrib/rest_api_resource_schema.json
M contrib/rest_api_response_schema.json
R contrib/tryme_configureImmediateEnable.sh
M src/esipa_rest_utils.erl
4 files changed, 62 insertions(+), 37 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified




diff --git a/contrib/rest_api_resource_schema.json 
b/contrib/rest_api_resource_schema.json
index 5f18d75..27726ff 100644
--- a/contrib/rest_api_resource_schema.json
+++ b/contrib/rest_api_resource_schema.json
@@ -136,24 +136,24 @@
                     }
                   },
                   {
-                    "configureAutoEnable": {
-                      "description": "order the execution of a 
configureAutoEnable PSMO, see also GSMA SGP.32, section 5.13.6",
+                    "configureImmediateEnable": {
+                      "description": "order the execution of a 
configureImmediateEnable PSMO, see also GSMA SGP.32, section 5.13.6",
                       "type": "object",
                       "properties": {
-                        "autoEnableFlag": {
+                        "immediateEnableFlag": {
                           "description": "enable/disable automatic profile 
enabeling",
                           "type": "boolean"
                         },
-                        "objid": {
+                        "defaultSmdpOid": {
                           "description": "object ID of the default SMDP+",
                           "type": "string"
                         },
-                        "smdpAddress": {
+                        "defaultSmdpAddress": {
                           "description": "FQDN of the default SMDP+",
                           "type": "string"
                         },
                         "required": [
-                          "autoEnableFlag"
+                          "immediateEnableFlag"
                         ]
                       }
                     }
diff --git a/contrib/rest_api_response_schema.json 
b/contrib/rest_api_response_schema.json
index bf0c843..5b00450 100644
--- a/contrib/rest_api_response_schema.json
+++ b/contrib/rest_api_response_schema.json
@@ -195,8 +195,8 @@
               }
             },
             {
-              "configureAutoEnableResult": {
-                "description": "configureAutoEnableResult (automatic profile 
enabeling) PSMO result, see also SGP32Definitions.asn1",
+              "configureImmediateEnableResult": {
+                "description": "configureImmediateEnableResult (automatic 
profile enabeling) PSMO result, see also SGP32Definitions.asn1",
                 "type": "string",
                 "enum": [
                   "ok",
diff --git a/contrib/tryme_configureAutoEnable.sh 
b/contrib/tryme_configureImmediateEnable.sh
similarity index 74%
rename from contrib/tryme_configureAutoEnable.sh
rename to contrib/tryme_configureImmediateEnable.sh
index 89c08dd..9cf4fde 100755
--- a/contrib/tryme_configureAutoEnable.sh
+++ b/contrib/tryme_configureImmediateEnable.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 . ./tryme.cfg

-JSON='{ "eidValue" : "'$EID'", "order" : { "psmo": [ { "configureAutoEnable" : 
{ "autoEnableFlag" : true, "smdpAddress" : "rsp.truphone.com" } } ] } }'
+JSON='{ "eidValue" : "'$EID'", "order" : { "psmo": [ { 
"configureImmediateEnable" : { "immediateEnableFlag" : true, 
"defaultSmdpAddress" : "testsmdpplus1.example.com" } } ] } }'
 RC=`./restop.py -c -f psmo -j "$JSON"`
 echo $RC

diff --git a/src/esipa_rest_utils.erl b/src/esipa_rest_utils.erl
index efbf985..477cd7e 100644
--- a/src/esipa_rest_utils.erl
+++ b/src/esipa_rest_utils.erl
@@ -100,34 +100,59 @@
             error
     end.

-psmo_to_asn_configureAutoEnable(Psmo) ->
+psmo_to_asn_configureImmediateEnable(Psmo) ->
     case Psmo of
-        {[{<<"autoEnableFlag">>, true}, {<<"smdpOid">>, SmdpOid}, 
{<<"smdpAddress">>, SmdpAddress}]} ->
-            {configureAutoEnable, #{
-                autoEnableFlag => null,
-                smdpOid => binary_to_list(SmdpOid),
-                smdpAddress => SmdpAddress
-            }};
-        {[{<<"autoEnableFlag">>, true}, {<<"smdpOid">>, SmdpOid}]} ->
-            {configureAutoEnable, #{autoEnableFlag => null, smdpOid => 
binary_to_list(SmdpOid)}};
-        {[{<<"autoEnableFlag">>, true}, {<<"smdpAddress">>, SmdpAddress}]} ->
-            {configureAutoEnable, #{autoEnableFlag => null, smdpAddress => 
SmdpAddress}};
-        {[{<<"autoEnableFlag">>, true}]} ->
-            {configureAutoEnable, #{autoEnableFlag => null}};
         {[
-            {<<"autoEnableFlag">>, false},
-            {<<"smdpOid">>, SmdpOid},
-            {<<"smdpAddress">>, SmdpAddress}
+            {<<"immediateEnableFlag">>, true},
+            {<<"defaultSmdpOid">>, DefaultSmdpOid},
+            {<<"defaultSmdpAddress">>, DefaultSmdpAddress}
         ]} ->
-            {configureAutoEnable, #{mdpOid => binary_to_list(SmdpOid), 
smdpAddress => SmdpAddress}};
-        {[{<<"autoEnableFlag">>, false}, {<<"smdpOid">>, SmdpOid}]} ->
-            {configureAutoEnable, #{smdpOid => binary_to_list(SmdpOid)}};
-        {[{<<"autoEnableFlag">>, false}, {<<"smdpAddress">>, SmdpAddress}]} ->
-            {configureAutoEnable, #{smdpAddress => SmdpAddress}};
-        {[{<<"autoEnableFlag">>, false}]} ->
-            {configureAutoEnable, #{}};
+            {configureImmediateEnable, #{
+                immediateEnableFlag => null,
+                defaultSmdpOid => binary_to_list(DefaultSmdpOid),
+                defaultSmdpAddress => DefaultSmdpAddress
+            }};
+        {[
+            {<<"immediateEnableFlag">>, true},
+            {<<"defaultSmdpOid">>, DefaultSmdpOid}
+        ]} ->
+            {configureImmediateEnable, #{
+                immediateEnableFlag => null,
+                defaultSmdpOid => binary_to_list(DefaultSmdpOid)
+            }};
+        {[
+            {<<"immediateEnableFlag">>, true},
+            {<<"defaultSmdpAddress">>, DefaultSmdpAddress}
+        ]} ->
+            {configureImmediateEnable, #{
+                immediateEnableFlag => null,
+                defaultSmdpAddress => DefaultSmdpAddress
+            }};
+        {[{<<"immediateEnableFlag">>, true}]} ->
+            {configureImmediateEnable, #{immediateEnableFlag => null}};
+        {[
+            {<<"immediateEnableFlag">>, false},
+            {<<"defaultSmdpOid">>, DefaultSmdpOid},
+            {<<"defaultSmdpAddress">>, DefaultSmdpAddress}
+        ]} ->
+            {configureImmediateEnable, #{
+                defaultSmdpOid => binary_to_list(DefaultSmdpOid),
+                defaultSmdpAddress => DefaultSmdpAddress
+            }};
+        {[
+            {<<"immediateEnableFlag">>, false},
+            {<<"defaultSmdpOid">>, DefaultSmdpOid}
+        ]} ->
+            {configureImmediateEnable, #{defaultSmdpOid => 
binary_to_list(DefaultSmdpOid)}};
+        {[
+            {<<"immediateEnableFlag">>, false},
+            {<<"defaultSmdpAddress">>, DefaultSmdpAddress}
+        ]} ->
+            {configureImmediateEnable, #{defaultSmdpAddress => 
DefaultSmdpAddress}};
+        {[{<<"immediateEnableFlag">>, false}]} ->
+            {configureImmediateEnable, #{}};
         _ ->
-            logger:error("REST: order with bad configureAutoEnable PSMO: 
~p~n", [Psmo]),
+            logger:error("REST: order with bad configureImmediateEnable PSMO: 
~p~n", [Psmo]),
             error
     end.

@@ -162,8 +187,8 @@
                 psmo_to_asn_listProfileInfo(Psmo);
             {[{<<"getRAT">>, Psmo}]} ->
                 psmo_to_asn_getRAT(Psmo);
-            {[{<<"configureAutoEnable">>, Psmo}]} ->
-                psmo_to_asn_configureAutoEnable(Psmo);
+            {[{<<"configureImmediateEnable">>, Psmo}]} ->
+                psmo_to_asn_configureImmediateEnable(Psmo);
             _ ->
                 logger:error("REST: order with unknown/unsupported PSMO: 
~p~n", [PsmoOrder]),
                 error
@@ -389,8 +414,8 @@
                 result_to_json_listProfileInfoResult(ListProfileInfoResult);
             {getRATResult, GetRATResult} ->
                 result_to_json_getRATResult(GetRATResult);
-            {configureAutoEnableResult, ConfigureAutoEnableResult} ->
-                {[{configureAutoEnableResult, ConfigureAutoEnableResult}]};
+            {configureImmediateEnableResult, ConfigureImmediateEnableResult} ->
+                {[{configureImmediateEnableResult, 
ConfigureImmediateEnableResult}]};
             {addEimResult, AddEimResult} ->
                 result_to_json_addEimResult(AddEimResult);
             {deleteEimResult, DeleteEimResult} ->

--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42878?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: Ib4e6a4b4cb4d26a391346169b9047515496dd308
Gerrit-Change-Number: 42878
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>

Reply via email to