1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Update aws libs and remove waiter (#276)

* update r53 library. Remove waiter code

* live update provider request section

* remove debug
This commit is contained in:
Craig Peterson
2017-11-27 10:22:08 -05:00
committed by GitHub
parent 2d51cd57ed
commit ccf28349ce
88 changed files with 20641 additions and 5289 deletions

View File

@@ -13,7 +13,6 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/private/waiter"
r53 "github.com/aws/aws-sdk-go/service/route53"
r53d "github.com/aws/aws-sdk-go/service/route53domains"
"github.com/pkg/errors"
@@ -297,12 +296,8 @@ func (r *route53Provider) GetRegistrarCorrections(dc *models.DomainConfig) ([]*m
{
Msg: fmt.Sprintf("Update nameservers %s -> %s", actual, expected),
F: func() error {
operationId, err := r.updateRegistrarNameservers(dc.Name, expectedSet)
if err != nil {
return err
}
return r.waitUntilNameserversUpdate(operationId)
_, err := r.updateRegistrarNameservers(dc.Name, expectedSet)
return err
},
},
}, nil
@@ -391,31 +386,3 @@ func (r *route53Provider) EnsureDomainExists(domain string) error {
return err
}
func (r *route53Provider) waitUntilNameserversUpdate(operationId *string) error {
fmt.Print("Waiting for registrar update to complete...")
waiterCfg := waiter.Config{
Operation: "GetOperationDetail",
Delay: 30,
MaxAttempts: 10,
Acceptors: []waiter.WaitAcceptor{
{
State: "success",
Matcher: "path",
Argument: "Status",
Expected: "SUCCESSFUL",
},
},
}
w := waiter.Waiter{
Client: r.registrar,
Input: &r53d.GetOperationDetailInput{
OperationId: operationId,
},
Config: waiterCfg,
}
return w.Wait()
}