summaryrefslogtreecommitdiff
path: root/ec2-run-user-data.py
diff options
context:
space:
mode:
authorSoren Hansen <soren@canonical.com>2009-09-04 11:16:09 -0500
committerSoren Hansen <soren@canonical.com>2009-09-04 11:16:09 -0500
commit2fd7a079c19ce42c7705e9e87bc5e807d45891b2 (patch)
tree3a22756cee7df4c26159d01cdcfd2b814a076efe /ec2-run-user-data.py
parentb554bb69009d99cd03c5d89b7cd82e014583b5d4 (diff)
downloadvyos-cloud-init-2fd7a079c19ce42c7705e9e87bc5e807d45891b2.tar.gz
vyos-cloud-init-2fd7a079c19ce42c7705e9e87bc5e807d45891b2.zip
Add a unittest for veriyfing that shell scripts passed in user-data get called.
Diffstat (limited to 'ec2-run-user-data.py')
-rwxr-xr-xec2-run-user-data.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ec2-run-user-data.py b/ec2-run-user-data.py
index d7e8e632..2108e0a0 100755
--- a/ec2-run-user-data.py
+++ b/ec2-run-user-data.py
@@ -154,10 +154,13 @@ class ApplianceConfig(object):
def main():
ec2 = ec2init.EC2Init()
- user_data = ec2.get_user_data()
+ user_data = get_user_data()
msg = parse_user_data(user_data)
handle_part(msg)
+def get_user_data():
+ return ec2.get_user_data()
+
def parse_user_data(user_data):
return email.message_from_string(user_data)