~hazmat/charms/trusty/juju-gui/trunk

« back to all changes in this revision

Viewing changes to server/guiserver/bundles/utils.py

  • Committer: Francesco Banconi
  • Date: 2013-10-09 10:48:53 UTC
  • mfrom: (60.13.41 trunk)
  • Revision ID: francesco.banconi@canonical.com-20131009104853-6b8oxx4k1ycmv2yk
Tags: 0.11.0
MergedĀ juju-guiĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
# Change statuses.
30
30
SCHEDULED = 'scheduled'
31
31
STARTED = 'started'
 
32
CANCELLED = 'cancelled'
32
33
COMPLETED = 'completed'
33
34
 
34
35
 
99
100
        change = create_change(deployment_id, status, queue=position)
100
101
        watcher.put(change)
101
102
 
 
103
    def notify_cancelled(self, deployment_id):
 
104
        """Add a change to the deployment watcher notifying it is cancelled."""
 
105
        watcher = self.deployments[deployment_id]
 
106
        change = create_change(deployment_id, CANCELLED)
 
107
        watcher.close(change)
 
108
 
102
109
    def notify_completed(self, deployment_id, error=None):
103
110
        """Add a change to the deployment watcher notifying it is completed."""
104
111
        watcher = self.deployments[deployment_id]