-
Notifications
You must be signed in to change notification settings - Fork 29
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
Api deprecation changes #208
Conversation
oneview/config.go
Outdated
c.OVAPIVersion = apiver.CurrentVersion | ||
} else if c.OVAPIVersion < apiver.MinimumVersion { | ||
//Throw error if provided api version is not supported | ||
return errors.New(fmt.Sprintf("The minimum api version supported is %d", apiver.MinimumVersion)) |
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.
should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
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.
Fixed
oneview/config.go
Outdated
//If no api version is provided use the current version to create client | ||
if c.OVAPIVersion == 0 { | ||
if err != nil { | ||
return errors.New(fmt.Sprintf("Could not fetch the appliance %s api version", c.OVEndpoint)) |
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.
should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...)
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.
Fixed
@@ -53,7 +53,7 @@ func Provider() terraform.ResourceProvider { | |||
"ov_apiversion": { | |||
Type: schema.TypeInt, | |||
Optional: true, | |||
DefaultFunc: schema.EnvDefaultFunc("ONEVIEW_OV_API_VERSION", 200), | |||
DefaultFunc: schema.EnvDefaultFunc("ONEVIEW_OV_API_VERSION", 0), |
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.
what does this mean..?
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.
Default api version in the schema if the value is not found. Keeping it 0, we are controlling what to for set the api version
Description
[Api deprecation changes]
Issues Resolved
[]
Check List