Add comments for associate/dissociate logic
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user