Module Expr Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword Call NameLoad Str keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num keyword Call AttributeLoad Str attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad keyword Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Num Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list decorator_list Call AttributeLoad NameLoad attr BoolOpAnd AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str
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.
 N/A unittest cloudcafe.common.tools.datagen rand_name cloudcafe.glance.common.constants Messages cloudcafe.glance.common.types ImageStatus cloudcafe.glance.composite ImagesComposite ImagesAuthComposite cloudroast.glance.fixtures ImagesFixture N/A user_one N/A ImagesAuthComposite N/A images N/A ImagesComposite user_one DeactivateRegisteredImage N/A ImagesFixture N/A setUpClass N/A N/A cls N/A N/A N/A N/A N/A N/A super DeactivateRegisteredImage cls setUpClass N/A registered_images N/A N/A N/A N/A cls images behaviors register_new_images name N/A rand_name deactivate_registered_image count 4 N/A N/A cls queued_image N/A N/A registered_images pop N/A N/A cls registered_image N/A N/A registered_images pop N/A N/A N/A N/A N/A cls images client store_image_file N/A N/A cls registered_image id_ N/A N/A N/A cls images config test_file N/A N/A cls alt_registered_image N/A N/A registered_images pop N/A N/A N/A N/A N/A cls images client store_image_file N/A N/A cls alt_registered_image id_ N/A N/A N/A cls images config test_file N/A image N/A N/A registered_images pop N/A N/A N/A N/A N/A cls images client store_image_file N/A image id_ N/A N/A N/A cls images config test_file N/A N/A N/A N/A N/A cls images_admin client deactivate_image N/A image id_ N/A N/A cls list_registered_image N/A N/A N/A N/A images client get_image_details N/A image id_ entity N/A classmethod tearDownClass N/A N/A cls N/A N/A N/A N/A N/A N/A N/A N/A cls images behaviors resources release N/A N/A N/A N/A super DeactivateRegisteredImage cls tearDownClass N/A classmethod test_deactivate_registered_image N/A N/A self N/A N/A N/A 
        @summary: Deactivate a registered image

        1) Deactivate a registered image via wrapper test method
        2) Verify that the image's status is deactivated
         N/A get_image N/A N/A self _deactivate_image N/A N/A self registered_image id_ N/A N/A N/A self assertEqual N/A get_image status N/A ImageStatus DEACTIVATED msg N/A N/A Unexpected status for image {0}. Expected: {1} Received: {2} format N/A N/A self registered_image id_ N/A ImageStatus DEACTIVATED N/A get_image status N/A test_deactivate_queued_image N/A N/A self N/A N/A N/A 
        @summary: Deactivate a queued image

        1) Deactivate a queued image via wrapper test method
        2) Verify that the image's status is deactivated
         N/A get_image N/A N/A self _deactivate_image N/A N/A self queued_image id_ 403 N/A N/A N/A self assertEqual N/A get_image status N/A ImageStatus QUEUED msg N/A N/A Unexpected status for image {0}. Expected: {1} Received: {2} format N/A N/A self queued_image id_ N/A ImageStatus QUEUED N/A get_image status N/A test_deactivate_registered_image_using_non_admin N/A N/A self N/A N/A N/A 
        @summary: Deactivate a registered image as non-admin

        1) Deactivate a registered image as non-admin
        2) Verify that the response code is 403
         N/A resp N/A N/A N/A N/A self images client deactivate_image N/A N/A self alt_registered_image id_ N/A N/A N/A self assertEqual N/A resp status_code 403 N/A N/A N/A Messages STATUS_CODE_MSG format 403 N/A resp status_code N/A test_list_deactivated_registered_image N/A N/A self N/A N/A N/A 
        @summary: List all images with no additional query parameters,
        paginating through the results as needed, and verify that the
        deactivated registered image is listed

        1) List all images not passing in any additional query parameter,
        paginating through the results as needed
        2) Verify that the list is not empty
        3) Verify that the deactivated registered image is in the returned list
        of images
         N/A listed_images N/A N/A N/A N/A self images behaviors list_all_images N/A N/A N/A self assertNotEqual N/A len listed_images 0 msg N/A N/A Unexpected number of images received. Expected: Not {0} Received: {1} format 0 N/A len listed_images N/A N/A N/A self assertIn N/A self list_registered_image listed_images msg N/A N/A Expected images not received. Expected: {0} in list of images Received: {1} format N/A N/A self list_registered_image id_ listed_images N/A _deactivate_image N/A N/A self image_id response_code N/A None N/A N/A 
        @summary: Deactivate image and return the get image details response

        @param image_id: Image id to deactivate
        @type image_id: Uuid
        @param response_code: Response status code
        @type response_code: Integer

        @return: Get image details response
        @rtype: Object

        1) Deactivate an image as specified user
        2) Verify that the response code is as expected
        3) Get image details passing in the image id
        4) Verify that the response is ok
        5) Return the get image details response
         N/A N/A response_code None N/A N/A response_code 204 N/A resp N/A N/A N/A N/A self images_admin client deactivate_image image_id N/A N/A N/A self assertEqual N/A resp status_code response_code N/A N/A N/A Messages STATUS_CODE_MSG format response_code N/A resp status_code N/A resp N/A N/A N/A N/A self images client get_image_details image_id N/A N/A N/A self assertTrue N/A resp ok N/A N/A N/A Messages OK_RESP_MSG format N/A resp status_code N/A N/A resp entity N/A N/A N/A N/A unittest skipUnless N/A N/A N/A images config allow_post_images N/A N/A images config allow_put_image_file Endpoint has incorrect access