~lutostag/juju-deployer/populate-first+test-fixes

« back to all changes in this revision

Viewing changes to deployer/env/base.py

  • Committer: Kapil Thangavelu
  • Author(s): Tim Van Steenburgh
  • Date: 2015-02-03 12:20:16 UTC
  • Revision ID: kapil@canonical.com-20150203122016-xxlbltd8evkd4f0f
merge tvansteenburg's bootstrap constraint support for lib usage

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
                        units.append(uid)
65
65
        return units
66
66
 
67
 
    def bootstrap(self):
 
67
    def bootstrap(self, constraints=None):
68
68
        self.log.info("bootstraping, this might take a while...")
69
 
        params = self._named_env(["juju", "bootstrap"])
 
69
        params = ["juju", "bootstrap"]
 
70
        if constraints:
 
71
            params.extend(['--constraints', constraints])
 
72
        self._named_env(params)
70
73
        self._check_call(
71
74
            params, self.log, "Failed to bootstrap")
72
 
 
73
75
        # block until topology is returned
74
76
        self.get_cli_status()
75
77
        self.log.info(" Bootstrap complete")