summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorZach Marano <zmarano@google.com>2019-08-01 13:54:13 -0700
committerGitHub <noreply@github.com>2019-08-01 13:54:13 -0700
commit66b0268f237da0d046a97c6db42071cea1b6efb0 (patch)
tree6a8cf48122f0f6345f35ec544b66e9871e1a96f9 /packages
parentc38dc90bdcc427508a1e69d54575543f7881223a (diff)
downloadgoogle-compute-image-packages-66b0268f237da0d046a97c6db42071cea1b6efb0.tar.gz
Re-enable boto config and don't write plugin line. (#823)
Diffstat (limited to 'packages')
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/boto/boto_config.py2
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/boto/tests/boto_config_test.py1
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/constants.py6
-rw-r--r--packages/python-google-compute-engine/google_compute_engine/instance_setup/instance_config.py2
4 files changed, 1 insertions, 10 deletions
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',
},