summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_mounts.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-07-09 09:36:01 -0400
committerScott Moser <smoser@ubuntu.com>2010-07-09 09:36:01 -0400
commite10e24cdb7599a17fb20fd4d31bfd202dfa1774a (patch)
tree5ce00e3470693106ad30d61e5cbcc3360ea74722 /cloudinit/CloudConfig/cc_mounts.py
parent9d683e844d75ce375670638dece900fa3f21c78d (diff)
downloadvyos-cloud-init-e10e24cdb7599a17fb20fd4d31bfd202dfa1774a.tar.gz
vyos-cloud-init-e10e24cdb7599a17fb20fd4d31bfd202dfa1774a.zip
extend list of possible metadata names with 'ebs[0-9]'
ec2-run-instances --block-device-mapping /dev/sdd=:1 --block-device-mapping /dev/sde=snap-4cda7b24 --block-device-mapping sdf=snap-d4d90bbc resulted in: 'block-device-mapping': {'ami': '/dev/sda1', 'ebs1': '/dev/sdd', 'ebs2': '/dev/sde', 'ebs3': 'sdf', 'ephemeral0': '/dev/sda2', 'root': '/dev/sda1', 'swap': 'sda3'}
Diffstat (limited to 'cloudinit/CloudConfig/cc_mounts.py')
-rw-r--r--cloudinit/CloudConfig/cc_mounts.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_mounts.py b/cloudinit/CloudConfig/cc_mounts.py
index 32cfe02e..8177d305 100644
--- a/cloudinit/CloudConfig/cc_mounts.py
+++ b/cloudinit/CloudConfig/cc_mounts.py
@@ -24,8 +24,12 @@ def is_mdname(name):
# return true if this is a metadata service name
if name in [ "ami", "root", "swap" ]:
return True
+ # names 'ephemeral0' or 'ephemeral1'
+ # 'ebs[0-9]' appears when '--block-device-mapping sdf=snap-d4d90bbc'
+ for enumname in ( "ephemeral", "ebs" ):
+ if name.startswith(enumname) and name.find(":") == -1:
+ return True
if name.startswith("ephemeral") and name.find(":") == -1:
- return True
return False
def handle(name,cfg,cloud,log,args):