Lines Matching refs:op
566 op = self.mox.CreateMock(
568 op.type = common.OpType.REPLACE
571 op.src_extents = []
574 op, data_length, (data_length + block_size - 1) / block_size,
578 op.src_extents = ['bar']
582 op, data_length, (data_length + block_size - 1) / block_size, 'foo')
585 op.src_extents = []
589 op, None, (data_length + block_size - 1) / block_size, 'foo')
592 op.src_extents = ['bar']
596 op, data_length, (data_length + block_size - 1) / block_size + 1, 'foo')
604 op = self.mox.CreateMock(
606 op.type = common.OpType.REPLACE_BZ
609 op.src_extents = []
612 op, data_length, (data_length + block_size - 1) / block_size + 5,
616 op.src_extents = ['bar']
620 op, data_length, (data_length + block_size - 1) / block_size + 5, 'foo')
623 op.src_extents = []
627 op, None, (data_length + block_size - 1) / block_size, 'foo')
630 op.src_extents = []
634 op, data_length, (data_length + block_size - 1) / block_size, 'foo')
639 op = update_metadata_pb2.InstallOperation()
640 op.type = common.OpType.MOVE
642 self.AddToMessage(op.src_extents,
644 self.AddToMessage(op.dst_extents,
647 payload_checker._CheckMoveOperation(op, None, 134, 134, 'foo'))
652 op = update_metadata_pb2.InstallOperation()
653 op.type = common.OpType.MOVE
655 self.AddToMessage(op.src_extents,
657 self.AddToMessage(op.dst_extents,
662 op, 1024, 134, 134, 'foo')
667 op = update_metadata_pb2.InstallOperation()
668 op.type = common.OpType.MOVE
670 self.AddToMessage(op.src_extents,
672 self.AddToMessage(op.dst_extents,
677 op, None, 134, 134, 'foo')
682 op = update_metadata_pb2.InstallOperation()
683 op.type = common.OpType.MOVE
685 self.AddToMessage(op.src_extents,
687 self.AddToMessage(op.dst_extents,
692 op, None, 134, 134, 'foo')
697 op = update_metadata_pb2.InstallOperation()
698 op.type = common.OpType.MOVE
700 self.AddToMessage(op.src_extents,
702 self.AddToMessage(op.dst_extents,
707 op, None, 134, 134, 'foo')
708 self.AddToMessage(op.src_extents,
710 self.AddToMessage(op.dst_extents,
715 op, None, 134, 134, 'foo')
720 op = update_metadata_pb2.InstallOperation()
721 op.type = common.OpType.MOVE
723 self.AddToMessage(op.src_extents,
725 self.AddToMessage(op.dst_extents,
730 op, None, 134, 134, 'foo')
735 op = update_metadata_pb2.InstallOperation()
736 op.type = common.OpType.MOVE
738 self.AddToMessage(op.src_extents,
740 self.AddToMessage(op.dst_extents,
745 op, None, 134, 134, 'foo')
750 op = update_metadata_pb2.InstallOperation()
751 op.type = common.OpType.MOVE
753 self.AddToMessage(op.src_extents,
755 self.AddToMessage(op.dst_extents,
760 op, None, 134, 134, 'foo')
762 self.AddToMessage(op.src_extents,
764 self.AddToMessage(op.dst_extents,
769 op, None, 134, 134, 'foo')
855 op = update_metadata_pb2.InstallOperation()
856 op.type = op_type
862 self.AddToMessage(op.src_extents,
865 self.AddToMessage(op.src_extents,
878 op.data_length = 16 * block_size - 8
880 op.data_offset = prev_data_offset + 16
882 op.data_offset = prev_data_offset
884 fake_data = 'fake-data'.ljust(op.data_length)
889 op.data_sha256_hash = hashlib.sha256(fake_data).digest()
890 payload.ReadDataBlob(op.data_offset, op.data_length).AndReturn(
894 op.data_sha256_hash = hashlib.sha256(
896 payload.ReadDataBlob(op.data_offset, op.data_length).AndReturn(
903 self.AddToMessage(op.dst_extents,
906 self.AddToMessage(op.dst_extents,
911 op.src_length = total_src_blocks * block_size + 8
913 op.src_length = total_src_blocks * block_size
916 op.src_length = 16
920 op.dst_length = total_dst_blocks * block_size + 8
922 op.dst_length = total_dst_blocks * block_size
930 args = (op, 'foo', is_last, old_block_counters, new_block_counters,
937 self.assertEqual(op.data_length if op.HasField('data_length') else 0,