<s> from celery import chain <EOL> from nodeconductor . core import tasks , executors <EOL> from nodeconductor . structure . tasks import ConnectSharedSettingsTask <EOL> class ServiceSettingsCreateExecutor ( executors . CreateExecutor ) : <EOL> @ classmethod <EOL> def get_task_signature ( cls , settings , serialized_settings , ** kwargs ) : <EOL> creation_tasks = [ tasks . StateTransitionTask ( ) . si ( serialized_settings , state_transition = '<STR_LIT>' ) ] <EOL> if settings . shared : <EOL> creation_tasks . append ( ConnectSharedSettingsTask ( ) . si ( serialized_settings ) ) <EOL> backend = settings . get_backend ( ) <EOL> if not backend . has_global_properties ( ) : <EOL> creation_tasks . append ( tasks . IndependentBackendMethodTask ( ) . si ( serialized_settings , '<STR_LIT>' ) ) <EOL> return chain ( * creation_tasks ) <EOL> class ServiceSettingsPullExecutor ( executors . ActionExecutor ) : <EOL> @ classmethod <EOL> def get_task_signature ( cls , settings , serialized_settings , ** kwargs ) : <EOL> return tasks . IndependentBackendMethodTask ( ) . si ( <EOL> serialized_settings , '<STR_LIT>' , state_transition = '<STR_LIT>' ) <EOL> class ServiceSettingsConnectSharedExecutor ( executors . BaseExecutor ) : <EOL> @ classmethod <EOL> def get_task_signature ( cls , settings , serialized_settings , ** kwargs ) : <EOL> return ConnectSharedSettingsTask ( ) . si ( serialized_settings ) </s>
