Revision ba777b02 snf-cyclades-app/synnefo/logic/servers.py

b/snf-cyclades-app/synnefo/logic/servers.py
138 138
                    log.debug("Rejecting commission: '%s', could not perform"
139 139
                              " action '%s': %s" % (vm.serial,  action, e))
140 140
                    transaction.rollback()
141
                    quotas.reject_serial(vm.serial)
141
                    quotas.reject_resource_serial(vm)
142 142
                    transaction.commit()
143 143
                raise
144 144

  
......
147 147
                # commission because the VM has been stored in DB. Also, if
148 148
                # communication with Ganeti fails, the job will never reach
149 149
                # Ganeti, and the commission will never be resolved.
150
                quotas.accept_serial(vm.serial)
150
                quotas.accept_resource_serial(vm)
151 151

  
152 152
            log.info("user: %s, vm: %s, action: %s, job_id: %s, serial: %s",
153 153
                     user_id, vm.id, action, job_id, vm.serial)

Also available in: Unified diff