~fwereade/pyjuju/charm-store-hack

« back to all changes in this revision

Viewing changes to juju/machine/unit.py

  • Committer: Benjamin Saller
  • Date: 2011-09-29 22:07:15 UTC
  • mfrom: (370.1.1 lxc-patch)
  • Revision ID: bcsaller@gmail.com-20110929220715-g0t1ze2et46zmudg
[TRIVAL] Merge style changes related to lxc-omega merge and patch around master_template rename

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
 
245
245
    @inlineCallbacks
246
246
    def _get_master_template(self, machine_id, zookeeper_hosts, public_key):
247
 
        container_template_name = "%s-%s-template" % (self._unit_namespace, machine_id)
 
247
        container_template_name = "%s-%s-template" % (
 
248
            self._unit_namespace, machine_id)
248
249
 
249
 
        master_template = LXCContainer(container_template_name, origin="ppa", public_key=public_key)
 
250
        master_template = LXCContainer(
 
251
            container_template_name, origin="ppa", public_key=public_key)
250
252
 
251
253
        if not master_template.is_constructed():
252
 
            yield self.master_template.create()
 
254
            log.debug("Creating master container...")
 
255
            yield master_template.create()
253
256
            log.debug("Created master container %s" % container_template_name)
254
257
 
255
258
        # it wasn't constructed and we couldn't construct it
260
263
 
261
264
    @inlineCallbacks
262
265
    def _get_container(self, machine_id, zookeeper_hosts, bundle, public_key):
263
 
        master_template = yield self._get_master_template(machine_id, zookeeper_hosts, public_key)
 
266
        master_template = yield self._get_master_template(
 
267
            machine_id, zookeeper_hosts, public_key)
264
268
        log.info(
265
269
            "Creating container %s...", os.path.basename(self.directory))
266
270