Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uplift to TS 26.512 v17.4.0: AF to handle multiple media entry points #51

Closed
davidjwbbc opened this issue Mar 14, 2023 · 13 comments · Fixed by #62
Closed

Uplift to TS 26.512 v17.4.0: AF to handle multiple media entry points #51

davidjwbbc opened this issue Mar 14, 2023 · 13 comments · Fixed by #62
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@davidjwbbc
Copy link
Contributor

davidjwbbc commented Mar 14, 2023

Context

3GPP SA4 has agreed CR0032r1 [S4-230267] to update TS 26.512 Rel-17. This will hopefully be approved at SA#99 Plenary as part of the CR Pack SP-230253.

One part of these changes is the introduction of multiple entry point paths, up to one per distributionConfiguration, instead of just a single entryPointPath in the ContentHostingConfiguration. This is a compatibility breaking change in the specification which affects the interfaces at reference points M1 and M5.

The new OpenAPI YAML for TS26512_M1_ContentHostingProvisioning.yaml removes entryPointPath at the top level on the ContentHostingConfiguration object and introduces a new optional distributionConfigurations[].entryPoint object. This new entryPoint object has 3 properties:

  • relativePath - This is a mandatory property which is the per distributionConfiguration equivalent to the old entryPointPath from the top level.
  • contentType - This describes the MIME type for the relativePath and is also mandatory.
  • profiles - An optional array of media profile URIs which describe the media profiles used by this entry point.

The TS26512_M5_ServiceAccessInformation.yaml OpenAPI YAML remove the old single mediaPlayerEntry and replaces it with a new entryPoints array. Each entry in the array is an object with 3 properties:

  • locator - This is mandatory and contains an absolute URL pointing to a path on the interface at reference point M2d where the media entry point can be found.
  • contentType - This describes the MIME type for the locator and is also mandatory.
  • profiles - An optional array of media profile URIs which describe the media profiles used by this entry point.

Changes to the 5GMS Application Function

  1. The verification of the ContentHostingConfiguration.entryPointPath needs to be changed to verify the ContentHostingConfiguration.distributionConfigurations[].entryPoint.relativePath for each ContentHostingConfiguration.distributionConfigurations[] entry where entryPoint has been defined.
  2. The creation of the ServiceAccessInformation object will remove the single mediaPlayerEntry and instead add an entry to the entryPoints array for every entry in ContentHostingConfiguration.distributionConfigurations[] where the entryPoint object is set:
    • locator = ContentHostingConfiguration.distributionConfigurations.baseURL + ContentHostingConfiguration.distributionConfigurations.entryPoint.relativePath
    • contentType = ContentHostingConfiguration.distributionConfigurations.entryPoint.contentType
    • profiles = ContentHostingConfiguration.distributionConfigurations.entryPoint.profiles

Related issues

This issues requires 5G-MAG/rt-common-shared#22 to be completed.
This is a prerequisite to #52 and 5G-MAG/rt-5gms-application-server#62.

@davidjwbbc davidjwbbc added the enhancement New feature or request label Mar 14, 2023
@rjb1000
Copy link
Contributor

rjb1000 commented Mar 14, 2023

The updated YAML files proposed for approval at SA#99 and needed for the implementation of this issue can be downloaded from a temporary branch on 3GPP Forge:

These need to be copied into https://github.com/5G-MAG/rt-common-shared/tree/main/5gms/5G_APIs-overrides.

(If approved at SA#99, they will eventually find their way onto the main REL-17 branch. At this point, the files can be deleted from https://github.com/5G-MAG/rt-common-shared/tree/main/5gms/5G_APIs-overrides. The temporary branch will, in any case, be deleted after the SA#99 meeting.)

@rjb1000
Copy link
Contributor

rjb1000 commented Mar 14, 2023

@davidjwbbc: Given that the M3 Application Server configuration API references ContentHostingConfiguration, which is modified in TS 26.512 V17.4.0, shouldn't we also bump the version number of the API in M3_ContentHostingProvisioning.yaml from 0.0.0 to 0.1.0?

@davidjwbbc
Copy link
Contributor Author

davidjwbbc commented Mar 14, 2023

The M3 YAML change will be handled in a rt-common-shared issue.

Update: Issue 5G-MAG/rt-common-shared#22 has been raised to change the OpenAPI YAML files as a prerequisite to this issue.

@devbbc
Copy link
Contributor

devbbc commented Mar 17, 2023

The AF can handle multiple media entry paths.

To test, the following contentHostingConfiguration with multiple distributionConfigurations.entryPoint was used:

 {
  "name": "Big Buck Bunny",
  "ingestConfiguration": {
    "pull": true,
    "protocol": "urn:3gpp:5gms:content-protocol:http-pull-ingest",
    "baseURL": "https://ftp.itec.aau.at/datasets/DASHDataset2014/BigBuckBunny/4sec/"
  },
  "distributionConfigurations": [
    {
      "entryPoint": {
        "locator": "BigBuckBunny_4s_onDemand_2014_05_09.mpd",
        "contentType": "application/dash+xml"
      }
    },
    {
        "entryPoint": {
          "locator": "BigBuckBunny_4s_onDemand_2014_05_10.mpd",
          "contentType": "application/dash+xml"
        }
      }

  ]
}

Provisioning of the contentHostingConfiguration with multiple entry points over M1

$ curl -H 'User-Agent: AF' H 'Content-Type: application/json' --data @example_ContentHostingConfiguration_multiple_entry_points.json -v 'http://127.0.0.23:7777/3gpp-m1/v2/provisioning-sessions/9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/content-hosting-configuration'
> POST /3gpp-m1/v2/provisioning-sessions/9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/content-hosting-configuration HTTP/1.1
> Host: 127.0.0.23:7777
> Accept: */*
> User-Agent: AF
> Content-Type: application/json
> Content-Length: 569
> 
< HTTP/1.1 201 Created
< Connection: Keep-Alive
< Content-Length: 790
< ETag: 44d4cc711d58e6fd5e71f527f2177cffcdd13ee37e7ac614267f764529730a6e
< Content-Type: application/json
< Location: /3gpp-m1/v2/provisioning-sessions/9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/content-hosting-configuration
< Server: 5GMSdAF-localhost/17 (info.title=M1_ContentProtocolsDiscovery; info.version=2.0.0) rt-5gms-application-function/1.2.0
< Cache-Control: max-age=63
< Last-Modified: Fri, 17 Mar 2023 17:39:22 GMT
< Date: Fri, 17 Mar 2023 17:39:22 GMT
< 
{
	"distributionConfigurations":	[{
			"baseURL":	"http://localhost/m4d/provisioning-session-9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/",
			"canonicalDomainName":	"localhost",
			"entryPoint":	{
				"locator":	"BigBuckBunny_4s_onDemand_2014_05_09.mpd",
				"contentType":	"application/dash+xml"
			}
		}, {
			"baseURL":	"http://localhost/m4d/provisioning-session-9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/",
			"canonicalDomainName":	"localhost",
			"entryPoint":	{
				"locator":	"BigBuckBunny_4s_onDemand_2014_05_10.mpd",
				"contentType":	"application/dash+xml"
			}
		}],
	"ingestConfiguration":	{
		"baseURL":	"https://ftp.itec.aau.at/datasets/DASHDataset2014/BigBuckBunny/4sec/",
		"protocol":	"urn:3gpp:5gms:content-protocol:http-pull-ingest",
		"pull":	true
	},
	"name":	"Big Buck Bunny"

}

M5 serviceAccessInformation

curl -H 'User-Agent: AF' v 'http://127.0.0.24:7777/3gpp-m5/v2/service-access-information/9d076d36-c4ea-41ed-afe5-b3f62a08eeb4'
> GET /3gpp-m5/v2/service-access-information/9d076d36-c4ea-41ed-afe5-b3f62a08eeb4 HTTP/1.1
> Host: 127.0.0.24:7777
> Accept: */*
> User-Agent: AF
> 
< HTTP/1.1 201 Created
< Connection: Keep-Alive
< Content-Length: 526
< Content-Type: application/json
< Server: 5GMSdAF-localhost/17 (info.title=M5_ServiceAccessInformation; info.version=2.2.0) rt-5gms-application-function/1.2.0
< Cache-Control: max-age=64
< Last-Modified: Fri, 17 Mar 2023 17:39:22 GMT
< ETag: ebd8a02a3d0702b260ef002494509580ed48f67173a06790531347a4b204175b
< Date: Fri, 17 Mar 2023 17:45:30 GMT
< 
{
	"provisioningSessionId":	"9d076d36-c4ea-41ed-afe5-b3f62a08eeb4",
	"provisioningSessionType":	"DOWNLINK",
	"streamingAccess":	{
		"entryPoints":	[{
				"locator":	"http://localhost/m4d/provisioning-session-9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/BigBuckBunny_4s_onDemand_2014_05_09.mpd",
				"contentType":	"application/dash+xml"
			}, {
				"locator":	"http://localhost/m4d/provisioning-session-9d076d36-c4ea-41ed-afe5-b3f62a08eeb4/BigBuckBunny_4s_onDemand_2014_05_10.mpd",
				"contentType":	"application/dash+xml"
			}]
	}
}

@rjb1000
Copy link
Contributor

rjb1000 commented Mar 17, 2023

Great job, @devbbc.

Do you have an example that includes the array of profiles?

@davidjwbbc
Copy link
Contributor Author

davidjwbbc commented Mar 20, 2023

@rjb1000, after talking through this change with @devbbc we've noticed an issue with the new YAML files. Both TS26512_ContentHostingProvisioning.yaml and TS26512_M5_ServiceAccessInformation.yaml define a MediaEntryPoint, and since the ServiceAccessInformation one is currently included last it overrides the other one in the generated model source code files. This can be seen above in the ContentHostingConfiguration as the "relativePath" field is actually called "locator" instead.

@devbbc and I have worked around this problem by renaming the two MediaEntryPoint structures in the yaml files.
In TS26512_M1_ContentHostingProvisioning.yaml we did a global search & replace of MediaEntryPoint to RelMediaEntryPoint, and in TS26512_M5_ServiceAccessInformation.yaml we did a global search & replace of MediaEntryPoint to AbsMediaEntryPoint. This gives the two structures distinct names and so no clash in the generated model.

@rjb1000
Copy link
Contributor

rjb1000 commented Mar 20, 2023

we've noticed an issue with the new YAML files.

Took me a while to understand the problem, but I understand now that it's a shortcoming of the OpenAPI Generator rather than a problem with the YAML.

Ideally, OpenAPI Generator would spit out files with properly scoped names. Renaming them manually to avoid the ambiguity seems like a reasonable workaround. To my mind, a more scalable naming convention would be something more like ContentHostingConfiguration_MediaEntryPoint_* and ServiceAccessInformation_MediaEntryPoint_*.

@rjb1000 rjb1000 removed their assignment Mar 20, 2023
@devbbc
Copy link
Contributor

devbbc commented Mar 20, 2023

With the above mentioned work around, the generated source files have two structures with distinct names. The AF is modified to handle this solution.

To test, the previously used contentHostingConfiguration with multiple distributionConfigurations.entryPoint with profiles was used:

{
  "name": "Big Buck Bunny",
  "ingestConfiguration": {
    "pull": true,
    "protocol": "urn:3gpp:5gms:content-protocol:http-pull-ingest",
    "baseURL": "https://ftp.itec.aau.at/datasets/DASHDataset2014/BigBuckBunny/4sec/"
  },
  "distributionConfigurations": [
    {
      "entryPoint": {
        "relativePath": "BigBuckBunny_4s_onDemand_2014_05_09.mpd",
        "contentType": "application/dash+xml",
        "profiles": ["urn:mpeg:dash:profile:isoff-on-demand:2011"]
      }
    },
    {
        "entryPoint": {
          "locator": "BigBuckBunny_4s_onDemand_2014_05_10.mpd",
          "contentType": "application/dash+xml"
        }
      }
        
  ]
}

Provisioning of the contentHostingConfiguration with multiple entry points over M1

$ curl -H 'User-Agent: AF' -H 'Content-Type: application/json' --data @example_ContentHostingConfiguration_multiple_entry_points.json -v 'http://127.0.0.23:7777/3gpp-m1/v2/provisioning-sessions/f51be474-c739-41ed-b0c2-3f95991f2bf7/content-hosting-configuration'
*   Trying 127.0.0.23:7777...
* TCP_NODELAY set
* Connected to 127.0.0.23 (127.0.0.23) port 7777 (#0)
> POST /3gpp-m1/v2/provisioning-sessions/f51be474-c739-41ed-b0c2-3f95991f2bf7/content-hosting-configuration HTTP/1.1
> Host: 127.0.0.23:7777
> Accept: */*
> User-Agent: AF
> Content-Type: application/json
> Content-Length: 639
> 
* upload completely sent off: 639 out of 639 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Connection: Keep-Alive
< Content-Length: 864
< Content-Type: application/json
< Location: /3gpp-m1/v2/provisioning-sessions/f51be474-c739-41ed-b0c2-3f95991f2bf7/content-hosting-configuration
< Server: 5GMSdAF-af.localdomain/17 (info.title=M1_ContentHostingProvisioning; info.version=2.2.0) rt-5gms-application-function/1.2.0
< Cache-Control: max-age=63
< Last-Modified: Mon, 20 Mar 2023 16:12:26 GMT
< ETag: 8ab846c32154e90b9a123fd8616c6aff5cb07fd0d662e8536aad9161f8b2d8bf
< Date: Mon, 20 Mar 2023 16:12:26 GMT
< 
{
	"distributionConfigurations":	[{
			"baseURL":	"http://localhost/m4d/provisioning-session-f51be474-c739-41ed-b0c2-3f95991f2bf7/",
			"canonicalDomainName":	"localhost",
			"entryPoint":	{
				"contentType":	"application/dash+xml",
				"profiles":	["urn:mpeg:dash:profile:isoff-on-demand:2011"],
				"relativePath":	"BigBuckBunny_4s_onDemand_2014_05_09.mpd"
			}
		}, {
			"baseURL":	"http://localhost/m4d/provisioning-session-f51be474-c739-41ed-b0c2-3f95991f2bf7/",
			"canonicalDomainName":	"localhost",
			"entryPoint":	{
				"contentType":	"application/dash+xml",
				"relativePath":	"BigBuckBunny_4s_onDemand_2014_05_10.mpd"
			}
		}],
	"ingestConfiguration":	{
		"baseURL":	"https://ftp.itec.aau.at/datasets/DASHDataset2014/BigBuckBunny/4sec/",
		"protocol":	"urn:3gpp:5gms:content-protocol:http-pull-ingest",
		"pull":	true
	},
	"name":	"Big Buck Bunny"
* Connection #0 to host 127.0.0.23 left intact
}

The provisioned contentHostingConfiguration has multiple entryPoint with relativePath to the resource. In addition one of the entryPoint has a profiles URI associated.

M5 serviceAccessInformation

$ curl -H 'User-Agent: AF' -v 'http://127.0.0.24:7777/3gpp-m5/v2/service-access-information/f51be474-c739-41ed-b0c2-3f95991f2bf7'
*   Trying 127.0.0.24:7777...
* TCP_NODELAY set
* Connected to 127.0.0.24 (127.0.0.24) port 7777 (#0)
> GET /3gpp-m5/v2/service-access-information/f51be474-c739-41ed-b0c2-3f95991f2bf7 HTTP/1.1
> Host: 127.0.0.24:7777
> Accept: */*
> User-Agent: AF
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 201 Created
< Connection: Keep-Alive
< Content-Length: 590
< Content-Type: application/json
< Server: 5GMSdAF-af.localdomain/17 (info.title=M5_ServiceAccessInformation; info.version=2.2.0) rt-5gms-application-function/1.2.0
< Cache-Control: max-age=64
< Last-Modified: Mon, 20 Mar 2023 16:12:26 GMT
< ETag: 7a6918853afa3ef3988b29ae82e3acbd2ffe357d8993dec891aafe68f7173f30
< Date: Mon, 20 Mar 2023 16:13:16 GMT
< 
{
	"provisioningSessionId":	"f51be474-c739-41ed-b0c2-3f95991f2bf7",
	"provisioningSessionType":	"DOWNLINK",
	"streamingAccess":	{
		"entryPoints":	[{
				"locator":	"http://localhost/m4d/provisioning-session-f51be474-c739-41ed-b0c2-3f95991f2bf7/BigBuckBunny_4s_onDemand_2014_05_09.mpd",
				"contentType":	"application/dash+xml",
				"profiles":	["urn:mpeg:dash:profile:isoff-on-demand:2011"]
			}, {
				"locator":	"http://localhost/m4d/provisioning-session-f51be474-c739-41ed-b0c2-3f95991f2bf7/BigBuckBunny_4s_onDemand_2014_05_10.mpd",
				"contentType":	"application/dash+xml"
			}]
	}
* Connection #0 to host 127.0.0.24 left intact
}

The serviceAccessInformation obtained over M5 has entryPoints with the locator, which is an absolute URL. This absolute URL is formed by prefixing baseUrl to relativePath.

@devbbc devbbc assigned davidjwbbc and unassigned devbbc Mar 20, 2023
@devbbc devbbc moved this from In Progress to Ready To Review in 5GMS: TS 26.512 V17.4.0 uplift Mar 20, 2023
@rjb1000
Copy link
Contributor

rjb1000 commented Mar 21, 2023

Ideally, OpenAPI Generator would spit out files with properly scoped names. Renaming them manually to avoid the ambiguity seems like a reasonable workaround. To my mind, a more scalable naming convention would be something more like ContentHostingConfiguration_MediaEntryPoint_* and ServiceAccessInformation_MediaEntryPoint_*.

To clarify the workaround @devbbc has implemented: he is renaming the MediaEntryPoint data structures inside the two YAML files with unique name prefixes so as to produce uniquely named C data structures when OpenAPI Generator runs over the YAML.

After discussion with @davidjwbbc this morning, we agreed this as a temporary workaround, but with the following alternative names that are more in keeping with existing conventions in TS 26.512:

  • M1MediaEntryPoint.
  • M5MediaEntryPoint.

@davidjwbbc: Please raise a new issue against TS 26.512 so that we can target a permanent fix in V17.5.0.

@rjb1000 rjb1000 changed the title Uplift to TS 26.512 v17.4.0: AF to handle multiple media entry paths Uplift to TS 26.512 v17.4.0: AF to handle multiple media entry points Mar 22, 2023
@rjb1000
Copy link
Contributor

rjb1000 commented Mar 22, 2023

Note that the [M1]MediaEntryPoint.profiles array is declared with minItems: 1 per table 7.6.3.1-1 in TS 26.512.

@davidjwbbc: Please can you check that the M1 Content Hosting Provisioning API is throwing a suitable syntax error when an empty array is supplied?

@rjb1000
Copy link
Contributor

rjb1000 commented Mar 31, 2023

After discussion with @davidjwbbc this morning, we agreed this as a temporary workaround, but with the following alternative names that are more in keeping with existing conventions in TS 26.512:

  • M1MediaEntryPoint.
  • M5MediaEntryPoint.

@davidjwbbc: Please raise a new issue against TS 26.512 so that we can target a permanent fix in V17.5.0.

I created this new issue myself in the end: 5G-MAG/Standards#59.

@davidjwbbc
Copy link
Contributor Author

In comment 1477775100 @rjb1000 wrote:

After discussion with @davidjwbbc this morning, we agreed this as a temporary workaround, but with the following alternative names that are more in keeping with existing conventions in TS 26.512:

  • M1MediaEntryPoint.
  • M5MediaEntryPoint.

This change has been made and tests so far would indicate that the change is working correctly.

In comment 1480178738 @rjb1000 wrote:

Note that the [M1]MediaEntryPoint.profiles array is declared with minItems: 1 per table 7.6.3.1-1 in TS 26.512.

@davidjwbbc: Please can you check that the M1 Content Hosting Provisioning API is throwing a suitable syntax error when an empty array is supplied?

I've added an extra check to the validation to ensure that if the array is present it contains at least one item. This still needs to be tested properly.

@davidjwbbc davidjwbbc linked a pull request Apr 6, 2023 that will close this issue
@davidjwbbc davidjwbbc moved this from Ready To Review to Done in 5GMS: TS 26.512 V17.4.0 uplift Apr 6, 2023
@rjb1000 rjb1000 moved this from Backlog to Done in 5GMS: M1d Provisioning Apr 6, 2023
@davidjwbbc
Copy link
Contributor Author

Tested & merged, closing this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

3 participants