diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/generate_profile.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/generate_profile.py index 26f0923c11c91..5dd015f8f40cc 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/generate_profile.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/generate_profile.py @@ -10,6 +10,7 @@ import click import yaml +from ....constants import MIB_SOURCE_URL from ...console import CONTEXT_SETTINGS, echo_debug, echo_info, echo_warning, set_debug @@ -23,7 +24,7 @@ '--source', '-s', help='Source of the MIBs files. Can be a url or a path for a directory', - default='http://raw.githubusercontent.com/trevoro/snmp-mibs/master/mibs/@mib@', + default=MIB_SOURCE_URL, ) @click.pass_context def generate_profile_from_mibs(ctx, mib_files, filters, aliases, debug, interactive, source): diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/translate_profile.py b/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/translate_profile.py index 3c928ea9db37e..553832969245b 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/translate_profile.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/commands/meta/snmp/translate_profile.py @@ -6,6 +6,7 @@ import click import yaml +from ....constants import MIB_SOURCE_URL from ...console import CONTEXT_SETTINGS @@ -37,7 +38,7 @@ def fetch_mib(mib, source_url): @click.argument('profile_path') @click.option( '--mib_source_url', - default='https://raw.githubusercontent.com:443/DataDog/mibs.snmplabs.com/master/asn1/@mib@', + default=MIB_SOURCE_URL, help='Source url to fetch missing MIBS', ) @click.pass_context diff --git a/datadog_checks_dev/datadog_checks/dev/tooling/constants.py b/datadog_checks_dev/datadog_checks/dev/tooling/constants.py index 2fa289147451c..3852ed120e806 100644 --- a/datadog_checks_dev/datadog_checks/dev/tooling/constants.py +++ b/datadog_checks_dev/datadog_checks/dev/tooling/constants.py @@ -92,6 +92,8 @@ ROOT = '' +MIB_SOURCE_URL = 'https://raw.githubusercontent.com:443/DataDog/mibs.snmplabs.com/master/asn1/@mib@' + def get_root(): return ROOT