MCPcopy Create free account
hub / github.com/StackStorm/st2 / __init__

Method __init__

st2client/st2client/commands/rbac.py:52–87  ·  view source on GitHub ↗
(self, resource, *args, **kwargs)

Source from the content-addressed store, hash-verified

50 attribute_display_order = ROLE_ATTRIBUTE_DISPLAY_ORDER
51
52 def __init__(self, resource, *args, **kwargs):
53 super(RoleListCommand, self).__init__(
54 resource,
55 "list",
56 "Get the list of the %s." % resource.get_plural_display_name().lower(),
57 *args,
58 **kwargs,
59 )
60
61 self.group = self.parser.add_mutually_exclusive_group()
62
63 # Filter options
64 self.group.add_argument(
65 "-s", "--system", action="store_true", help="Only display system roles."
66 )
67
68 # Display options
69 self.parser.add_argument(
70 "-a",
71 "--attr",
72 nargs="+",
73 default=self.display_attributes,
74 help=(
75 "List of attributes to include in the "
76 'output. "all" will return all '
77 "attributes."
78 ),
79 )
80 self.parser.add_argument(
81 "-w",
82 "--width",
83 nargs="+",
84 type=int,
85 default=None,
86 help=("Set the width of columns in output."),
87 )
88
89 @resource.add_auth_token_to_kwargs_from_cli
90 def run(self, args, **kwargs):

Callers

nothing calls this directly

Calls 2

__init__Method · 0.45

Tested by

no test coverage detected