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

WIP: Adding network CRUD support #24

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

Conversation

AliceIW
Copy link

@AliceIW AliceIW commented May 1, 2020

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Release note for CHANGELOG:

FEATURES:
* **New Data Source:** proxmox_virtual_environment_network
* **New Resource:** proxmox_virtual_environment_network

I opened the PR simply to inform other maintainer about the feature I'm currently adding to avoid duplicate work.

@AliceIW
Copy link
Author

AliceIW commented May 1, 2020

I'm fairly new to go so if anybody see something wrong, please comment :D

@danitso-dp
Copy link
Collaborator

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.

Copy link
Collaborator

@danitso-dp danitso-dp left a 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 {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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.

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.

2 participants