You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When provisioning a VXC circuit for Azure we regularly encounter timeouts requiring us to re-run our automation before it is completely provisioned. We would like the ability to specify a longer timeout than the hard-coded 15 minutes.
I'd propose adding a second function that accepts a context.Context that can be configured by the caller for an arbitrary timeout based on the caller's needs. I've also added a pollFrequency to specify how frequently it queries for the VxcDetails, currently hard-coded to 30 seconds.
func (v *VXC) WaitForVXCUpdatedCtx(
ctx context.Context, pollFrequency time.Duration, id string, name string, rateLimit int, aEndVLAN int, bEndVLAN int,
) (bool, error) { ... }
The existing functions can be modified to simply create a context with a 15 minute timeout and call the new functions, preserving the API and current behavior for existing users.
// WaitForVXCProvisioning waits up to 15 minutes for the VXC to reach the "LIVE" status.
// See WaitForVXCProvisioningCtx
func (v *VXC) WaitForVXCProvisioning(vxcId string) (bool, error) {
ctx, cancelFunc := context.WithTimeout(context.Background(), 15*time.Minute)
defer cancelFunc()
return v.WaitForVXCProvisioningCtx(ctx, 30*time.Second, vxcId)
}
PR to follow.
A corresponding change will be proposed for the terraform-provider-megaport project to call the new APIs.
The text was updated successfully, but these errors were encountered:
When provisioning a VXC circuit for Azure we regularly encounter timeouts requiring us to re-run our automation before it is completely provisioned. We would like the ability to specify a longer timeout than the hard-coded 15 minutes.
I'd propose adding a second function that accepts a
context.Context
that can be configured by the caller for an arbitrary timeout based on the caller's needs. I've also added apollFrequency
to specify how frequently it queries for the VxcDetails, currently hard-coded to 30 seconds.and
The existing functions can be modified to simply create a context with a 15 minute timeout and call the new functions, preserving the API and current behavior for existing users.
PR to follow.
A corresponding change will be proposed for the
terraform-provider-megaport
project to call the new APIs.The text was updated successfully, but these errors were encountered: