Refactor from GCE (Google Cloud Engine) to GCP (Google Cloud Platform).

This commit is contained in:
vahid
2019-03-18 09:25:48 -07:00
parent f434d1cd1b
commit eb6500dcd0
3 changed files with 10 additions and 10 deletions
+3 -3
View File
@@ -74,14 +74,14 @@
</object_store>
-->
<!-- Cloud ObjectStore: Google Compute Engine (GCE) -->
<!-- Cloud ObjectStore: Google Compute Platform (GCP) -->
<!--
<object_store type="cloud" provider="google" order="0">
<auth credentials_file="..." />
<bucket name="..." use_reduced_redundancy="False" />
<cache path="database/object_store_cache" size="1000" /> <!-- size is in gigabytes -->
<extra_dir type="job_work" path="database/job_working_directory_gce"/>
<extra_dir type="temp" path="database/tmp_gce"/>
<extra_dir type="job_work" path="database/job_working_directory_gcp"/>
<extra_dir type="temp" path="database/tmp_gcp"/>
</object_store>
-->
+2 -2
View File
@@ -157,7 +157,7 @@ class Cloud(ObjectStore, CloudConfigMixin):
#
# Therefore, to adhere with principle of least privilege, we do not
# assert credentials; instead, we handle exceptions raised as a
# result of signing API calls to cloud provider (e.g., GCE) using
# result of signing API calls to cloud provider (e.g., GCP) using
# incorrect, invalid, or unauthorized credentials.
return connection
@@ -215,7 +215,7 @@ class Cloud(ObjectStore, CloudConfigMixin):
elif provider == "google":
cre = auth_element.get("credentials_file")
if not os.path.isfile(cre):
msg = "The following file specified for GCE credentials not found: {}".format(cre)
msg = "The following file specified for GCP credentials not found: {}".format(cre)
log.error(msg)
raise IOError(msg)
if cre is None:
+5 -5
View File
@@ -577,7 +577,7 @@ extra_dirs:
CLOUD_GOOGLE_TEST_CONFIG = """<object_store type="cloud" provider="google">
<auth credentials_file="gce.config" />
<auth credentials_file="gcp.config" />
<bucket name="unique_bucket_name_all_lowercase" use_reduced_redundancy="False" />
<cache path="database/object_store_cache" size="1000" />
<extra_dir type="job_work" path="database/job_working_directory_cloud"/>
@@ -589,7 +589,7 @@ CLOUD_GOOGLE_TEST_CONFIG_YAML = """
type: cloud
provider: google
auth:
credentials_file: gce.config
credentials_file: gcp.config
bucket:
name: unique_bucket_name_all_lowercase
@@ -615,9 +615,9 @@ def test_config_parse_cloud():
tmpdir = mkdtemp()
if not os.path.exists(tmpdir):
os.makedirs(tmpdir)
path = os.path.join(tmpdir, "gce.config")
open(path, "w").write("some_gce_config")
config_str = config_str.replace("gce.config", path)
path = os.path.join(tmpdir, "gcp.config")
open(path, "w").write("some_gcp_config")
config_str = config_str.replace("gcp.config", path)
with TestConfig(config_str, clazz=UnitializedCloudObjectStore) as (directory, object_store):
assert object_store.bucket_name == "unique_bucket_name_all_lowercase"