provider/infoblox.go
func NewInfobloxProvider(infobloxConfig InfobloxConfig) (*InfobloxProvider, error) {
	hostConfig := ibclient.HostConfig{
		Host:     infobloxConfig.Host,
		Port:     strconv.Itoa(infobloxConfig.Port),
		Username: infobloxConfig.Username,
		Password: infobloxConfig.Password,
		Version:  infobloxConfig.Version,
	}

	httpPoolConnections := lookupEnvAtoi("EXTERNAL_DNS_INFOBLOX_HTTP_POOL_CONNECTIONS", 10)
	httpRequestTimeout := lookupEnvAtoi("EXTERNAL_DNS_INFOBLOX_HTTP_REQUEST_TIMEOUT", 60)

	transportConfig := ibclient.NewTransportConfig(
		strconv.FormatBool(infobloxConfig.SSLVerify),
		httpRequestTimeout,
		httpPoolConnections,
	)

	requestBuilder := &ibclient.WapiRequestBuilder{}
	requestor := &ibclient.WapiHttpRequestor{}

	client, err := ibclient.NewConnector(hostConfig, transportConfig, requestBuilder, requestor)

	if err != nil {
		return nil, err
	}

	provider := &InfobloxProvider{
		client:       client,
		domainFilter: infobloxConfig.DomainFilter,
		zoneIDFilter: infobloxConfig.ZoneIDFilter,
		dryRun:       infobloxConfig.DryRun,
		view:         infobloxConfig.View,
	}

	return provider, nil
}
func NewInfobloxProvider(infobloxConfig InfobloxConfig) (*InfobloxProvider, error) {
	hostConfig := ibclient.HostConfig{
		Host:     infobloxConfig.Host,
		Port:     strconv.Itoa(infobloxConfig.Port),
		Username: infobloxConfig.Username,
		Password: infobloxConfig.Password,
		Version:  infobloxConfig.Version,
	}

	httpPoolConnections := lookupEnvAtoi("EXTERNAL_DNS_INFOBLOX_HTTP_POOL_CONNECTIONS", 10)
	httpRequestTimeout := lookupEnvAtoi("EXTERNAL_DNS_INFOBLOX_HTTP_REQUEST_TIMEOUT", 60)

	transportConfig := ibclient.NewTransportConfig(
		strconv.FormatBool(infobloxConfig.SSLVerify),
		httpRequestTimeout,
		httpPoolConnections,
	)

	requestBuilder := &ibclient.WapiRequestBuilder{}
	requestor := &ibclient.WapiHttpRequestor{}

	client, err := ibclient.NewConnector(hostConfig, transportConfig, requestBuilder, requestor)

	if err != nil {
		return nil, err
	}

	provider := &InfobloxProvider{
		client:       client,
		domainFilter: infobloxConfig.DomainFilter,
		zoneIDFilter: infobloxConfig.ZoneIDFilter,
		dryRun:       infobloxConfig.DryRun,
		view:         infobloxConfig.View,
	}

	return provider, nil
}
func NewInfobloxProvider ( infobloxConfig InfobloxConfig ) ( * InfobloxProvider , error ) { hostConfig := ibclient . HostConfig { Host : infobloxConfig . Host , Port : strconv . Itoa ( infobloxConfig . Port ) , Username : infobloxConfig . Username , Password : infobloxConfig . Password , Version : infobloxConfig . Version , } httpPoolConnections := lookupEnvAtoi ( " " , 10 ) httpRequestTimeout := lookupEnvAtoi ( " " , 60 ) transportConfig := ibclient . NewTransportConfig ( strconv . FormatBool ( infobloxConfig . SSLVerify ) , httpRequestTimeout , httpPoolConnections , ) requestBuilder := & ibclient . WapiRequestBuilder { } requestor := & ibclient . WapiHttpRequestor { } client , err := ibclient . NewConnector ( hostConfig , transportConfig , requestBuilder , requestor ) if err != nil { return nil , err } provider := & InfobloxProvider { client : client , domainFilter : infobloxConfig . DomainFilter , zoneIDFilter : infobloxConfig . ZoneIDFilter , dryRun : infobloxConfig . DryRun , view : infobloxConfig . View , } return provider , nil }
// NewInfobloxProvider creates a new Infoblox provider.
NewInfobloxProvider creates a new Infoblox provider .