github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/provider/lxd/export_test.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  // +build go1.3
     5  
     6  package lxd
     7  
     8  import (
     9  	"github.com/juju/juju/environs"
    10  	"github.com/juju/juju/tools/lxdclient"
    11  )
    12  
    13  var (
    14  	Provider           environs.EnvironProvider = providerInstance
    15  	GlobalFirewallName                          = (*environ).globalFirewallName
    16  	NewInstance                                 = newInstance
    17  )
    18  
    19  func ExposeInstRaw(inst *environInstance) *lxdclient.Instance {
    20  	return inst.raw
    21  }
    22  
    23  func ExposeInstEnv(inst *environInstance) *environ {
    24  	return inst.env
    25  }
    26  
    27  func UnsetEnvConfig(env *environ) {
    28  	env.ecfg = nil
    29  }
    30  
    31  func ExposeEnvConfig(env *environ) *environConfig {
    32  	return env.ecfg
    33  }
    34  
    35  func ExposeEnvClient(env *environ) lxdInstances {
    36  	return env.raw.lxdInstances
    37  }
    38  
    39  func GetImageSources(env *environ) ([]lxdclient.Remote, error) {
    40  	return env.getImageSources()
    41  }