Module Expr Str Import alias ImportFrom alias ImportFrom alias 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 Dict Str Str Str Str Assign AttributeStore NameLoad attr Str Assign NameStore ListLoad Dict Str Str Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad Str attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr 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 Num AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Str keyword Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword Str decorator_list Call NameLoad keyword Str keyword Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword Str 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.
 N/A base64 cafe.drivers.unittest.decorators tags cloudcafe.common.tools.datagen rand_name cloudroast.compute.fixtures ComputeFixture ConfigDriveTest N/A ComputeFixture N/A setUpClass N/A N/A cls N/A N/A N/A 
        Perform actions that setup the necessary resources for testing

        The following data is generated during this set up:
            - A dictionary of metadata with the values:
                {'user_key1': 'value1',
                 'user_key2': 'value2'}
            - If default file injection is enabled, a list of files containing
              a file with the path '/test.txt' and the contents 'This is a
              config drive test file.'
            - User data contents 'My user data'

        The following resources are created during this set up:
            - A keypair with a random name starting with 'key'
            - A server with the following settings:
                - config_drive set to True
                - The keypair previously created
                - Files to be injected at server creation including the
                  '/test.txt' data previously generated
                - The metadata previously created
                - Remaining values required for creating a server will come
                  from test configuration.
         N/A N/A N/A N/A super ConfigDriveTest cls setUpClass N/A N/A cls metadata N/A meta_key_1 meta_key_2 meta_value_1 meta_value_2 N/A N/A cls file_contents This is a config drive test file. N/A files N/A N/A path contents /test.txt N/A N/A base64 b64encode N/A cls file_contents N/A N/A cls user_data_contents My user data N/A user_data N/A N/A base64 b64encode N/A cls user_data_contents N/A N/A cls key N/A N/A N/A N/A cls keypairs_client create_keypair N/A rand_name key entity N/A N/A N/A N/A cls resources add N/A N/A cls key name N/A N/A cls keypairs_client delete_keypair N/A N/A cls server_response N/A N/A N/A cls server_behaviors create_active_server config_drive True key_name N/A N/A cls key name personality files user_data user_data metadata N/A cls metadata N/A N/A cls server N/A N/A cls server_response entity N/A N/A cls user_data_filepath N/A N/A {0}/openstack/latest/user_data format N/A N/A cls config_drive_config base_path_to_mount N/A N/A N/A N/A cls resources add N/A N/A cls server id N/A N/A cls servers_client delete_server N/A classmethod test_create_server_config_drive_response N/A N/A self N/A N/A N/A 
        Verify the config drive is set to Active

        Validate that the server created during setup shows that config_drive
        is active.

        The following assertions occur:
            - The response status code from the server creation request
              completed during test set up is equal to 202
            - The config_drive value for the server created during set up is
              equal to 'True'
         N/A N/A N/A self assertEqual 202 N/A N/A self server_response status_code N/A N/A N/A self assertEqual N/A N/A self server config_drive True msg Server config drive is set to true N/A N/A tags type smoke net no test_create_server_config_drive_can_be_mounted N/A N/A self N/A N/A N/A 
        Verify that config drive can be mounted

        Get a remote instance client for the server created during test set up.
        Use the remote client to create a directory at the config drive base
        path set during test configuration. Validate that the config drive
        directory was successfully created on the server. Mount the config drive
        source path at the created directory.

        The following assertions occur:
            - The remote client command to create a directory at the config
              drive base path from test configuration returns nothing.
         N/A remote_client N/A N/A N/A self server_behaviors get_remote_instance_client N/A self server N/A self servers_config key N/A N/A self key private_key N/A dir_creation N/A N/A remote_client create_directory path N/A N/A self config_drive_config base_path_to_mount N/A N/A N/A self assertEqual dir_creation msg Directory creation was successful N/A N/A N/A remote_client mount_disk source_path N/A N/A self config_drive_config mount_source_path destination_path N/A N/A self config_drive_config base_path_to_mount N/A N/A tags type smoke net yes test_create_server_config_drive_size N/A N/A self N/A N/A N/A 
        Verify that config drive size is in expected tolerance

        Get a remote instance client for the server created during test set up.
        Mount the config drive on the server. Use the remote client to get the
        size of the config drive directory. Validate that size of the config
        drive directory is within the tolerance values set during test
        configuration.

        The following assertions occur:
            - The size of the config drive directory is greater than or equal to
              the config drive minimum size set during test configuration.
            - The size of the config drive directory is less than or equal to
              the config drive maximum size set during test configuration.
         N/A remote_client N/A N/A N/A self server_behaviors get_remote_instance_client N/A self server N/A self servers_config key N/A N/A self key private_key N/A N/A N/A N/A self config_drive_behaviors mount_config_drive server N/A self server servers_config N/A self servers_config key N/A N/A self key private_key source_path N/A N/A self config_drive_config mount_source_path destination_path N/A N/A self config_drive_config base_path_to_mount N/A kb_size N/A N/A remote_client get_directory_details N/A N/A self config_drive_config base_path_to_mount N/A N/A N/A self assertGreaterEqual N/A kb_size size N/A N/A self config_drive_config min_size msg New image less than minimum configured tolerance N/A N/A N/A self assertLessEqual N/A kb_size size N/A N/A self config_drive_config max_size msg New image exceeds maximum configured tolerance N/A N/A tags type smoke net yes test_create_server_config_drive_user_data N/A N/A self N/A N/A N/A 
        User data should match the user data set during server creation

        Get a remote instance client for the server created during test set up.
        Mount the config drive on the server. Use the remote client to get the
        details of the user data set during test set up. Validate that the
        contents of the user data match the contents set during test set up.

        The following assertions occur:
            - The contents of the config drive user data on the server created
              during test set up are equal to the user_data_contents set during
              test set up.
         N/A remote_client N/A N/A N/A self server_behaviors get_remote_instance_client N/A self server N/A self servers_config key N/A N/A self key private_key N/A N/A N/A N/A self config_drive_behaviors mount_config_drive server N/A self server servers_config N/A self servers_config key N/A N/A self key private_key source_path N/A N/A self config_drive_config mount_source_path destination_path N/A N/A self config_drive_config base_path_to_mount N/A user_data N/A N/A N/A remote_client get_file_details file_path N/A self user_data_filepath content N/A N/A N/A self assertEqual user_data N/A self user_data_contents msg Userdata does not match expected one N/A N/A tags type smoke net yes N/A