-
Notifications
You must be signed in to change notification settings - Fork 30
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
base: master
Are you sure you want to change the base?
Conversation
|
||
} | ||
file, _ := json.MarshalIndent(elist, "", " ") | ||
file_name := fmt.Sprintf("test_check_%d.json", 5) |
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.
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()) |
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.
var initialScopeUri should be initialScopeURI
d.SetId("") | ||
return nil | ||
} else { |
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.
if block ends with a return statement, so drop this else and outdent its block
if err != nil { | ||
d.SetId("") | ||
return nil | ||
} else { |
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.
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)) |
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.
The setting part will not set the count and next page uri?
d.SetId(name) | ||
return nil | ||
|
||
} else { |
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.
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 { |
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.
exported function EthernetSchema should have comment or be unexported
@@ -0,0 +1,99 @@ | |||
package common_schema |
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.
don't use an underscore in package name
Description
Support GetAll for ethernet resource
Issues Resolved
Check List