Example #1
0
 def configure_decorator(configure_impl):
     if self.configure_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_CONFIGURE)
     self.configure_impl = v.check_function(configure_impl,
                                            Op.VIRTUAL_CONFIGURE)
     return configure_impl
Example #2
0
 def initialize_decorator(initialize_impl):
     if self.initialize_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_INITIALIZE)
     self.initialize_impl = v.check_function(initialize_impl,
                                             Op.VIRTUAL_INITIALIZE)
     return initialize_impl
Example #3
0
 def mount_specification_decorator(mount_specification_impl):
     if self.mount_specification_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_MOUNT_SPEC)
     self.mount_specification_impl = v.check_function(
         mount_specification_impl, Op.VIRTUAL_MOUNT_SPEC)
     return mount_specification_impl
Example #4
0
 def worker_decorator(worker_impl):
     if self.worker_impl:
         raise OperationAlreadyDefinedError(Op.LINKED_WORKER)
     self.worker_impl = v.check_function(worker_impl, Op.LINKED_WORKER)
     return worker_impl
Example #5
0
 def status_decorator(status_impl):
     if self.status_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_STATUS)
     self.status_impl = v.check_function(status_impl, Op.VIRTUAL_STATUS)
     return status_impl
Example #6
0
 def post_snapshot_decorator(post_snapshot_impl):
     if self.post_snapshot_impl:
         raise OperationAlreadyDefinedError(Op.LINKED_POST_SNAPSHOT)
     self.post_snapshot_impl = v.check_function(post_snapshot_impl,
                                                Op.LINKED_POST_SNAPSHOT)
     return post_snapshot_impl
Example #7
0
 def stop_staging_decorator(stop_staging_impl):
     if self.stop_staging_impl:
         raise OperationAlreadyDefinedError(Op.LINKED_STOP_STAGING)
     self.stop_staging_impl = v.check_function(stop_staging_impl,
                                               Op.LINKED_STOP_STAGING)
     return stop_staging_impl
Example #8
0
 def snapshot_decorator(snapshot_impl):
     std_mig_id = self.__migration_id_set.add(
         migration_id, snapshot_impl.__name__)
     self.snapshot_id_to_impl[std_mig_id] = v.check_function(
         snapshot_impl, Op.UPGRADE_SNAPSHOT)
     return snapshot_impl
Example #9
0
 def virtual_source_decorator(virtual_source_impl):
     std_mig_id = self.__migration_id_set.add(
         migration_id, virtual_source_impl.__name__)
     self.virtual_source_id_to_impl[std_mig_id] = v.check_function(
         virtual_source_impl, Op.UPGRADE_VIRTUAL_SOURCE)
     return virtual_source_impl
Example #10
0
 def linked_source_decorator(linked_source_impl):
     std_mig_id = self.__migration_id_set.add(
         migration_id, linked_source_impl.__name__)
     self.linked_source_id_to_impl[std_mig_id] = v.check_function(
         linked_source_impl, Op.UPGRADE_LINKED_SOURCE)
     return linked_source_impl
Example #11
0
 def source_config_decorator(source_config_impl):
     std_mig_id = self.__migration_id_set.add(
         migration_id, source_config_impl.__name__)
     self.source_config_id_to_impl[std_mig_id] = v.check_function(
         source_config_impl, Op.UPGRADE_SOURCE_CONFIG)
     return source_config_impl
Example #12
0
 def repository_decorator(repository_impl):
     std_mig_id = self.__migration_id_set.add(
         migration_id, repository_impl.__name__)
     self.repository_id_to_impl[std_mig_id] = v.check_function(
         repository_impl, Op.UPGRADE_REPOSITORY)
     return repository_impl