Merge "Update Operators"
This commit is contained in:
commit
313c44d054
|
@ -29,15 +29,6 @@ def deploy_site_armada(parent_dag_name, child_dag_name, args):
|
|||
'{}.{}'.format(parent_dag_name, child_dag_name),
|
||||
default_args=args)
|
||||
|
||||
# Create Armada Client
|
||||
armada_client = ArmadaOperator(
|
||||
task_id='create_armada_client',
|
||||
shipyard_conf=config_path,
|
||||
action='create_armada_client',
|
||||
main_dag_name=parent_dag_name,
|
||||
sub_dag_name=child_dag_name,
|
||||
dag=dag)
|
||||
|
||||
# Get Tiller Status
|
||||
armada_status = ArmadaOperator(
|
||||
task_id='armada_status',
|
||||
|
@ -67,7 +58,6 @@ def deploy_site_armada(parent_dag_name, child_dag_name, args):
|
|||
dag=dag)
|
||||
|
||||
# Define dependencies
|
||||
armada_status.set_upstream(armada_client)
|
||||
armada_apply.set_upstream(armada_status)
|
||||
armada_get_releases.set_upstream(armada_apply)
|
||||
|
||||
|
|
|
@ -30,14 +30,6 @@ def deploy_site_drydock(parent_dag_name, child_dag_name, args):
|
|||
'{}.{}'.format(parent_dag_name, child_dag_name),
|
||||
default_args=args)
|
||||
|
||||
drydock_client = DryDockOperator(
|
||||
task_id='create_drydock_client',
|
||||
shipyard_conf=config_path,
|
||||
action='create_drydock_client',
|
||||
main_dag_name=parent_dag_name,
|
||||
sub_dag_name=child_dag_name,
|
||||
dag=dag)
|
||||
|
||||
drydock_verify_site = DryDockOperator(
|
||||
task_id='verify_site',
|
||||
shipyard_conf=config_path,
|
||||
|
@ -71,7 +63,6 @@ def deploy_site_drydock(parent_dag_name, child_dag_name, args):
|
|||
dag=dag)
|
||||
|
||||
# Define dependencies
|
||||
drydock_verify_site.set_upstream(drydock_client)
|
||||
drydock_prepare_site.set_upstream(drydock_verify_site)
|
||||
drydock_prepare_nodes.set_upstream(drydock_prepare_site)
|
||||
drydock_deploy_nodes.set_upstream(drydock_prepare_nodes)
|
||||
|
|
|
@ -76,19 +76,6 @@ class ArmadaOperator(BaseOperator):
|
|||
# Logs uuid of action performed by the Operator
|
||||
logging.info("Armada Operator for action %s", workflow_info['id'])
|
||||
|
||||
# Create Armada Client
|
||||
if self.action == 'create_armada_client':
|
||||
# Retrieve Endpoint Information
|
||||
svc_type = 'armada'
|
||||
context['svc_endpoint'] = ucp_service_endpoint(self,
|
||||
svc_type=svc_type)
|
||||
logging.info("Armada endpoint is %s", context['svc_endpoint'])
|
||||
|
||||
# Set up Armada Client
|
||||
session_client = self.armada_session_client(context)
|
||||
|
||||
return session_client
|
||||
|
||||
# Retrieve Deckhand Design Reference
|
||||
design_ref = self.get_deckhand_design_ref(context)
|
||||
|
||||
|
@ -118,10 +105,15 @@ class ArmadaOperator(BaseOperator):
|
|||
|
||||
return site_design_validity
|
||||
|
||||
# Retrieve armada_client via XCOM so as to perform other tasks
|
||||
armada_client = task_instance.xcom_pull(
|
||||
task_ids='create_armada_client',
|
||||
dag_id=self.main_dag_name + '.' + self.sub_dag_name)
|
||||
# Create Armada Client
|
||||
# Retrieve Endpoint Information
|
||||
svc_type = 'armada'
|
||||
context['svc_endpoint'] = ucp_service_endpoint(self,
|
||||
svc_type=svc_type)
|
||||
logging.info("Armada endpoint is %s", context['svc_endpoint'])
|
||||
|
||||
# Set up Armada Client
|
||||
armada_client = self.armada_session_client(context)
|
||||
|
||||
# Retrieve Tiller Information and assign to context 'query'
|
||||
context['query'] = self.get_tiller_info(context)
|
||||
|
|
|
@ -88,19 +88,6 @@ class DryDockOperator(BaseOperator):
|
|||
# Logs uuid of action performed by the Operator
|
||||
logging.info("DryDock Operator for action %s", workflow_info['id'])
|
||||
|
||||
# DrydockClient
|
||||
if self.action == 'create_drydock_client':
|
||||
# Retrieve Endpoint Information
|
||||
svc_type = 'physicalprovisioner'
|
||||
context['svc_endpoint'] = ucp_service_endpoint(self,
|
||||
svc_type=svc_type)
|
||||
logging.info("DryDock endpoint is %s", context['svc_endpoint'])
|
||||
|
||||
# Set up DryDock Client
|
||||
drydock_client = self.drydock_session_client(context)
|
||||
|
||||
return drydock_client
|
||||
|
||||
# Retrieve Deckhand Design Reference
|
||||
self.design_ref = self.get_deckhand_design_ref(context)
|
||||
|
||||
|
@ -124,10 +111,15 @@ class DryDockOperator(BaseOperator):
|
|||
|
||||
return site_design_validity
|
||||
|
||||
# Retrieve drydock_client via XCOM so as to perform other tasks
|
||||
drydock_client = task_instance.xcom_pull(
|
||||
task_ids='create_drydock_client',
|
||||
dag_id=self.main_dag_name + '.' + self.sub_dag_name)
|
||||
# DrydockClient
|
||||
# Retrieve Endpoint Information
|
||||
svc_type = 'physicalprovisioner'
|
||||
context['svc_endpoint'] = ucp_service_endpoint(self,
|
||||
svc_type=svc_type)
|
||||
logging.info("DryDock endpoint is %s", context['svc_endpoint'])
|
||||
|
||||
# Set up DryDock Client
|
||||
drydock_client = self.drydock_session_client(context)
|
||||
|
||||
# Read shipyard.conf
|
||||
config = configparser.ConfigParser()
|
||||
|
|
Loading…
Reference in New Issue