'Get metadata from local metadata server.
Any failed URL check will fail the whole action since our bios/service
checks may not always correctly identify cloud machines. We don\'t want to
wait on multiple DNS timeouts.
Args:
request: CloudMetadataRequest object
Returns:
cloud.CloudMetadataResponse object
Raises:
ValueError: if request has a timeout of 0. This is a defensive
check (we pass 1.0) because the requests library just times out and it\'s
not obvious why.'

def GetMetaData(self, request):

    if (request.timeout == 0):
        raise ValueError("Requests    library    can't    handle    timeout    of    0")
    result = requests.request('GET', request.url, headers=request.headers, timeout=request.timeout)
    result.raise_for_status()
    if (not result.ok):
        raise requests.RequestException(response=result)
    return cloud.CloudMetadataResponse(label=(request.label or request.url), text=result.text)
