Use accessor

Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
David Gageot 2015-12-30 13:05:23 +01:00
parent 9354fed274
commit 885c37e536
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ func (mcc *MachineConnChecker) Check(h *host.Host, swarm bool) (string, *auth.Op
return "", &auth.Options{}, fmt.Errorf("Error parsing URL: %s", err)
}
authOptions := h.HostOptions.AuthOptions
authOptions := h.AuthOptions()
if err := checkCert(u.Host, authOptions); err != nil {
if swarm {

View File

@ -81,7 +81,7 @@ func (api *Client) NewHost(driver drivers.Driver) (*host.Host, error) {
// Create is the wrapper method which covers all of the boilerplate around
// actually creating, provisioning, and persisting an instance in the store.
func (api *Client) Create(h *host.Host) error {
if err := cert.BootstrapCertificates(h.HostOptions.AuthOptions); err != nil {
if err := cert.BootstrapCertificates(h.AuthOptions()); err != nil {
return fmt.Errorf("Error generating certificates: %s", err)
}