~mthaddon/juju-deployer/build-set-juju-home

« back to all changes in this revision

Viewing changes to deployer/env/go.py

  • Committer: Tim Van Steenburgh
  • Date: 2016-09-08 16:24:45 UTC
  • Revision ID: tvansteenburgh@gmail.com-20160908162445-kb7z7vzam59ed4y4
Remove unnecessary pre-connect cli calls

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
            self.client.close()
75
75
 
76
76
    def connect(self):
77
 
        self.log.debug("Connecting to environment...")
78
 
        if self.juju_version == 1:
79
 
            cmd = ["juju", "api-endpoints"]
80
 
        else:
81
 
            cmd = ["juju", "get-model-config"]
82
 
        with open("/dev/null", 'w') as fh:
83
 
            self._check_call(
84
 
                self._named_env(cmd),
85
 
                self.log, "Error getting env api endpoints, env bootstrapped?",
86
 
                stderr=fh)
87
 
 
 
77
        self.log.debug("Connecting to %s...", self.name)
88
78
        self.client = self.client_class.connect(self.name)
89
 
        self.log.debug("Connected to environment")
 
79
        self.log.debug("Connected.")
90
80
 
91
81
    def get_config(self, svc_name):
92
82
        return self.client.get_config(svc_name)