コード例 #1
0
 def test_id_path_and_no_model_serial_requirements_should_save(self):
     node = factory.make_Node()
     blockdevice = PhysicalBlockDevice(
         node=node,
         name='sda',
         block_size=512,
         size=MIN_BLOCK_DEVICE_SIZE,
         id_path='/dev/disk/by-id/A2M0003-001')
     # Should work without issue
     blockdevice.save()
コード例 #2
0
 def test_model_serial_and_no_id_path_requirements_should_save(self):
     node = factory.make_Node()
     blockdevice = PhysicalBlockDevice(
         node=node,
         name="sda",
         block_size=512,
         size=MIN_BLOCK_DEVICE_SIZE,
         model="A2M0003",
         serial="001",
     )
     # Should work without issue
     blockdevice.save()