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

Add generic_config to node template resource #15

Closed

Conversation

yamamoto-febc
Copy link

This is re-post of #75.

This PR was still reviewing, but that repo had transfered and archived, so I re-posted here.

@yamamoto-febc
Copy link
Author

The following points were pointed out in the last review.

Where are MarshalJSON/UnmarshalJSON used?

I think there are used when communicate with Rancher APIs.

https://github.com/rancher/norman/blob/master/clientbase/ops.go

Defination of struct or fields

I think struct NodeTemplate and CloudCredential are used as parameter to Rancher APIs.
genericConfig and genericCredentialConfig are not sent directly to the Rancher API, they are converted to the appropriate form by MarshalJSON/UnmarshalJSON, so I think that it is unnecessary to make them exported and json/yaml tag.

NodeDriver's ID and Name

I think Rancher has two types of NodeDriver.

  • 1: builtin: Built-in driver has the same value for both ID/Name(e.g.: amazonec2).
  • 2: custom: For other drivers, ID is generated by Rancher, and Name is calculated from the docker-machine driver name.

And this PR supports both types of NodeDriver.
So I think that these points are unnecessary.

dstockton added a commit to dstockton/terraform-provider-rancher2 that referenced this pull request Nov 14, 2019
Work got done on `master` branch instead of `confluent-master` :-(
@rawmind0 rawmind0 closed this Feb 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants