Module Expr Str ImportFrom alias alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareEq NameLoad NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr CompareIn AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Str Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Str Expr Call AttributeLoad NameLoad attr Str decorator_list decorator_list
N/A N/A 
Test protection features of the volumedriver
- not allowed to delete a volume if it has clones
* since this is a thin clone, atm the source volume cannot be deleted
* once the volumedriver will support full clone (emancipated) this test will be obsolete
-- via cinder plugin
-- via filesystem (not a test for cinder ?)
- not allowed to delete a snapshot if it has clones
-- via cinder plugin
- not allowed to delete a volume if it is in use (mounted or in use by qemu)
-- via cinder plugin
-- via filesystem (not a test for cinder ?)

* validate on OVS model
* validate on FS (volumedriver filesystem)
 ovs_common OVSPluginTestCase VPOOL_MOUNTPOINT cinder_client_exceptions OVSPluginProtectionTestCase N/A OVSPluginTestCase N/A N/A 
    Protection features tests
     test_not_allowed_to_delete_volume_with_clones N/A N/A self N/A N/A N/A 
        Create a volume using the cinder client - THIN clone via snapshot
         Create a volume from that volume using the cinder client
         TRY to delete the original volume => expect failure
         Delete the cloned volume using the cinder client
        Delete the volume using the cinder client
        COMMAND:
         cinder create --volume-type ovs --display-name VOLUME_NAME VOLUME_SIZE
         cinder create --source-volid <VOLUME_ID> --display-name CLONE_NAME VOLUME_SIZE
         cinder delete <VOLID>
         cinder delete <CLONEID>
         cinder delete <VOLID>
        ASSERTS:
         file exists on mountpoint
         vdisk modeled in OVS
         clone vdisk modeled in OVS
         original file not removed from mountpoint
         vdisk still modeled in OVS
         clone vdisk deleted from OVS
         original vdisk deleted from OVS
         file removed from mountpoint
         vdisk no longer modeled in OVS
        CLEANUP:
         -none
         N/A N/A N/A self _debug started test N/A N/A volume volume_name file_name N/A N/A self _new_volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not created on mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device not modeled in OVS N/A N/A clone clone_name clone_file_name N/A N/A self _new_volume_from_volume volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint clone_file_name N/A File %s not created on mountpoint %s  N/A clone_file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist clone_file_name Device not modeled in OVS N/A N/A N/A self assertRaises RuntimeError N/A self _remove_volume volume volume_name 5 N/A N/A N/A self _cinder_reset_volume_state volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s accidentally removed from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device accidentally removed from OVS N/A N/A N/A self _remove_volume clone clone_name N/A N/A N/A self assertFalse N/A N/A self _file_exists_on_mountpoint clone_file_name N/A File %s not deleted from mountpoint %s  N/A clone_file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist clone_file_name exists False Device still modeled in OVS N/A N/A N/A self _remove_volume volume volume_name N/A N/A N/A self assertFalse N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not deleted from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name exists False Device still modeled in OVS N/A N/A N/A self _debug ended test N/A test_not_allowed_to_delete_clone_of_snapshot N/A N/A self N/A N/A N/A 
        Create a volume using the cinder client
         Create a snapshot using the cinder client
          Create a volume from that snapshot using the cinder client
          TRY to delete the original volume => expect failure
          TRY to delete the snapshot => expect failure
          Delete the cloned volume using the cinder client
         Delete the snapshot using the cinder client
        Delete the volume using the cinder client
        COMMAND:
         cinder create --volume-type ovs --display-name VOLUME_NAME VOLUME_SIZE
         cinder snapshot-create --display-name SNAP_NAME <VOLID>
         cinder create --snapshot-id <SNAP_ID> --display-name CLONE_NAME VOLUME_SIZE
         cinder delete <VOLID>
         cinder snapshot-delete <SNAPID>
         cinder delete <CLONEID>
         cinder snapshot-delete <SNAPID>
         cinder delete <VOLID>
        ASSERTS:
         file exists on mountpoint
         vdisk modeled in OVS
         snapshot exists in cinder DB
         clone vdisk modeled in OVS
         original file not removed from mountpoint
         snapshot not removed from OVS model
         clone vdisk deleted from OVS
         snapshot deleted from cinder DB
         snapshot removed from OVS
         file removed from mountpoint
         vdisk no longer modeled in OVS
        CLEANUP:
         -none
         N/A N/A N/A self _debug started test N/A N/A volume volume_name file_name N/A N/A self _new_volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not created on mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device not modeled in OVS N/A N/A snapshot snap_name N/A N/A self _new_snapshot volume N/A cinder_snapshots N/A N/A self _cinder_list_snapshots N/A N/A N/A self assertTrue N/A N/A snapshot id N/A N/A cinder_snapshots keys Snapshot not modeled in Cinder N/A snapshot_name N/A cinder_snapshots N/A N/A snapshot id N/A N/A N/A self assertTrue N/A snapshot_name snap_name N/A Wrong name for snapshot %s snapshot_name N/A N/A N/A self assertTrue N/A N/A self _ovs_snapshot_id_in_vdisklist_snapshots N/A snapshot id Snapshot not modeled in OVS N/A N/A clone clone_name clone_file_name N/A N/A self _new_volume_from_snapshot snapshot N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint clone_file_name N/A File %s not created on mountpoint %s  N/A clone_file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist clone_file_name Device not modeled in OVS N/A N/A N/A self assertRaises N/A cinder_client_exceptions BadRequest N/A self _remove_volume volume volume_name 5 N/A N/A N/A self _cinder_reset_volume_state volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s accidentally removed from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device accidentally removed from OVS N/A N/A N/A self assertRaises RuntimeError N/A self _remove_snapshot snap_name snapshot 5 N/A N/A N/A self _cinder_reset_snapshot_state snapshot N/A cinder_snapshots N/A N/A self _cinder_list_snapshots N/A N/A N/A self assertTrue N/A N/A snapshot id N/A N/A cinder_snapshots keys Snapshot accidentally removed from Cinder N/A N/A N/A self _remove_volume clone clone_name N/A N/A N/A self assertFalse N/A N/A self _file_exists_on_mountpoint clone_file_name N/A File %s not deleted from mountpoint %s  N/A clone_file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist clone_file_name exists False Device still modeled in OVS N/A N/A N/A self _remove_snapshot snap_name snapshot force True N/A cinder_snapshots N/A N/A self _cinder_list_snapshots N/A N/A N/A self assertFalse N/A N/A snapshot id N/A N/A cinder_snapshots keys Snapshot still modeled in Cinder N/A N/A N/A self _remove_volume volume volume_name N/A N/A N/A self assertFalse N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not deleted from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name exists False Device still modeled in OVS N/A N/A N/A self _debug ended test N/A test_not_allowed_to_delete_volume_local_mounted N/A N/A self N/A N/A N/A 
        Create a volume from image using the cinder client
         Mount the volume locally (loopback)
         TRY to delete the original volume => expect failure
         Unmount the volume
        Delete the volume using the cinder client
        COMMAND:
         cinder create --volume-type ovs --display-name VOLUME_NAME --image-id IMAGE_ID VOLUME_SIZE
         mount
         cinder delete <VOLID>
         unmount
         cinder delete <VOLID>
        ASSERTS:
         file exists on mountpoint
         vdisk modeled in OVS
         volume mounted and readable/writable at new mountpoint
         original file not removed from mountpoint
         vdisk still modeled in OVS
         volume unmounted
         original vdisk deleted from OVS
         file removed from mountpoint
         vdisk no longer modeled in OVS
        CLEANUP:
         -none
         N/A N/A N/A self _debug started test N/A N/A volume volume_name file_name N/A N/A self _new_volume_from_default_image N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not created on mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device not modeled in OVS N/A N/A N/A self _mount_volume_by_filename file_name N/A N/A N/A self assertRaises RuntimeError N/A self _remove_volume volume volume_name 5 N/A N/A N/A self _cinder_reset_volume_state volume N/A N/A N/A self assertTrue N/A N/A self _file_exists_on_mountpoint file_name N/A File %s accidentally removed from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name Device accidentally removed from OVS N/A N/A N/A self _umount_volume file_name N/A N/A N/A self _remove_volume volume volume_name N/A N/A N/A self assertFalse N/A N/A self _file_exists_on_mountpoint file_name N/A File %s not deleted from mountpoint %s  N/A file_name VPOOL_MOUNTPOINT N/A N/A N/A self assertTrue N/A N/A self _ovs_devicename_in_vdisklist file_name exists False Device still modeled in OVS N/A N/A N/A self _debug ended test N/A N/A