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

Method __init__

st2client/st2client/commands/sensor.py:23–39  ·  view source on GitHub ↗
(self, description, app, subparsers, parent_parser=None)

Source from the content-addressed store, hash-verified

21
22class SensorBranch(resource.ResourceBranch):
23 def __init__(self, description, app, subparsers, parent_parser=None):
24 super(SensorBranch, self).__init__(
25 Sensor,
26 description,
27 app,
28 subparsers,
29 parent_parser=parent_parser,
30 read_only=True,
31 commands={"list": SensorListCommand, "get": SensorGetCommand},
32 )
33
34 self.commands["enable"] = SensorEnableCommand(
35 self.resource, self.app, self.subparsers
36 )
37 self.commands["disable"] = SensorDisableCommand(
38 self.resource, self.app, self.subparsers
39 )
40
41
42class SensorListCommand(resource.ContentPackResourceListCommand):

Callers

nothing calls this directly

Calls 2

SensorEnableCommandClass · 0.85

Tested by

no test coverage detected