~fwereade/pyjuju/document-relation-set-empty

« back to all changes in this revision

Viewing changes to ensemble/agents/provision.py

  • Committer: William Reade
  • Date: 2011-08-17 09:17:06 UTC
  • mfrom: (306.1.24 hide-instances)
  • Revision ID: fwereade@gmail.com-20110817091706-2zg0we3co9xqrwfk
simplified instance-getting; ec2 no longer filters 'pending' instances, to better match orchestra behaviour; several error types/messages reworked

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
from zookeeper import NoNodeException
5
5
 
6
6
from ensemble.environment.config import EnvironmentsConfig
7
 
from ensemble.errors import ProviderInteractionError
 
7
from ensemble.errors import MachinesNotFound, ProviderInteractionError
8
8
from ensemble.lib.twistutils import concurrent_execution_guard
9
9
from ensemble.state.errors import (
10
10
    MachineStateNotFound, ServiceStateNotFound, ServiceUnitStateNotFound,
177
177
 
178
178
        # map of instance_id -> machine
179
179
        try:
180
 
            provider_machines = yield self.provider.list_machines()
 
180
            provider_machines = yield self.provider.get_machines()
181
181
        except ProviderInteractionError:
182
182
            log.exception("Cannot get machine list")
183
183
            return
458
458
            for port, proto in to_close:
459
459
                yield self.provider.close_port(
460
460
                    machine, machine_id, port, proto)
461
 
        except ProviderInteractionError:
 
461
        except MachinesNotFound:
462
462
            log.info("No provisioned machine for machine %r", machine_id)
463
463
        finally:
464
464
            # Ensure that the observation runs after the corresponding