-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the configcache command line interface.
The CLI now follows the pattern of specifying a context followed by a command consistently. E.g. `configcache device list` instead of `configcache list device`. ZEN-35059
- Loading branch information
1 parent
1e2da2e
commit 5b651af
Showing
15 changed files
with
128 additions
and
238 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
############################################################################## | ||
# | ||
# Copyright (C) Zenoss, Inc. 2024, all rights reserved. | ||
# | ||
# This content is made available according to terms specified in | ||
# License.zenoss under the directory where your Zenoss product is installed. | ||
# | ||
############################################################################## | ||
|
||
from __future__ import absolute_import, print_function | ||
|
||
from ..app.args import get_subparser | ||
|
||
from .expire import ExpireDevice | ||
from .list import ListDevice | ||
from .remove import RemoveDevice | ||
from .show import ShowDevice | ||
from .stats import StatsDevice | ||
|
||
|
||
class Device(object): | ||
description = "Manage the device configuration cache" | ||
|
||
@staticmethod | ||
def add_arguments(parser, subparsers): | ||
devicep = get_subparser( | ||
subparsers, | ||
"device", | ||
description=Device.description, | ||
) | ||
device_subparsers = devicep.add_subparsers(title="Device Subcommands") | ||
ExpireDevice.add_arguments(devicep, device_subparsers) | ||
ListDevice.add_arguments(devicep, device_subparsers) | ||
RemoveDevice.add_arguments(devicep, device_subparsers) | ||
ShowDevice.add_arguments(devicep, device_subparsers) | ||
StatsDevice.add_arguments(devicep, device_subparsers) |
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 was deleted.
Oops, something went wrong.
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,32 @@ | ||
############################################################################## | ||
# | ||
# Copyright (C) Zenoss, Inc. 2024, all rights reserved. | ||
# | ||
# This content is made available according to terms specified in | ||
# License.zenoss under the directory where your Zenoss product is installed. | ||
# | ||
############################################################################## | ||
|
||
from __future__ import absolute_import, print_function | ||
|
||
from ..app.args import get_subparser | ||
|
||
from .expire import ExpireOidMap | ||
from .show import ShowOidMap | ||
from .stats import StatsOidMap | ||
|
||
|
||
class OidMap(object): | ||
description = "Manage the OID Map cache" | ||
|
||
@staticmethod | ||
def add_arguments(parser, subparsers): | ||
oidmapp = get_subparser( | ||
subparsers, | ||
"oidmap", | ||
description=OidMap.description, | ||
) | ||
oidmap_subparsers = oidmapp.add_subparsers(title="OidMap Subcommands") | ||
ExpireOidMap.add_arguments(oidmapp, oidmap_subparsers) | ||
ShowOidMap.add_arguments(oidmapp, oidmap_subparsers) | ||
StatsOidMap.add_arguments(oidmapp, oidmap_subparsers) |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.