示例#1
0
    def _validate_slave_for_replication(self, context, replica_info):
        if (replica_info['replication_strategy'] != REPLICATION_STRATEGY):
            raise exception.IncompatibleReplicationStrategy(
                replica_info.update({'guest_strategy': REPLICATION_STRATEGY}))

        mount_point = CONF.get(MANAGER).mount_point
        volume_stats = dbaas.get_filesystem_volume_stats(mount_point)
        if (volume_stats.get('total', 0.0) <
                replica_info['dataset']['dataset_size']):
            raise exception.InsufficientSpaceForReplica(
                replica_info.update(
                    {'slave_volume_size': volume_stats.get('total', 0.0)}))
示例#2
0
    def _validate_slave_for_replication(self, context, replica_info):
        if replica_info['replication_strategy'] != self.replication_strategy:
            raise exception.IncompatibleReplicationStrategy(
                replica_info.update(
                    {'guest_strategy': self.replication_strategy}))

        volume_stats = self.get_filesystem_stats(context, None)
        if (volume_stats.get('total', 0.0) <
                replica_info['dataset']['dataset_size']):
            raise exception.InsufficientSpaceForReplica(
                replica_info.update(
                    {'slave_volume_size': volume_stats.get('total', 0.0)}))
示例#3
0
 def _validate_slave_for_replication(self, context, replica_info):
     if (replica_info['replication_strategy'] != REPLICATION_STRATEGY):
         raise exception.IncompatibleReplicationStrategy(
             replica_info.update({'guest_strategy': REPLICATION_STRATEGY}))
示例#4
0
 def _validate_slave_for_replication(self, context, replica_info):
     if replica_info['replication_strategy'] != self.replication_strategy:
         raise exception.IncompatibleReplicationStrategy(
             replica_info.update({
                 'guest_strategy': self.replication_strategy
             }))