epdg: Introduce test TC_hss_initiated_update_user_profile(_unknown)

This test so far only validates the SWx interface during the procedure.
It can be extended at a later time when implementing propagation of the
procedure to other interfaces in osmo-epdg.

Related: OS#6042
Change-Id: Ic7c19a3fe7b2b1411414fb6b78ab9a665a1aa42b
diff --git a/library/DIAMETER_ts29_273_Templates.ttcn b/library/DIAMETER_ts29_273_Templates.ttcn
index e1a0700..dcb5a31 100644
--- a/library/DIAMETER_ts29_273_Templates.ttcn
+++ b/library/DIAMETER_ts29_273_Templates.ttcn
@@ -205,6 +205,74 @@
 			ts_AVP_UserNameImsi(valueof(imsi))
 	});
 
+/* Push-Profile-Request,
+ * 3GPP TS 29.273 8.1.2.3 HSS Initiated Update of User Profile
+ * 3GPP TS 29.273 8.2.2.2 HSS Initiated Update of User Profile Procedure
+ */
+template (value) PDU_DIAMETER
+ts_DIA_SWx_PPR(template (value) hexstring imsi,
+	       template (value) AAA_3GPP_PDN_Type pdn_type,
+	       template (value) charstring apn,
+	       template (value) uint32_t vendor_app_id := c_DIAMETER_3GPP_SWx_AID,
+	       template (value) octetstring sess_id := c_def_sess_id,
+	       template (value) charstring orig_host := "hss.localdomain",
+	       template (value) charstring orig_realm := "localdomain",
+	       template (value) charstring dest_host := "aaa.localdomain",
+	       template (value) charstring dest_realm := "localdomain",
+	       template (value) UINT32 hbh_id := '00000000'O,
+	       template (value) UINT32 ete_id := '00000000'O) :=
+	ts_DIAMETER(flags := '11000000'B,
+		    cmd_code := Push_Profile,
+		    app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
+		    hbh_id := hbh_id,
+		    ete_id := ete_id,
+		    avps := {
+			ts_AVP_SessionId(sess_id),
+			ts_AVP_VendorSpecAppId(vendor_id_3GPP, valueof(vendor_app_id)),
+			ts_AVP_AuthSessionState(NO_STATE_MAINTAINED),
+			ts_AVP_OriginHost(orig_host),
+			ts_AVP_OriginRealm(orig_realm),
+			ts_AVP_DestinationHost(dest_host),
+			ts_AVP_DestinationRealm(dest_realm),
+			ts_AVP_UserNameImsi(imsi),
+			ts_AVP_3GPP_Non_3GPP_User_Data(pdn_type, apn)
+			/* Optional: PPR-Flags */
+			/* TODO:
+			 * *[ Supported-Features ]
+			 */
+	});
+
+/*  Push-Profile-Answer,
+ * 3GPP TS 29.273 8.1.2.3 HSS Initiated Update of User Profile
+ * 3GPP TS 29.273 8.2.2.2 HSS Initiated Update of User Profile Procedure
+ */
+template (present) PDU_DIAMETER
+tr_DIA_SWx_PPA(template (present) GenericAVP tmpl_result := ?,
+	       template (present) octetstring sess_id := ?,
+	       template (present) charstring orig_host :=  ?,
+	       template (present) charstring orig_realm := ?,
+	       template (present) charstring dest_host := ?,
+	       template (present) charstring dest_realm := ?,
+	       template (present) UINT32 hbh_id := ?,
+	       template (present) UINT32 ete_id := ?) :=
+	tr_DIAMETER(flags := '0???????'B,
+		    cmd_code := Push_Profile,
+		    app_id := int2oct(c_DIAMETER_3GPP_SWx_AID, 4),
+		    hbh_id := hbh_id, ete_id := ete_id,
+		    avps := superset(
+			tr_AVP_SessionId(sess_id),
+			tr_AVP_VendorSpecAppId(?, ?),
+			tmpl_result,
+			tr_AVP_AuthSessionState(NO_STATE_MAINTAINED),
+			tr_AVP_OriginHost(orig_host),
+			tr_AVP_OriginRealm(orig_realm)
+			/* Optional:
+			* [ Access-Network-Info ]
+			* [ Local-Time-Zone ]
+			* *[ Supported-Features ]
+			*/
+	));
+
 /* Server-Assignment-Request,
  * 3GPP TS 29.273 8.1.2.2.2 UE/PDN Registration/DeRegistration Notification
  * 3GPP TS 29.273 8.2.2.3 Non-3GPP IP Access Registration Procedure */