Skip to content

[WIP] Plugin framework provider implementation #1603

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

aruntony005
Copy link
Collaborator

No description provided.

…e other resources working using plugin sdk

Signed-off-by: Arun Tony <[email protected]>
…raform plugin framework and disabling the old sdk implementation

Signed-off-by: Arun Tony <[email protected]>
func initFrameworkCommonConfig(ctx context.Context, config nsxtProviderModel, response *provider.ConfigureResponse) commonProviderConfig {
remoteAuth := getBoolFromConfigOrEnv(config.RemoteAuth, "NSXT_REMOTE_AUTH", false, response.Diagnostics)
toleratePartialSuccess := getBoolFromConfigOrEnv(config.ToleratePartialSuccess, "NSXT_TOLERATE_PARTIAL_SUCCESS", false, response.Diagnostics)
maxRetries := int(getInt64FromConfigOrEnv(config.MaxRetries, "NSXT_MAX_RETRIES", 4, response.Diagnostics))

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
remoteAuth := getBoolFromConfigOrEnv(config.RemoteAuth, "NSXT_REMOTE_AUTH", false, response.Diagnostics)
toleratePartialSuccess := getBoolFromConfigOrEnv(config.ToleratePartialSuccess, "NSXT_TOLERATE_PARTIAL_SUCCESS", false, response.Diagnostics)
maxRetries := int(getInt64FromConfigOrEnv(config.MaxRetries, "NSXT_MAX_RETRIES", 4, response.Diagnostics))
retryMinDelay := int(getInt64FromConfigOrEnv(config.RetryMinDelay, "NSXT_RETRY_MIN_DELAY", 0, response.Diagnostics))

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
toleratePartialSuccess := getBoolFromConfigOrEnv(config.ToleratePartialSuccess, "NSXT_TOLERATE_PARTIAL_SUCCESS", false, response.Diagnostics)
maxRetries := int(getInt64FromConfigOrEnv(config.MaxRetries, "NSXT_MAX_RETRIES", 4, response.Diagnostics))
retryMinDelay := int(getInt64FromConfigOrEnv(config.RetryMinDelay, "NSXT_RETRY_MIN_DELAY", 0, response.Diagnostics))
retryMaxDelay := int(getInt64FromConfigOrEnv(config.RetryMaxDelay, "NSXT_RETRY_MAX_DELAY", 500, response.Diagnostics))

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
@tenthirtyam tenthirtyam marked this pull request as draft April 10, 2025 18:29
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.

1 participant