def repository_decorator(repository_impl):
            if self.repository_impl:
                raise OperationAlreadyDefinedError(Op.DISCOVERY_REPOSITORY)

            self.repository_impl = v.check_function(repository_impl,
                                                    Op.DISCOVERY_REPOSITORY)
            return repository_impl
Beispiel #2
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
Beispiel #3
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
Beispiel #4
0
 def status_decorator(status_impl):
     if self.status_impl:
         raise OperationAlreadyDefinedError(Op.LINKED_STATUS)
     self.status_impl = v.check_function(status_impl, Op.LINKED_STATUS)
     return status_impl
Beispiel #5
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
Beispiel #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
 def source_config_decorator(source_config_impl):
     if self.source_config_impl:
         raise OperationAlreadyDefinedError(Op.DISCOVERY_SOURCE_CONFIG)
     self.source_config_impl = v.check_function(
         source_config_impl, Op.DISCOVERY_SOURCE_CONFIG)
     return source_config_impl
Beispiel #8
0
 def pre_snapshot_decorator(pre_snapshot_impl):
     if self.pre_snapshot_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_PRE_SNAPSHOT)
     self.pre_snapshot_impl = v.check_function(pre_snapshot_impl,
                                               Op.VIRTUAL_PRE_SNAPSHOT)
     return pre_snapshot_impl
Beispiel #9
0
 def stop_decorator(stop_impl):
     if self.stop_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_STOP)
     self.stop_impl = v.check_function(stop_impl, Op.VIRTUAL_STOP)
     return stop_impl
Beispiel #10
0
 def reconfigure_decorator(reconfigure_impl):
     if self.reconfigure_impl:
         raise OperationAlreadyDefinedError(Op.VIRTUAL_RECONFIGURE)
     self.reconfigure_impl = v.check_function(reconfigure_impl,
                                              Op.VIRTUAL_RECONFIGURE)
     return reconfigure_impl
Beispiel #11
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