-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or request
Description
We should probably create some kind of context object, e.g. in up action or transformer. Then pass all the relevant objects in it - the ones which are input and the ones which are ooutput of the operations. Then the code would be simpler and we would not need to enhance the Host object with additional data which are in metadata.
E.g.
class HostProvisioningContext:
def __init__(self, name, req, meta_host):
self.name = name
self.req = req
self.meta_host = meta_host
self.spec = None
self.result = None
self.error = None
@property
def ok(self):
"""If provisioning resulted in success."""
return self.error != NoneOriginally posted by @pvoborni in #144 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request