@@ -905,6 +905,8 @@ def test_volume_set_image_property(self):
905905 verifylist = [
906906 ('image_property' , {'Alpha' : 'a' , 'Beta' : 'b' }),
907907 ('volume' , self .new_volume .id ),
908+ ('bootable' , False ),
909+ ('non_bootable' , False )
908910 ]
909911 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
910912
@@ -952,6 +954,31 @@ def test_volume_set_state_failed(self):
952954 self .volumes_mock .reset_state .assert_called_with (
953955 self .new_volume .id , 'error' )
954956
957+ def test_volume_set_bootable (self ):
958+ arglist = [
959+ ['--bootable' , self .new_volume .id ],
960+ ['--non-bootable' , self .new_volume .id ]
961+ ]
962+ verifylist = [
963+ [
964+ ('bootable' , True ),
965+ ('non_bootable' , False ),
966+ ('volume' , self .new_volume .id )
967+ ],
968+ [
969+ ('bootable' , False ),
970+ ('non_bootable' , True ),
971+ ('volume' , self .new_volume .id )
972+ ]
973+ ]
974+ for index in range (len (arglist )):
975+ parsed_args = self .check_parser (
976+ self .cmd , arglist [index ], verifylist [index ])
977+
978+ self .cmd .take_action (parsed_args )
979+ self .volumes_mock .set_bootable .assert_called_with (
980+ self .new_volume .id , verifylist [index ][0 ][1 ])
981+
955982
956983class TestVolumeShow (TestVolume ):
957984
0 commit comments