Constant name change and indentation fixes.
@@ -40,7 +40,7 @@ class PutRequest(urlrequest.Request):
GUEST_ATTRIBUTES_URL = ('http://metadata.google.internal/computeMetadata/v1beta1/'
'instance/guest-attributes')
-GA_NAMESPACE = 'hostkeys'
+HOSTKEY_NAMESPACE = 'hostkeys'
class InstanceSetup(object):
@@ -167,7 +167,7 @@ class InstanceSetup(object):
def _WriteHostKeyToGuestAttributes(self, key_type, key_value):
"""Write a host key to guest attributes, ignoring errors."""
headers = {'Metadata-Flavor': 'Google'}
- url = '%s/%s/%s' % (GUEST_ATTRIBUTES_URL, GA_NAMESPACE, key_type)
+ url = '%s/%s/%s' % (GUEST_ATTRIBUTES_URL, HOSTKEY_NAMESPACE, key_type)
req = PutRequest(url, key_value, headers)
try:
response = urlrequest.urlopen(req)
