altera soa-edit-api para INCEPTION-INCREMENT
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const soaEditAPIIncrease = "INCREASE"
|
||||
const soaEditAPIInceptionIncrement = "INCEPTION-INCREMENT"
|
||||
|
||||
type HTTPClient interface {
|
||||
Do(*http.Request) (*http.Response, error)
|
||||
@@ -97,7 +97,7 @@ func (c *Client) ListZones(ctx context.Context) ([]Zone, error) {
|
||||
}
|
||||
|
||||
func (c *Client) CreateZone(ctx context.Context, zone Zone) (Zone, error) {
|
||||
zone.SOAEditAPI = soaEditAPIIncrease
|
||||
zone.SOAEditAPI = soaEditAPIInceptionIncrement
|
||||
var created Zone
|
||||
if err := c.do(ctx, http.MethodPost, c.path("/zones"), zone, &created); err != nil {
|
||||
return Zone{}, err
|
||||
@@ -139,7 +139,7 @@ func (c *Client) EnsureAllZonesSOAEditAPI(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (c *Client) SetZoneSOAEditAPI(ctx context.Context, zoneID string) error {
|
||||
body := Zone{SOAEditAPI: soaEditAPIIncrease}
|
||||
body := Zone{SOAEditAPI: soaEditAPIInceptionIncrement}
|
||||
return c.do(ctx, http.MethodPut, c.path("/zones/"+url.PathEscape(zoneID)), body, nil)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user