-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a reset command to remove destination resources (#293)
* Add a reset command to remove destination resources * Saving work * Reset working, saving work * Fix typo * Make a new client here * Put these in the a different order * Better comments * Revert format change
- Loading branch information
1 parent
2120362
commit beebf38
Showing
9 changed files
with
101 additions
and
21 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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Unless explicitly stated otherwise all files in this repository are licensed | ||
# under the 3-clause BSD style license (see LICENSE). | ||
# This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
# Copyright 2019 Datadog, Inc. | ||
|
||
from click import command, option | ||
|
||
from datadog_sync.commands.shared.options import ( | ||
CustomOptionClass, | ||
common_options, | ||
destination_auth_options, | ||
) | ||
from datadog_sync.commands.shared.utils import run_cmd | ||
from datadog_sync.constants import Command | ||
|
||
|
||
@command(Command.RESET.value, short_help="WARNING: Reset Datadog resources by deleting them.") | ||
@destination_auth_options | ||
@common_options | ||
@option( | ||
"--do-not-backup", | ||
required=False, | ||
is_flag=True, | ||
default=False, | ||
help="Skip backing up the destination you are about to reset. Not recommended.", | ||
cls=CustomOptionClass, | ||
) | ||
def reset(**kwargs): | ||
"""WARNING: Reset Datadog resources by deleting them.""" | ||
run_cmd(Command.RESET, **kwargs) |
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 |
---|---|---|
|
@@ -48,6 +48,7 @@ class Command(Enum): | |
SYNC = "sync" | ||
DIFFS = "diffs" | ||
MIGRATE = "migrate" | ||
RESET = "reset" | ||
|
||
|
||
# Origin | ||
|
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