Code review comment for lp:~yamahata/nova/boot-from-volume-0

Revision history for this message
Devin Carlen (devcamcar) wrote :

Can you please add some comments to this code block? It's unclear what this change is for.

37 + if len(parts) > 1:
38 + d = args.get(key, {})
39 + args[key] = d
40 + for k in parts[1:-1]:
41 + k = _camelcase_to_underscore(k)
42 + v = d.get(k, {})
43 + d[k] = v
44 + d = v
45 + d[_camelcase_to_underscore(parts[-1])] = value
46 + else:
47 + args[key] = value

Please add a note header to this comment block, as in:

# NOTE(your username):

This helps in tracking down subject matter experts in this large codebase.

60 + # BlockDevicedMapping.<N>.DeviceName
61 + # BlockDevicedMapping.<N>.Ebs.SnapshotId
62 + # BlockDevicedMapping.<N>.Ebs.VolumeSize
63 + # BlockDevicedMapping.<N>.Ebs.DeleteOnTermination
64 + # BlockDevicedMapping.<N>.VirtualName
65 + # => remove .Ebs and allow volume id in SnapshotId

And same thing here:

188 + # tell vm driver to attach volume at boot time by updating
189 + # BlockDeviceMapping

review: Needs Information

« Back to merge proposal