Module Expr Str ImportFrom alias ImportFrom alias alias ImportFrom alias identifier ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword Str keyword Str decorator_list
N/A N/A 
Copyright 2015 Rackspace

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
 cafe.drivers.unittest.decorators tags cloudcafe.compute.common.exceptions ItemNotFound BadRequest cloudcafe.compute.common.types NovaImageStatusTypes ImageStates cloudroast.compute.fixtures ComputeFixture DeleteImageTest N/A ComputeFixture N/A setUpClass N/A N/A cls N/A N/A N/A 
        Perform actions that setup the neccesary resources for testing

        The following resources are created during this setup:
            - A server with values pulled from the test configuration
            - An image created from the server

        The following resources are deleted during this setup:
            - The image created previously in the setup
         N/A N/A N/A N/A super DeleteImageTest cls setUpClass N/A N/A cls server N/A N/A N/A N/A cls server_behaviors create_active_server entity N/A N/A cls image N/A N/A N/A N/A cls image_behaviors create_active_image N/A N/A cls server id entity N/A N/A cls resp N/A N/A N/A cls images_client delete_image N/A N/A cls image id N/A N/A N/A N/A cls image_behaviors wait_for_image_to_be_deleted N/A N/A cls image id N/A classmethod test_delete_image_response_code N/A N/A self N/A N/A N/A 
        The status code for a delete image request should be 204.

        Validate that the response for the delete image request in the test
        set up has a status code of 204.

        The following assertions occur:
            - The response status code for the image deleted during setup is
              equal to 204
         N/A N/A N/A self assertEqual N/A N/A self resp status_code 204 N/A N/A tags type smoke net no test_deleted_image_not_listed N/A N/A self N/A N/A N/A 
        A deleted image should not be included in the list of images.

        Request a detailed list of images. Ensure that the image id of the image
        created and deleted during setup is not found in the detailed list.
        Request a list of images. Ensure that the  image id of the image created
        and deleted during setup is not found in the list.

        The following assertions occur:
            - The image id of the image created and deleted during setup is not
              in a detailed list of images
            - The image id of the image created and deleted during setup is not
              in a list of images
         N/A images N/A N/A N/A self images_client list_images_with_detail N/A image_ids N/A N/A image id N/A image N/A images entity N/A N/A N/A self assertNotIn N/A N/A self image id image_ids N/A images N/A N/A N/A self images_client list_images N/A image_ids N/A N/A image id N/A image N/A images entity N/A N/A N/A self assertNotIn N/A N/A self image id image_ids N/A N/A tags type smoke net no test_deleted_image_listed_with_changes_since N/A N/A self N/A N/A N/A 
        A deleted image should be in the list of images using 'changed since'

        A deleted image should be included in the both the list and detailed
        list of images if the  'changes-since' parameter is a time before the
        image was deleted. As the test user get both a list of images and a
        detailed list of images using the 'created' value from the server
        created during test set up as the changed_since parameter. Validate that
        image created during test set up is found in both lists.

        The following assertions occur:
            - The image id of the image created during test set up is found
              in a list of images when the create value of the image is used
              as the 'changed_since' filter parameter
            - The image id of the image created during test set up is found
              in a detailed list of images when the create value of the image is
              used as the 'changed_since' filter parameter
         N/A images N/A N/A N/A self images_client list_images_with_detail changes_since N/A N/A self image created N/A image_ids N/A N/A image id N/A image N/A images entity N/A N/A N/A self assertIn N/A N/A self image id image_ids N/A images N/A N/A N/A self images_client list_images changes_since N/A N/A self image created N/A image_ids N/A N/A image id N/A image N/A images entity N/A N/A N/A self assertIn N/A N/A self image id image_ids N/A N/A tags type positive net no test_get_for_deleted_image N/A N/A self N/A N/A N/A 
        Validates behavior for GETs on a deleted image.

        If the test configuration is set to allow a 'GET' request on a deleted
        image, run the get_deleted_image behavior. Otherwise run the
        get_deleted_image_fails behavior.
         N/A N/A N/A self images_config can_get_deleted_image N/A N/A N/A N/A self get_deleted_image N/A N/A N/A N/A self get_deleted_image_fails N/A N/A tags type negative net no get_deleted_image_fails N/A N/A self N/A N/A N/A 
        A get image request for a deleted image should fail.
         N/A N/A N/A self assertRaises ItemNotFound N/A N/A N/A N/A N/A self images_client get_image N/A N/A self image id N/A get_deleted_image N/A N/A self N/A N/A N/A 
        A get image request for a deleted image should return the image.
         N/A image N/A N/A N/A N/A self images_client get_image N/A N/A self image id entity N/A N/A N/A self assertEqual N/A image status N/A ImageStates DELETED msg N/A N/A Expected image state to be DELETED, was {} format N/A image status N/A test_create_server_from_deleted_image_fails N/A N/A self N/A N/A N/A 
        A create server request using a deleted image should fail.

        Attempting to create a server using the image that was created and
        deleted during test set up and the flavor_ref from test configuration
        should result in a 'BadRequest' error.

        The following assertions occur:
            - Creating a server using the image id of the image deleted during
              test set up should raise a 'BadRequest' error
         N/A N/A N/A self assertRaises BadRequest N/A N/A N/A N/A N/A self servers_client create_server server N/A N/A self image id N/A self flavor_ref N/A N/A tags type negative net no test_rebuild_server_from_deleted_image_fails N/A N/A self N/A N/A N/A 
        A rebuild server request using a deleted image should fail.

        Attempting to rebuild the server created during test set up using the
        image that was created and deleted during test set up should result in
        a 'BadRequest' error.

        The following assertions occur:
            - Rebuilding a server using the image id of the image deleted during
              test set up should raise a 'BadRequest' error
         N/A N/A N/A self assertRaises BadRequest N/A N/A N/A N/A N/A self servers_client rebuild N/A N/A self server id N/A N/A self image id N/A N/A tags type negative net no N/A