Add comments for associate/dissociate logic

This commit is contained in:
Hisaharu Ishii
2011-08-24 14:01:33 -07:00
parent 54b183928a
commit 4e22af346e

View File

@@ -817,6 +817,10 @@ class NetworkCommands(object):
admin_context = context.get_admin_context()
network = db.network_get_by_cidr(admin_context, fixed_range)
net = {}
#User can choose the following actions each for project and host.
#1) Associate (set not None value given by project/host parameter)
#2) Disassociate (set None by disassociate parameter)
#3) Keep unchanged (project/host key is not added to 'net')
if project:
net['project_id'] = project
elif dis_project: