Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcloud/common/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def _from_utc_timestamp(timestamp):

def _get_gce_metadata(path="", retry_failed: Optional[bool] = None):
try:
url = "http://metadata/computeMetadata/v1/" + path.lstrip("/")
url = "http://metadata.google.internal/computeMetadata/v1/" + path.lstrip("/")
headers = {"Metadata-Flavor": "Google"}
response = get_response_object(url, headers=headers, retry_failed=retry_failed)
return response.status, "", response.body
Expand Down
2 changes: 1 addition & 1 deletion libcloud/test/compute/fixtures/gce/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
{
"key": "startup-script",
"value": "#!/bin/bash\n\nAUTO_SCRIPT=$(curl -s http://metadata/computeMetadata/v1/instance/attributes/my-auto-script -H \"Metadata-Flavor: Google\")\nCHECK=${AUTO_SCRIPT:-disabled}\n\nif [ \"${CHECK}\" = \"enabled\" -a -f /etc/debian_version ]; then\n export DEBIAN_FRONTEND=noninteractive\n apt-get -q -y update\n apt-get -q -y install git vim tmux\n fi\nexit 0\n"
"value": "#!/bin/bash\n\nAUTO_SCRIPT=$(curl -s http://metadata.google.internal/computeMetadata/v1/instance/attributes/my-auto-script -H \"Metadata-Flavor: Google\")\nCHECK=${AUTO_SCRIPT:-disabled}\n\nif [ \"${CHECK}\" = \"enabled\" -a -f /etc/debian_version ]; then\n export DEBIAN_FRONTEND=noninteractive\n apt-get -q -y update\n apt-get -q -y install git vim tmux\n fi\nexit 0\n"
}
]
},
Expand Down