~negronjl/pyjuju/874801

« back to all changes in this revision

Viewing changes to juju/providers/local/__init__.py

  • Committer: kapil.thangavelu at canonical
  • Date: 2011-10-05 12:14:41 UTC
  • Revision ID: kapil.thangavelu@canonical.com-20111005121441-t4w3flnkqqz5gxde
[trivial] require libzookeeper-java not zookeeperd, update handling of get_default_origin, log origin used [r=fwereade]

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
log = logging.getLogger("juju.local-dev")
26
26
 
27
 
REQUIRED_PACKAGES = ["zookeeperd", "libvirt-bin", "lxc", "apt-cacher-ng"]
 
27
REQUIRED_PACKAGES = ["libzookeeper-java",
 
28
                     "libvirt-bin",
 
29
                     "lxc",
 
30
                     "apt-cacher-ng"]
28
31
 
29
32
 
30
33
class MachineProvider(MachineProviderBase):
46
49
                "Unsupported placement policy for local provider")
47
50
        return LOCAL_POLICY
48
51
 
49
 
    def get_placement_policy(self):
50
 
        """Local dev supports only one unit placement policy."""
51
 
        if self.config.get("placement", LOCAL_POLICY) != LOCAL_POLICY:
52
 
            raise ProviderError(
53
 
                "Unsupported placement policy for local provider")
54
 
        return LOCAL_POLICY
55
 
 
56
52
    @property
57
53
    def provider_type(self):
58
54
        return "local"
122
118
            raise ProviderError(str(e))
123
119
 
124
120
        # Startup the machine agent
125
 
        log.info("Starting machine agent...")
126
121
        pid_file = os.path.join(self._directory, "machine-agent.pid")
127
122
        log_file = os.path.join(self._directory, "machine-agent.log")
128
123
 
135
130
                                    juju_origin=juju_origin,
136
131
                                    juju_unit_namespace=self._qualified_name,
137
132
                                    public_key=public_key)
 
133
        log.info(
 
134
            "Starting machine agent (origin: %s)... ", agent.juju_origin)
138
135
        yield agent.start()
139
136
 
140
137
        log.info("Environment bootstrapped")