def get_base_dictionary(): base_dict = {} current_user_name = get_user() base_dict["edi_current_user_name"] = current_user_name base_dict["edi_current_user_group_name"] = get_user_group() base_dict["edi_current_user_ssh_pub_keys"] = get_user_ssh_pub_keys() base_dict["edi_current_user_uid"] = get_user_uid() base_dict["edi_current_user_gid"] = get_user_gid() base_dict[ "edi_current_user_host_home_directory"] = get_user_home_directory( current_user_name) base_dict["edi_current_user_target_home_directory"] = "/home/{}".format( current_user_name) base_dict["edi_host_hostname"] = get_hostname() base_dict["edi_edi_plugin_directory"] = get_edi_plugin_directory() proxy_setup = ProxySetup() base_dict["edi_host_http_proxy"] = proxy_setup.get('http_proxy', default='') base_dict["edi_host_https_proxy"] = proxy_setup.get('https_proxy', default='') base_dict["edi_host_ftp_proxy"] = proxy_setup.get('ftp_proxy', default='') base_dict["edi_host_socks_proxy"] = proxy_setup.get('all_proxy', default='') base_dict["edi_host_no_proxy"] = proxy_setup.get('no_proxy', default='') base_dict["edi_edi_version"] = get_edi_version() base_dict["edi_lxd_version"] = get_lxd_version() base_dict["edi_current_display"] = get_current_display() return base_dict
def get_base_dictionary(): base_dict = {} current_user_name = get_user() base_dict["edi_current_user_name"] = current_user_name base_dict["edi_current_user_uid"] = get_user_uid() base_dict["edi_current_user_gid"] = get_user_gid() base_dict[ "edi_current_user_host_home_directory"] = get_user_environment_variable( "HOME") base_dict["edi_current_user_target_home_directory"] = "/home/{}".format( current_user_name) base_dict["edi_host_hostname"] = get_hostname() base_dict["edi_edi_plugin_directory"] = get_edi_plugin_directory() base_dict["edi_host_http_proxy"] = get_user_environment_variable( 'http_proxy', '') base_dict["edi_host_https_proxy"] = get_user_environment_variable( 'https_proxy', '') base_dict["edi_host_ftp_proxy"] = get_user_environment_variable( 'ftp_proxy', '') base_dict["edi_host_socks_proxy"] = get_user_environment_variable( 'all_proxy', '') base_dict["edi_host_no_proxy"] = get_user_environment_variable( 'no_proxy', '') base_dict["edi_lxd_version"] = get_lxd_version() return base_dict
def test_get_lxd_version(): version = get_lxd_version() assert '.' in version