Beispiel #1
0
def test_drive_with_size():
	"""
	Drive with size
	"""
	user_input = "/dev/xvda=snap-1234abcd:100"
	mount_point, drive_type, size, delete, iops = _parse_drive_mapping(user_input)
	mount_point.should.equal('/dev/xvda')
	drive_type.should.equal('snap-1234abcd')
	size.should.equal(100)
	delete.should.be.true
	iops.should.be.none
Beispiel #2
0
def test_snapshot_drive():
	"""
	Snapshot Drive
	"""
	user_input = "/dev/xvda=snap-1234abcd"
	mount_point, drive_type, size, delete, iops = _parse_drive_mapping(user_input)
	mount_point.should.equal('/dev/xvda')
	drive_type.should.equal('snap-1234abcd')
	size.should.be.none
	delete.should.be.true
	iops.should.be.none
Beispiel #3
0
def test_ebs_drive():
	"""
	EBS Drive
	"""
	user_input = "/dev/xvda=:100"
	mount_point, drive_type, size, delete, iops = _parse_drive_mapping(user_input)
	mount_point.should.equal('/dev/xvda')
	drive_type.should.equal('')
	size.should.equal(100)
	delete.should.be.true
	iops.should.be.none
Beispiel #4
0
def test_drive_with_size_and_delete_and_iops():
	"""
	Drive with size, delete, and iops
	"""
	user_input = "/dev/xvda=snap-1234abcd:100:false:1000"
	mount_point, drive_type, size, delete, iops = _parse_drive_mapping(user_input)
	mount_point.should.equal('/dev/xvda')
	drive_type.should.equal('snap-1234abcd')
	size.should.equal(100)
	delete.should.be.false
	iops.should.equal(1000)