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

Add O-RAN CCC service model #392

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

gab-arrobo
Copy link
Contributor

Note: O-RAN provides this service model in a JSON format but the ONF tools are automated to "create" GO structs from ASN files. So, an ASN file was created based on the JSON file, the O-RAN CCC specification and the 3GPP specs.

@gab-arrobo gab-arrobo marked this pull request as ready for review October 1, 2023 03:34
@onf-bot
Copy link
Contributor

onf-bot commented Oct 10, 2023

test this please

3 similar comments
@onf-bot
Copy link
Contributor

onf-bot commented Oct 12, 2023

test this please

@onf-bot
Copy link
Contributor

onf-bot commented Oct 12, 2023

test this please

@onf-bot
Copy link
Contributor

onf-bot commented Oct 12, 2023

test this please

@gab-arrobo
Copy link
Contributor Author

test this please

@woojoong88
Copy link
Contributor

Will review it tomorrow - after coming back from holiday off.

@gab-arrobo
Copy link
Contributor Author

Will review it tomorrow - after coming back from holiday off.

Thanks Woojoong!

Copy link
Contributor

@eroshiva eroshiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add unit tests to all top-level PDUs and exclude .asn1 files from the PR

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be excluded from the PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will exclude it. Can you please explain why ASN files are excluded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's an intellectual property of O-RAN. It is not related to ONF.
We've been following this guideline from the beginning of the project and this is the reason why all others SMs do not contain corresponding ASN1 files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Understood. However, I would like to indicate that I created the e2sm_ccc.asn1 files because the one from O-RAN is given in JSON format and I created the ASN file to use the ONF tools for the creation of proto/go files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same - this file should be excluded from the PR

servicemodels/e2sm_ccc/pdubuilder/pdubuilder.go Outdated Show resolved Hide resolved
gab-arrobo and others added 3 commits December 28, 2023 10:13
* added GHA for ccc service model
* Splitted the pdubuilder into top level messeges and add unit tests
Copy link
Contributor

@eroshiva eroshiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pushing it further. Nice job! Few adjustments left and this PR is good to go!

Comment on lines +17 to +19
result, err := CreateE2SmCCcRIcactionDefinition(ricStyleType, actionDefinitionFormat)
assert.NoError(t, err)
assert.NotNil(t, result)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice, if the UT would consist of:

  • creating a messahe with PDU builder
  • validate the message with .Validate();
  • encode the message with recently implemented (in this PR) encoder;
  • decode the message;
  • compare both encoded and decoded messages and make sure they're equal.
    This is a common structure of all unit tests in this repository. Please, align with it.

This comment applies elsewhere to all top-level PDUs.

assert.NotNil(t, result)
}

func TestCreateListOfRanconfigurationStructuresForAdf(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For non top-level PDUs, please do the .Validate() check in the UT

"github.com/stretchr/testify/assert"
)

func TestCreateE2SmCCcRIcactionDefinition(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func TestCreateE2SmCCcRIcactionDefinition(t *testing.T) {
func TestCreateE2SmCCCRicactionDefinition(t *testing.T) {

Comment on lines +16 to +17
msg.RicStyleType = ricStyleType
msg.ActionDefinitionFormat = actionDefinitionFormat
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't there generated SetXXX() functions? There are, please use them

)

func CreateE2SmCCcRIcactionDefinition(ricStyleType *e2smcommoniesv1.RicStyleType, actionDefinitionFormat *e2smcccv1.ActionDefinitionFormat) (*e2smcccv1.E2SmCCcRIcactionDefinition, error) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the line - applies elsewhere

* Added GHA for ccc service model

* Split the pdubuilder into top level messages and add unit tests

* Added encoder and decoder test

* Apply suggestions from code review

---------

Co-authored-by: gab-arrobo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants