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

Method run

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

Source from the content-addressed store, hash-verified

635
636 @add_auth_token_to_kwargs_from_cli
637 def run(self, args, **kwargs):
638 resource_id = getattr(args, self.pk_argument_name, None)
639 instance = self.get_resource(resource_id, **kwargs)
640
641 data = instance.serialize()
642
643 if "ref" in data:
644 del data["ref"]
645
646 data["enabled"] = True
647 modified_instance = self.resource.deserialize(data)
648
649 return self.manager.update(modified_instance, **kwargs)
650
651 def run_and_print(self, args, **kwargs):
652 instance = self.run(args, **kwargs)

Callers 1

run_and_printMethod · 0.95

Calls 4

serializeMethod · 0.80
deserializeMethod · 0.80
get_resourceMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected