-
Notifications
You must be signed in to change notification settings - Fork 11
Enhanced adapter to push policyratios to xApp #184
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
base: master
Are you sure you want to change the base?
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.
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)) |
There was a problem hiding this comment.
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;\ |
There was a problem hiding this comment.
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
| go mod tidy;\ |
There was a problem hiding this comment.
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.
|
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.