示例#1
0
文件: environ.go 项目: imoapps/juju
func (env *environ) cloudSpec(region string) (simplestreams.CloudSpec, error) {
	endpoint := gosigma.ResolveEndpoint(region)
	return simplestreams.CloudSpec{
		Region:   region,
		Endpoint: endpoint,
	}, nil
}
示例#2
0
文件: environ.go 项目: kat-co/juju
func (env *environ) MetadataLookupParams(region string) (*simplestreams.MetadataLookupParams, error) {
	env.lock.Lock()
	defer env.lock.Unlock()
	return &simplestreams.MetadataLookupParams{
		Region:   region,
		Endpoint: gosigma.ResolveEndpoint(region),
		Series:   config.PreferredSeries(env.ecfg),
	}, nil
}
示例#3
0
func (env *environ) MetadataLookupParams(region string) (*simplestreams.MetadataLookupParams, error) {
	if region == "" {
		region = gosigma.DefaultRegion
	}
	env.lock.Lock()
	defer env.lock.Unlock()
	return &simplestreams.MetadataLookupParams{
		Region:        region,
		Endpoint:      gosigma.ResolveEndpoint(region),
		Architectures: arch.AllSupportedArches,
		Series:        config.PreferredSeries(env.ecfg),
	}, nil
}