Esempio n. 1
0
def create_ssl_certificate():
    flow = linear_flow.Flow('Creating poppy ssl certificate').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow("Provision poppy ssl certificate",
                         retry=retry.Times(5)).
        add(create_ssl_certificate_tasks.CreateProviderSSLCertificateTask()),
        create_ssl_certificate_tasks.SendNotificationTask(),
        create_ssl_certificate_tasks.UpdateCertInfoTask())
    return flow
Esempio n. 2
0
def delete_ssl_certificate():
    flow = graph_flow.Flow('Deleting poppy ssl certificate').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow("Deleting poppy ssl certificate",
                         retry=retry.Times(5)).
        add(delete_ssl_certificate_tasks.DeleteProviderSSLCertificateTask()),
        delete_ssl_certificate_tasks.SendNotificationTask(),
        delete_ssl_certificate_tasks.DeleteStorageSSLCertificateTask())
    return flow
Esempio n. 3
0
def purge_service():
    flow = linear_flow.Flow('Purging poppy-service').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow('Purging Provider Services').add(
            purge_service_tasks.PurgeProviderServicesTask()),
        linear_flow.Flow('Purge provider details').add(
            common.UpdateProviderDetailErrorTask(rebind=['responders'])),
        common.UpdateProviderDetailIfNotEmptyTask(
            rebind=['changed_provider_details_dict']))
    return flow
Esempio n. 4
0
def enable_service():
    flow = linear_flow.Flow('Enable service').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow('Update Service State').add(
            update_service_state_tasks.UpdateServiceStateTask()),
        linear_flow.Flow('Break DNS Chain',
                         retry=retry.ParameterizedForEach(
                             rebind=['time_seconds'],
                             provides='retry_sleep_time')).add(
                                 update_service_state_tasks.FixDNSChainTask()))
    return flow
Esempio n. 5
0
def create_service():
    flow = linear_flow.Flow('Creating poppy-service').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow('Create Provider Services').add(
            create_service_tasks.CreateProviderServicesTask()),
        linear_flow.Flow(
            'Create Service DNS Mapping flow',
            retry=retry.ParameterizedForEach(
                rebind=['time_seconds'], provides='retry_sleep_time')).add(
                    create_service_tasks.CreateServiceDNSMappingTask(
                        rebind=['responders'])),
        create_service_tasks.CreateLogDeliveryContainerTask(),
        create_service_tasks.GatherProviderDetailsTask(
            rebind=['responders', 'dns_responder', 'log_responders']),
        common.UpdateProviderDetailTask(rebind=['provider_details_dict']))
    return flow
Esempio n. 6
0
def delete_service():
    flow = linear_flow.Flow('Deleting poppy-service').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow('Delete Provider Services').add(
            delete_service_tasks.DeleteProviderServicesTask()),
        linear_flow.Flow(
            'Delete Service DNS Mapping flow',
            retry=retry.ParameterizedForEach(
                rebind=['time_seconds'], provides='retry_sleep_time')).add(
                    delete_service_tasks.DeleteServiceDNSMappingTask()),
        delete_service_tasks.GatherProviderDetailsTask(
            rebind=['responders', 'dns_responder']),
        linear_flow.Flow('Delete service storage operation').add(
            common.UpdateProviderDetailIfNotEmptyTask(
                rebind=['provider_details_dict']),
            delete_service_tasks.DeleteStorageServiceTask()))
    return flow
Esempio n. 7
0
def update_service():
    flow = linear_flow.Flow('Updating poppy-service').add(
        linear_flow.Flow('Update Oslo Context').add(
            common.ContextUpdateTask()),
        linear_flow.Flow('Update Provider Services').add(
            update_service_tasks.UpdateProviderServicesTask()),
        linear_flow.Flow('Update Service DNS Mapping flow',
                         retry=retry.ParameterizedForEach(
                             rebind=['time_seconds'],
                             provides='retry_sleep_time')).add(
            update_service_tasks.UpdateServiceDNSMappingTask(
                rebind=['responders'])),
        update_service_tasks.UpdateLogDeliveryContainerTask(),
        update_service_tasks.GatherProviderDetailsTask(
            rebind=['responders', 'dns_responder', 'log_responders']),
        update_service_tasks.UpdateProviderDetailsTask_Errors(
            rebind=['provider_details_dict_errors_tuple']),
        update_service_tasks.DeleteCertsForRemovedDomains()
    )
    return flow