-
Notifications
You must be signed in to change notification settings - Fork 32
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
WIP: Adding network CRUD support #24
base: master
Are you sure you want to change the base?
Conversation
I'm fairly new to go so if anybody see something wrong, please comment :D |
Hi @AliceIW It's always great to see more contributions :) I'll take a look at it this weekend and provide some feedback. PS: Sorry for the late reply. |
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.
@AliceIW Great work. I have provided a few suggestions regarding function scoping.
To be able to merge this, would you be able to also do the documentation? Simply add the data source and resource documentation in the proper docs subfolder, and provide information about supported arguments and attributes. You can see the documentation here:
http://danitso.com/terraform-provider-proxmox/
You are also welcome to add these changes to CHANGELOG.md
to avoid having to do it before the next release.
return nil | ||
} | ||
|
||
func getBody(d *schema.ResourceData, isUpdate bool) *proxmox.VirtualEnvironmentNetworkInterfaceCreateRequestBody { |
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.
Consider renaming to resourceVirtualEnvironmentNetworkGetBody
to prevent name collision across resources.
return body | ||
} | ||
|
||
func assignIfStringExists(d *schema.ResourceData, p **string, key 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.
Consider renaming to resourceVirtualEnvironmentNetworkAssignIfStringExists
or move it to utils.go
.
*p = &stringVal | ||
} | ||
|
||
func assignIfBoolExists(d *schema.ResourceData, p **bool, key 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.
Consider renaming to resourceVirtualEnvironmentNetworkAssignIfBoolExists
or move it to utils.go
.
*p = &stringVal | ||
} | ||
|
||
func assignIfIntExists(d *schema.ResourceData, p **int, key 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.
Consider renaming to resourceVirtualEnvironmentNetworkAssignIfIntExists
or move it to utils.go
.
Community Note
Release note for CHANGELOG:
I opened the PR simply to inform other maintainer about the feature I'm currently adding to avoid duplicate work.