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

Support GetAll for ethernet resource #313

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

Conversation

yuvirani
Copy link
Contributor

Description

Support GetAll for ethernet resource

Issues Resolved

Check List

  • New functionality includes testing.
    • All tests pass for go 1.11 + gofmt checks.
  • New functionality has been documented in the README if applicable.
    • New functionality has been thoroughly documented in the examples (please include helpful comments).
    • New endpoints supported are updated in the endpoints-support.md file.
  • Changes are documented in the CHANGELOG.


}
file, _ := json.MarshalIndent(elist, "", " ")
file_name := fmt.Sprintf("test_check_%d.json", 5)

Choose a reason for hiding this comment

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

don't use underscores in Go names; var file_name should be fileName


initialScopeUris := make([]utils.Nstring, len(eNetList.Members[i].InitialScopeUris))
for _, scope := range eNetList.Members[i].InitialScopeUris {
initialScopeUri := utils.Nstring(scope.String())

Choose a reason for hiding this comment

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

var initialScopeUri should be initialScopeURI

d.SetId("")
return nil
} else {

Choose a reason for hiding this comment

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

if block ends with a return statement, so drop this else and outdent its block

if err != nil {
d.SetId("")
return nil
} else {

Choose a reason for hiding this comment

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

if block ends with a return statement, so drop this else and outdent its block

file, _ := json.MarshalIndent(members, "", " ")
_ = ioutil.WriteFile("test.json", file, 0644)

d.SetId(string(file))
Copy link
Collaborator

@nabhajit-ray nabhajit-ray Jun 4, 2021

Choose a reason for hiding this comment

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

The setting part will not set the count and next page uri?

d.SetId(name)
return nil

} else {

Choose a reason for hiding this comment

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

if block ends with a return statement, so drop this else and outdent its block

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func EthernetSchema() *schema.Resource {

Choose a reason for hiding this comment

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

exported function EthernetSchema should have comment or be unexported

@@ -0,0 +1,99 @@
package common_schema

Choose a reason for hiding this comment

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

don't use an underscore in package name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants