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

Method run

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

Source from the content-addressed store, hash-verified

685
686 @add_auth_token_to_kwargs_from_cli
687 def run(self, args, **kwargs):
688 resource_id = getattr(args, self.pk_argument_name, None)
689 instance = self.get_resource(resource_id, **kwargs)
690
691 data = instance.serialize()
692
693 if "ref" in data:
694 del data["ref"]
695
696 data["enabled"] = False
697 modified_instance = self.resource.deserialize(data)
698
699 return self.manager.update(modified_instance, **kwargs)
700
701 def run_and_print(self, args, **kwargs):
702 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