Version: 4.0.0-alpha.04.0.0-alpha.14.0.0-alpha.24.0.0-alpha.34.0.0-alpha.44.0.0-alpha.54.0.0-alpha.64.0.0-beta.14.0.0-beta.24.0.0-beta.34.0.0-beta.44.0.0-beta.54.0.0-beta.64.0.04.0.14.1.0-beta.24.1.0-beta.34.1.04.1.14.2.0-beta.14.2.04.3.0-beta.14.3.04.4.0-beta.14.4.0-beta.24.4.0-beta.34.5.0-beta.14.5.0-beta.24.5.0-beta.44.5.04.5.1-beta.14.5.14.6.0-beta.14.6.0-beta.24.6.0-beta.34.6.0-beta.44.6.04.6.14.7.0-beta.14.7.0-beta.24.7.04.8.0-beta.14.8.0-beta.24.8.0-beta.34.8.0-beta.44.8.04.8.14.8.2-beta.14.8.24.8.3-beta.14.8.34.9.0-beta.14.9.0-beta.24.9.0-beta.34.9.0-beta.44.9.04.9.14.9.24.10.0-beta.14.10.04.10.14.10.24.10.34.11.0-beta.14.11.04.12.0-beta.14.12.0-beta.24.12.04.13.24.13.54.13.64.14.04.15.04.15.14.16.0-beta.14.16.04.17.0-beta.14.17.0-beta.24.17.04.17.1-beta.14.17.14.18.04.19.04.20.04.21.0-beta.14.21.04.22.0-beta.14.22.04.23.0-beta.14.23.0-beta.24.23.0-beta.34.23.1-beta.14.23.14.24.0-beta.14.24.0-beta.24.24.04.25.0-beta.14.25.0-beta.24.25.0-beta.34.25.0-beta.44.25.0-beta.54.25.0-beta.64.25.0-beta.74.25.04.25.14.26.04.26.14.26.24.26.34.26.4-beta.14.26.44.26.5-beta.14.26.54.26.64.26.74.26.8-beta.14.26.84.26.9-beta.14.26.94.27.0-beta.14.27.1-beta.14.27.14.28.04.28.1-beta.14.28.14.28.24.29.0
/**
* Copyright 2018 F5 Networks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
const gtmDnsProvider = require('./gtmDnsProvider');
module.exports = {
// It is envisioned that in the future, when there are non-F5 DNS providers,
// those providers will live in their own repositories, or perhaps in the
// repository of a cloud provider (f5-cloud-libs-aws, for example).
// At that time, this function should take a name and path. The path will be
// expected to live under f5-cloud-libs/node_modules
* Creates a DNS provider for the given name
* @param {String} name - Name of the provider
* @param {Ojbect} [options] - Options for the instance.
* @param {Object} [options.clOptions] - Command line options if called from a script.
* @param {Object} [options.logger] - Logger to use. Or, pass loggerOptions to get your own logger.
* @param {Object} [options.loggerOptions] - Options for the logger.
* See {@link module:logger.getLogger} for details.
getDnsProvider(name, options) {
let DnsProvider;
if (name === 'gtm') {
DnsProvider = gtmDnsProvider;
}
if (DnsProvider) {
return new DnsProvider(options);
throw new Error('Unsupported DNS provider');
};