~rogpeppe/juju-core/438-local-instance-Addresses

« back to all changes in this revision

Viewing changes to environs/dummy/environs.go

  • Committer: Roger Peppe
  • Date: 2012-11-24 12:01:12 UTC
  • mto: (742.2.1 170-use-tls)
  • mto: This revision was merged to the branch mainline in revision 752.
  • Revision ID: roger.peppe@canonical.com-20121124120112-4m904zifc7dd5lyp
environs/dummy: make CA cert mandatory

Show diffs side-by-side

added added

removed removed

Lines of Context:
388
388
        if password == "" {
389
389
                return fmt.Errorf("admin-secret is required for bootstrap")
390
390
        }
 
391
        if _, ok := e.Config().CACert(); !ok {
 
392
                return fmt.Errorf("no CA certificate in environment configuration")
 
393
        }
391
394
        var tools *state.Tools
392
395
        var err error
393
396
        if uploadTools {
490
493
        }
491
494
        e.state.mu.Lock()
492
495
        defer e.state.mu.Unlock()
 
496
        if _, ok := e.Config().CACert(); !ok {
 
497
                return nil, fmt.Errorf("no CA certificate in environment configuration")
 
498
        }
493
499
        if info.EntityName != state.MachineEntityName(machineId) {
494
500
                return nil, fmt.Errorf("entity name must match started machine")
495
501
        }