-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly allow deprecated required config
- Loading branch information
Showing
5 changed files
with
76 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# (C) Datadog, Inc. 2021-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
|
||
|
||
def initialize_instance(values, **kwargs): | ||
# TODO: remove when deprecation is finalized https://github.com/DataDog/integrations-core/pull/9340 | ||
if 'username' not in values and 'user' in values: | ||
values['username'] = values['user'] | ||
if 'password' not in values and 'pass' in values: | ||
values['password'] = values['pass'] | ||
|
||
return values |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
# (C) Datadog, Inc. 2021-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
|
||
|
||
def initialize_instance(values, **kwargs): | ||
# TODO: remove when deprecation is finalized https://github.com/DataDog/integrations-core/pull/9340 | ||
if 'username' not in values and 'user' in values: | ||
values['username'] = values['user'] | ||
|
||
return values |
10 changes: 10 additions & 0 deletions
10
supervisord/datadog_checks/supervisord/config_models/validators.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
# (C) Datadog, Inc. 2021-present | ||
# All rights reserved | ||
# Licensed under a 3-clause BSD style license (see LICENSE) | ||
|
||
|
||
def initialize_instance(values, **kwargs): | ||
# TODO: remove when deprecation is finalized https://github.com/DataDog/integrations-core/pull/9340 | ||
if 'username' not in values and 'user' in values: | ||
values['username'] = values['user'] | ||
if 'password' not in values and 'pass' in values: | ||
values['password'] = values['pass'] | ||
|
||
return values |