Skip to content

Enhanced adapter to push policyratios to xApp - #184

Open
sureshmarikkannu wants to merge 1 commit into
onosproject:masterfrom
sureshmarikkannu:roc_xapp
Open

Enhanced adapter to push policyratios to xApp#184
sureshmarikkannu wants to merge 1 commit into
onosproject:masterfrom
sureshmarikkannu:roc_xapp

Conversation

@sureshmarikkannu

Copy link
Copy Markdown

Also modified the POST method into PUT method (which is the preferred method by most endpoints now) for
pushing information to the endpoints.

Also modified the POST method into PUT method for
pushing information to the endpoints

Signed-off-by: Marikkannu, Suresh <suresh.marikkannu@intel.com>
@onf-bot

onf-bot commented Oct 13, 2023

Copy link
Copy Markdown

test this please

@gab-arrobo

Copy link
Copy Markdown
Contributor

retest this please

Comment thread Dockerfile
RUN cat $ADAPTER_ROOT/go.mod

RUN cd $ADAPTER_ROOT && GO111MODULE=on go build -o /go/bin/sdcore-adapter \
-ldflags \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't know if all these should be removed - maybe there is some way to fix it?

Comment thread pkg/synchronizer/post.go
/* In the future, PUT will be the correct operation
resp, err := httpPut(client, endpoint, "application/json", data)
*/
req, err := http.NewRequest(http.MethodPut, endpoint, bytes.NewBuffer(data))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks like it is dependent on some version of SD-CORE - does this break backward compatibility?

Comment thread Dockerfile
echo "replace github.com/onosproject/aether-models/models/aether-4.x => ./local-aether-models/aether-4.x" >> $ADAPTER_ROOT/go.mod; \
echo "replace github.com/onosproject/aether-models/models/aether-2.0.x => ./local-aether-models/aether-2.0.x" >> $ADAPTER_ROOT/go.mod; \
echo "replace github.com/onosproject/aether-models/models/aether-2.1.x/v2 v2.1.13 => ./local-aether-models/aether-2.1.x" >> $ADAPTER_ROOT/go.mod; \
go mod tidy;\

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.

I think we should remove this line because doing this inside Dockerfile bypasses the need to doing it in the source code. The idea is to have what Docker uses inline with what the source code has. For example, as you can see in this PR, go mod tidy is executed inside the Dockerfile which wrongly hides the need to execute go mod tidy in the source code

Suggested change
go mod tidy;\

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In this case, since the go.mod is being modified, it think it will be necessary to run go mod tidy.

@gab-arrobo

Copy link
Copy Markdown
Contributor

retest this please

1 similar comment
@gab-arrobo

Copy link
Copy Markdown
Contributor

retest this please

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.

4 participants