summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceAzure.py
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2015-05-08 13:18:02 +0100
committerDaniel Watkins <daniel.watkins@canonical.com>2015-05-08 13:18:02 +0100
commit84868622c404cda5efd2a753e2de30c1afca49a2 (patch)
treec1ce4029f912def2a594548f129a7458d840e165 /cloudinit/sources/DataSourceAzure.py
parent9c7643c4a0dee7843963709c361b755baf843a4b (diff)
downloadvyos-cloud-init-84868622c404cda5efd2a753e2de30c1afca49a2.tar.gz
vyos-cloud-init-84868622c404cda5efd2a753e2de30c1afca49a2.zip
Move our walinuxagent implementation to a single function call.
Diffstat (limited to 'cloudinit/sources/DataSourceAzure.py')
-rw-r--r--cloudinit/sources/DataSourceAzure.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 5e147950..4053cfa6 100644
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -29,7 +29,7 @@ from cloudinit.settings import PER_ALWAYS
from cloudinit import sources
from cloudinit import util
from cloudinit.sources.helpers.azure import (
- iid_from_shared_config_content, WALinuxAgentShim)
+ get_metadata_from_fabric, iid_from_shared_config_content)
LOG = logging.getLogger(__name__)
@@ -185,15 +185,13 @@ class DataSourceAzureNet(sources.DataSource):
write_files(ddir, files, dirmode=0o700)
try:
- shim = WALinuxAgentShim()
- data = shim.register_with_azure_and_fetch_data()
+ fabric_data = get_metadata_from_fabric()
except Exception as exc:
LOG.info("Error communicating with Azure fabric; assume we aren't"
" on Azure.", exc_info=True)
return False
- self.metadata['instance-id'] = data['instance-id']
- self.metadata['public-keys'] = data['public-keys']
+ self.metadata.update(fabric_data)
found_ephemeral = find_ephemeral_disk()
if found_ephemeral: