Revision 368d879e snf-cyclades-app/synnefo/quotas/__init__.py

b/snf-cyclades-app/synnefo/quotas/__init__.py
237 237

  
238 238

  
239 239
@transaction.commit_on_success
240
def issue_and_accept_commission(resource, delete=False):
240
def issue_and_accept_commission(resource, action="BUILD", action_fields=None):
241 241
    """Issue and accept a commission to Quotaholder.
242 242

  
243 243
    This function implements the Commission workflow, and must be called
......
250 250
    4) Accept commission to QH
251 251

  
252 252
    """
253
    action = "DESTROY" if delete else "BUILD"
254
    commission_reason = ("client: api, resource: %s, delete: %s"
255
                         % (resource, delete))
253
    commission_reason = ("client: api, resource: %s, action: %s"
254
                         % (resource, action))
256 255
    serial = handle_resource_commission(resource=resource, action=action,
256
                                        action_fields=action_fields,
257 257
                                        commission_name=commission_reason)
258 258

  
259 259
    # Mark the serial as one to accept and associate it with the resource

Also available in: Unified diff