Skip to content

Add O-RAN CCC service model - #392

Open
gab-arrobo wants to merge 7 commits into
onosproject:masterfrom
gab-arrobo:ccc-service-model
Open

Add O-RAN CCC service model#392
gab-arrobo wants to merge 7 commits into
onosproject:masterfrom
gab-arrobo:ccc-service-model

Conversation

@gab-arrobo

Copy link
Copy Markdown
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

onf-bot commented Oct 10, 2023

Copy link
Copy Markdown
Contributor

test this please

3 similar comments
@onf-bot

onf-bot commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

test this please

@onf-bot

onf-bot commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

test this please

@onf-bot

onf-bot commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

test this please

@gab-arrobo

Copy link
Copy Markdown
Contributor Author

test this please

@woojoong88

Copy link
Copy Markdown
Contributor

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

@gab-arrobo

Copy link
Copy Markdown
Contributor Author

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

Thanks Woojoong!

@eroshiva eroshiva left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread servicemodels/e2sm_ccc/servicemodel/servicemodel.go

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread servicemodels/e2sm_ccc/pdubuilder/pdubuilder.go Outdated
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

@eroshiva eroshiva left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 <gabriel.arrobo@intel.com>
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