Skip to content

Conversation

@sureshmarikkannu
Copy link

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

onf-bot commented Oct 13, 2023

test this please

@gab-arrobo
Copy link
Contributor

retest this please

RUN cat $ADAPTER_ROOT/go.mod

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

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?

/* 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))

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?

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
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;\

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
Contributor

retest this please

1 similar comment
@gab-arrobo
Copy link
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