Skip to content

RFE: host context object #147

@Tiboris

Description

@Tiboris

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 != None

Originally posted by @pvoborni in #144 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions