Enhanced adapter to push policyratios to xApp - #184
Conversation
Also modified the POST method into PUT method for pushing information to the endpoints Signed-off-by: Marikkannu, Suresh <suresh.marikkannu@intel.com>
|
test this please |
|
retest this please |
| RUN cat $ADAPTER_ROOT/go.mod | ||
|
|
||
| RUN cd $ADAPTER_ROOT && GO111MODULE=on go build -o /go/bin/sdcore-adapter \ | ||
| -ldflags \ |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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;\ |
There was a problem hiding this comment.
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
| go mod tidy;\ |
There was a problem hiding this comment.
In this case, since the go.mod is being modified, it think it will be necessary to run go mod tidy.
|
retest this please |
1 similar comment
|
retest this please |
Also modified the POST method into PUT method (which is the preferred method by most endpoints now) for
pushing information to the endpoints.