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

Method __init__

st2client/st2client/commands/keyvalue.py:40–70  ·  view source on GitHub ↗
(self, description, app, subparsers, parent_parser=None)

Source from the content-addressed store, hash-verified

38
39class KeyValuePairBranch(resource.ResourceBranch):
40 def __init__(self, description, app, subparsers, parent_parser=None):
41 super(KeyValuePairBranch, self).__init__(
42 KeyValuePair,
43 description,
44 app,
45 subparsers,
46 parent_parser=parent_parser,
47 commands={
48 "list": KeyValuePairListCommand,
49 "get": KeyValuePairGetCommand,
50 "delete": KeyValuePairDeleteCommand,
51 "create": NoopCommand,
52 "update": NoopCommand,
53 },
54 )
55
56 # Registers extended commands
57 self.commands["set"] = KeyValuePairSetCommand(
58 self.resource, self.app, self.subparsers
59 )
60 self.commands["load"] = KeyValuePairLoadCommand(
61 self.resource, self.app, self.subparsers
62 )
63 self.commands["delete_by_prefix"] = KeyValuePairDeleteByPrefixCommand(
64 self.resource, self.app, self.subparsers
65 )
66
67 # Remove unsupported commands
68 # TODO: Refactor parent class and make it nicer
69 del self.commands["create"]
70 del self.commands["update"]
71
72
73class KeyValuePairListCommand(resource.ResourceTableCommand):

Callers 6

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Tested by

no test coverage detected