Ejemplo n.º 1
0
    def __init__(self, Release: OpenshiftRelease, Config: DagConfig):
        AbstractOpenshiftNightlyDAG.__init__(self, release=Release, config=Config)

        self.dag = DAG(
            self.release_name,
            default_args=self.config.default_args,
            tags=self.tags,
            description=f"DAG for Prebuilt Openshift Nightly builds {self.release_name}",
            schedule_interval=self.config.schedule_interval,
            max_active_runs=1,
            catchup=False,
            params={
                'KUBEUSER': Param('<Enter openshift cluster-admin username>'),
                'KUBEPASSWORD': Param('<Enter openshift cluster password>'),
                'KUBEURL': Param('<Enter cluster URL>')
            }
        )
Ejemplo n.º 2
0
    def _deserialize_params_dict(cls, encoded_params: Dict) -> ParamsDict:
        """Deserialize a DAG's Params dict"""
        op_params = {}
        for k, v in encoded_params.items():
            if isinstance(v, dict) and "__class" in v:
                op_params[k] = cls._deserialize_param(v)
            else:
                # Old style params, convert it
                op_params[k] = Param(v)

        return ParamsDict(op_params)
Ejemplo n.º 3
0
    def _deserialize_params_dict(cls, encoded_params: Dict) -> ParamsDict:
        """Deserialize a DAGs Params dict"""
        op_params = {}
        for k, v in encoded_params.items():
            if isinstance(v, dict) and "__class" in v:
                param_class = import_string(v['__class'])
                op_params[k] = param_class(**v)
            else:
                # Old style params, upgrade it
                op_params[k] = Param(v)

        return ParamsDict(op_params)