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

PLT-1259: SDK Cut over with 4.3 changes #114

Closed
wants to merge 5 commits into from
Closed

PLT-1259: SDK Cut over with 4.3 changes #114

wants to merge 5 commits into from

Conversation

SivaanandM
Copy link
Contributor

No description provided.

@SivaanandM SivaanandM requested a review from TylerGillson July 9, 2024 04:43
client/cluster_edge.go.defer Outdated Show resolved Hide resolved
client/cluster.go Outdated Show resolved Hide resolved
@@ -202,6 +207,11 @@ func (h *V1Client) baseTransport() *transport.Runtime {
return httpTransport
}

func (h *V1Client) SetProjectContextForResource() *V1Client {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be accomplished by calling WithScopeProject. Please remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required because in Terraform, we have the provision to set resource-level context.

During provider initialization, we use project scope or tenant scope based on the user settings during initialization. Later on, the user can also set the context at the resource level (if user have right access).

For example, a user can initialize the client with project scope and then switch to create a resource at the tenant level as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand that, but there's already a way that you can handle the requirement without introducing a new method on the V1Client.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please ping me and we can discuss.

@@ -234,3 +244,10 @@ func (h *V1Client) ValidateTenantAdmin() error {
}
return nil
}

func ContextWithProject(c context.Context, projectUid string) context.Context {
Copy link
Collaborator

Choose a reason for hiding this comment

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

See above comment. This function should not be required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is required because in Terraform, we have the provision to set resource-level context.

During provider initialization, we use project scope or tenant scope based on the user settings during initialization. Later on, the user can also set the context at the resource level (if user have right access).

For example, a user can initialize the client with project scope and then switch to create a resource at the tenant level as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above. Let's discuss.

client/node_actions.go Outdated Show resolved Hide resolved
client/node_actions.go Outdated Show resolved Hide resolved
@SivaanandM SivaanandM closed this Jul 26, 2024
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