Skip to content
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

Accountz-3.1 #3391

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Accountz-3.1 #3391

wants to merge 7 commits into from

Conversation

dipchauh
Copy link
Contributor

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
@dipchauh dipchauh requested review from a team as code owners August 21, 2024 16:27
@OpenConfigBot
Copy link

OpenConfigBot commented Aug 21, 2024

Pull Request Functional Test Report for #3391 / b7b1fd4

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
ACCTZ-3.1: Record Subscribe Non-gRPC
Cisco 8000E status
ACCTZ-3.1: Record Subscribe Non-gRPC
Cisco XRd status
ACCTZ-3.1: Record Subscribe Non-gRPC
Juniper ncPTX status
ACCTZ-3.1: Record Subscribe Non-gRPC
Nokia SR Linux status
ACCTZ-3.1: Record Subscribe Non-gRPC
Openconfig Lemming status
ACCTZ-3.1: Record Subscribe Non-gRPC

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
ACCTZ-3.1: Record Subscribe Non-gRPC
Cisco 8808 status
ACCTZ-3.1: Record Subscribe Non-gRPC
Juniper PTX10008 status
ACCTZ-3.1: Record Subscribe Non-gRPC
Nokia 7250 IXR-10e status
ACCTZ-3.1: Record Subscribe Non-gRPC

Help

@coveralls
Copy link

coveralls commented Aug 21, 2024

Pull Request Test Coverage Report for Build 11132641175

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.268%

Totals Coverage Status
Change from base Build 11130047378: 0.0%
Covered Lines: 1983
Relevant Lines: 3588

💛 - Coveralls

@dipchauh dipchauh mentioned this pull request Aug 21, 2024
@dipchauh dipchauh added nokia-pr new-requirement-pr The PR introduces a new test scenario/requirement. labels Aug 21, 2024
…tz3dot1

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
// so... we get what we can get.
addr := getDutAddr(t, dut)

// suppose ssh could be not 22 in some cases but don't think this is exposed by introspect
Copy link
Contributor

Choose a reason for hiding this comment

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

Suppose

Copy link
Contributor

Choose a reason for hiding this comment

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

and a period at the end of the sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed comments

setupUsers(t, dut)

// https://github.com/openconfig/featureprofiles/issues/2637
// basically, just waiting to see what the "best"/"preferred" way is to get the v4/v6 of the
Copy link
Contributor

Choose a reason for hiding this comment

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

All comments should be in the form of complete and properly punctuated sentences.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed comments

…tz3dot1

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
// See the License for the specific language governing permissions and
// limitations under the License.

package record_subscribe_non_grpc_test
Copy link
Contributor

Choose a reason for hiding this comment

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

some of the github action stuff (on other PRs in the gnsi / featureprofile tree) are making noise about 'do not use underscores in golang package names' that might happen here, you might consider getting ahead of that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed package name

var gRPCClientAddr net.Addr

// Record represents the structure for an acctz record.
type Record struct {
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 I asked about this in a different PR, but why do this? why not just use a []*pb. ?

Using this new struct means you can't easily cmp.Diff() the expeted content and the received content for a proto... Something like:

got := fooReturnsPB()
if diff := cmp.Diff(got, want, cmpoptions.ProtoTransform()); diff != "" {
  t.Errorf("got/want mismatch, diff: %v", diff)
}

SHOULD do a comparison of the proto bits you got vs what you wanted... and save what looks like ~100 lines of code in the tests where you pull apart all of the protos and records (and 50+ lines where you fill record struct content...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed record struct & using pb directly for cmp.Diff()

…tz3dot1

"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
"This code is a Contribution to the OpenConfig Feature Profiles project ("Work") made under the Google Software Grant and Corporate Contributor License Agreement ("CLA") and governed by the Apache License 2.0. No other rights or licenses in or to any of Nokia's intellectual property are granted for any other purpose. This code is provided on an "as is" basis without any warranties of any kind."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-requirement-pr The PR introduces a new test scenario/requirement. nokia-pr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants