From 66b0268f237da0d046a97c6db42071cea1b6efb0 Mon Sep 17 00:00:00 2001 From: Zach Marano Date: Thu, 1 Aug 2019 13:54:13 -0700 Subject: Re-enable boto config and don't write plugin line. (#823) --- .../google_compute_engine/boto/boto_config.py | 2 -- .../google_compute_engine/boto/tests/boto_config_test.py | 1 - .../python-google-compute-engine/google_compute_engine/constants.py | 6 ------ .../google_compute_engine/instance_setup/instance_config.py | 2 +- 4 files changed, 1 insertion(+), 10 deletions(-) (limited to 'packages') diff --git a/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py b/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py index 6771c5c..155f3c7 100644 --- a/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py +++ b/packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py @@ -80,10 +80,8 @@ class BotoConfig(object): config = config_manager.ConfigManager( config_file=self.boto_config_template, config_header=self.boto_config_header) - boto_dir = os.path.dirname(self.boto_config_script) config.SetOption('GSUtil', 'default_project_id', project_id) config.SetOption('GSUtil', 'default_api_version', '2') config.SetOption('GoogleCompute', 'service_account', 'default') - config.SetOption('Plugin', 'plugin_directory', boto_dir) config.WriteConfig(config_file=self.boto_config) diff --git a/packages/python-google-compute-engine/google_compute_engine/boto/tests/boto_config_test.py b/packages/python-google-compute-engine/google_compute_engine/boto/tests/boto_config_test.py index 3ba4168..bc2c05a 100644 --- a/packages/python-google-compute-engine/google_compute_engine/boto/tests/boto_config_test.py +++ b/packages/python-google-compute-engine/google_compute_engine/boto/tests/boto_config_test.py @@ -53,7 +53,6 @@ class BotoConfigTest(unittest.TestCase): mock.call.set('GSUtil', 'default_project_id', self.project_id), mock.call.set('GSUtil', 'default_api_version', '2'), mock.call.set('GoogleCompute', 'service_account', 'default'), - mock.call.set('Plugin', 'plugin_directory', '/tmp'), mock.call.write(config_file='config'), ] self.assertEqual(mocks.mock_calls, expected_calls) diff --git a/packages/python-google-compute-engine/google_compute_engine/constants.py b/packages/python-google-compute-engine/google_compute_engine/constants.py index d929baf..cfe87c4 100644 --- a/packages/python-google-compute-engine/google_compute_engine/constants.py +++ b/packages/python-google-compute-engine/google_compute_engine/constants.py @@ -16,7 +16,6 @@ """A module for global constants.""" import platform -import sys OSLOGIN_CONTROL_SCRIPT = 'google_oslogin_control' OSLOGIN_NSS_CACHE_SCRIPT = 'google_oslogin_nss_cache' @@ -42,8 +41,3 @@ else: OSLOGIN_NSS_CACHE = '/etc/oslogin_passwd.cache' SYSCONFDIR = '/etc/default' SYSLOG_SOCKET = '/dev/log' - -if sys.version_info >= (3, 0): - SET_BOTO_CONFIG = 'false' -else: - SET_BOTO_CONFIG = 'true' diff --git a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py index 2326115..1c23171 100644 --- a/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py +++ b/packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py @@ -78,7 +78,7 @@ class InstanceConfig(config_manager.ConfigManager): 'host_key_types': 'ecdsa,ed25519,rsa', 'optimize_local_ssd': 'true', 'network_enabled': 'true', - 'set_boto_config': constants.SET_BOTO_CONFIG, + 'set_boto_config': 'true', 'set_host_keys': 'true', 'set_multiqueue': 'true', }, -- cgit v1.2.1