Module Assign NameStore Str Expr Str ImportFrom alias Import alias Import alias Assign SubscriptStore AttributeLoad NameLoad attr Index Str Str ImportFrom alias identifier Expr Call NameLoad NameLoad Import alias ImportFrom alias ImportFrom alias Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Import alias Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Delete AttributeDel NameLoad attr For NameStore AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Print NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Delete AttributeDel NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Num Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Assign NameStore Dict Str Dict Str Dict Str Dict Str Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Dict Str Str Str Str Str Str Str Str Str Dict Str Str Dict Dict Str Str Str Dict Str Str Str Str Dict Str NameLoad Dict Str Str Dict Str Str Dict Str Str Dict Str Str Str Str Dict Str Str Dict Str Str Dict Str Str Str Str Str Str Str Dict Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Dict Str Dict Str Dict Str Str Dict Str Dict Str Str Str Str Dict Str Str Dict Str Str Str Str Dict Str Str Str Str Assign NameStore Dict Str Str Dict Str Str Str Dict Str Str Dict Str Str Dict Str Str Dict Str Str Str Dict Str Str Dict Str Str Dict Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Import alias Assign NameStore Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list Call AttributeLoad NameLoad attr Str
N/A N/A __author__ Grace Yu (grace.yu@huawei.com) N/A Test Chef installer functionalities regarding to chef server side.
 mock Mock N/A os N/A unittest2 N/A N/A N/A os environ N/A COMPASS_IGNORE_SETTING true compass.utils setting_wrapper compass_setting N/A N/A reload compass_setting N/A config_data compass.deployment.installers.config_manager BaseConfigManager plugins.chef_installer.implementation.chef_installer ChefInstaller N/A It requires Chef server installed, in that case, this test can be run by
removing skip annontation
 N/A TEST_CHEF_URL https://api.opscode.com/organizations/compasscheftest N/A TEST_CLIENT_KEY_PATH /etc/compass/client.pem N/A TEST_CLIENT_NAME graceyu TestChefInstaller N/A N/A unittest2 TestCase N/A N/A Test installer functionality. setUp N/A N/A self N/A N/A N/A N/A N/A N/A super TestChefInstaller self setUp N/A N/A self dist_sys_name openstack_icehouse N/A N/A self chef_test_api N/A N/A self _get_testchefapi N/A N/A self test_chef N/A N/A self _get_chef_installer N/A N/A self objects N/A N/A tearDown N/A N/A self N/A N/A N/A chef N/A N/A N/A N/A super TestChefInstaller self tearDown N/A databag_names N/A N/A N/A self test_chef get_chef_databag_names N/A N/A self test_chef N/A obj N/A self objects N/A N/A N/A N/A N/A N/A obj delete N/A N/A N/A N/A N/A chef exceptions ChefError N/A ex N/A N/A ex N/A name databag_names N/A N/A temp N/A N/A chef DataBag name N/A self chef_test_api N/A N/A temp N/A N/A N/A chef DataBag list api N/A self chef_test_api N/A N/A N/A N/A temp delete N/A N/A self chef_test_api N/A _get_testchefapi N/A N/A self N/A N/A N/A chef N/A N/A N/A chef ChefAPI TEST_CHEF_URL TEST_CLIENT_KEY_PATH TEST_CLIENT_NAME N/A _register N/A N/A self obj N/A N/A N/A N/A N/A N/A self objects append obj N/A _get_chef_installer N/A N/A self N/A N/A N/A adapter_info N/A config_data adapter_test_config N/A cluster_info N/A config_data cluster_test_config N/A hosts_info N/A config_data hosts_test_config N/A config_manager N/A BaseConfigManager adapter_info cluster_info hosts_info N/A N/A ChefInstaller get_tmpl_path N/A Mock N/A test_tmpl_dir N/A N/A N/A os path join N/A N/A N/A os path join N/A config_data test_plugins_dir templates openstack_icehouse N/A N/A N/A ChefInstaller get_tmpl_path return_value test_tmpl_dir N/A N/A ChefInstaller _get_chef_api N/A Mock N/A N/A N/A ChefInstaller _get_chef_api return_value N/A self chef_test_api N/A chef_installer N/A ChefInstaller config_manager N/A chef_installer N/A test_update_node N/A N/A self N/A N/A N/A chef N/A host_id 2 N/A N/A self dist_sys_name openstack_icehouse N/A cluster_name N/A N/A N/A N/A self test_chef config_manager get_clustername N/A node_name N/A N/A N/A N/A self test_chef config_manager get_host_fullname host_id N/A roles N/A os-compute N/A env_name N/A N/A N/A self test_chef get_env_name N/A self dist_sys_name cluster_name N/A test_node N/A N/A N/A self test_chef get_create_node node_name env_name N/A N/A N/A self assertIsNotNone test_node N/A N/A N/A self _register test_node N/A cluster_dict N/A N/A N/A self test_chef _get_cluster_tmpl_vars N/A vars_dict N/A N/A N/A self test_chef _get_host_tmpl_vars host_id cluster_dict N/A N/A N/A N/A self test_chef update_node_attributes_by_roles test_node roles vars_dict N/A N/A N/A N/A self test_chef add_roles test_node roles N/A result_node N/A N/A chef Node node_name N/A self chef_test_api N/A N/A N/A self assertListEqual N/A result_node run_list N/A role[os-compute] N/A N/A N/A self assertEqual N/A result_node chef_environment env_name N/A expected_node_attr N/A openstack N/A endpoints N/A compute-vnc-bind N/A host 12.234.32.101 N/A N/A self maxDiff None N/A N/A N/A self assertDictEqual expected_node_attr N/A N/A N/A result_node attributes to_dict N/A test_update_environment N/A N/A self N/A N/A N/A chef N/A cluster_name N/A N/A N/A N/A self test_chef config_manager get_clustername N/A env_name N/A N/A N/A self test_chef get_env_name N/A self dist_sys_name cluster_name N/A vars_dict N/A N/A N/A self test_chef _get_cluster_tmpl_vars N/A env_attrs N/A N/A N/A self test_chef _generate_env_attributes vars_dict N/A test_env N/A N/A N/A self test_chef get_create_environment env_name N/A N/A N/A self assertIsNotNone test_env N/A N/A N/A self _register test_env N/A N/A N/A N/A self test_chef _update_env test_env env_attrs N/A expected_env N/A name description cookbook_versions json_class chef_type default_attributes override_attributes openstack_icehouse-test Environment N/A Chef::Environment environment N/A N/A compute db mq N/A syslog libvirt novnc_proxy xvpvnc_proxy N/A use False N/A bind_interface eth0 N/A bind_interface vnet0 N/A bind_interface eth0 N/A bind_interface compute identity vnet0 N/A host 12.234.32.100 N/A host 12.234.32.100 N/A user password vhost network guest test /nova N/A service_type rabbitmq N/A chef_env N/A N/A chef Environment env_name N/A self chef_test_api N/A N/A self maxDiff None N/A N/A N/A self assertDictEqual expected_env N/A N/A chef_env to_dict N/A test_update_databags N/A N/A self N/A N/A N/A chef N/A vars_dict N/A cluster N/A deployed_package_config N/A service_credentials users_credentials N/A nova N/A username password nova compute N/A ksadmin demo N/A username password ksadmin ksadmin N/A username password demo demo N/A expected_output N/A user_passwords db_passwords N/A admin ksadmin demo N/A admin admin N/A ksadmin ksadmin N/A demo demo N/A nova horizon keystone N/A nova compute N/A horizon horizon N/A keystone keystone N/A N/A N/A N/A self test_chef update_databags vars_dict N/A databag_names N/A N/A N/A self test_chef get_chef_databag_names N/A name databag_names N/A N/A test_databag N/A N/A chef DataBag name N/A self chef_test_api N/A N/A self maxDiff None N/A expected_items N/A expected_output N/A name N/A N/A item value N/A N/A test_databag iteritems N/A N/A N/A N/A self assertDictEqual N/A expected_items N/A item value N/A test_add_roles N/A N/A self N/A N/A N/A chef N/A test_node N/A N/A chef Node testnode api N/A self chef_test_api N/A N/A N/A N/A test_node run_list append role[test_role_a] N/A N/A N/A test_node save N/A N/A N/A self _register test_node N/A input_roles N/A test_role_1 test_role_2 test_role_a N/A N/A N/A N/A self test_chef add_roles test_node input_roles N/A expected_roles N/A N/A role[%s] role N/A role input_roles N/A N/A N/A self assertSetEqual N/A set expected_roles N/A set N/A test_node run_list N/A N/A N/A N/A unittest2 skip showing class skipping