Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(767)

Side by Side Diff: provider/azure/environ.go

Issue 77820044: Add EnvironCapability to state.Policy
Patch Set: Add EnvironCapability to state.Policy Created 9 years, 12 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « environs/statepolicy.go ('k') | provider/common/policies.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 Canonical Ltd. 1 // Copyright 2013 Canonical Ltd.
2 // Licensed under the AGPLv3, see LICENCE file for details. 2 // Licensed under the AGPLv3, see LICENCE file for details.
3 3
4 package azure 4 package azure
5 5
6 import ( 6 import (
7 "fmt" 7 "fmt"
8 "net/http" 8 "net/http"
9 "sync" 9 "sync"
10 "time" 10 "time"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // DNS name, with ".cloudapp.net" appended. 44 // DNS name, with ".cloudapp.net" appended.
45 deploymentSlot = "Production" 45 deploymentSlot = "Production"
46 46
47 // Address space of the virtual network used by the nodes in this 47 // Address space of the virtual network used by the nodes in this
48 // environement, in CIDR notation. This is the network used for 48 // environement, in CIDR notation. This is the network used for
49 // machine-to-machine communication. 49 // machine-to-machine communication.
50 networkDefinition = "10.0.0.0/8" 50 networkDefinition = "10.0.0.0/8"
51 ) 51 )
52 52
53 type azureEnviron struct { 53 type azureEnviron struct {
54 common.NopPrecheckerPolicy
55 common.SupportsUnitPlacementPolicy
56
54 // Except where indicated otherwise, all fields in this object should 57 // Except where indicated otherwise, all fields in this object should
55 // only be accessed using a lock or a snapshot. 58 // only be accessed using a lock or a snapshot.
56 sync.Mutex 59 sync.Mutex
57 60
58 // name is immutable; it does not need locking. 61 // name is immutable; it does not need locking.
59 name string 62 name string
60 63
61 // archMutex gates access to supportedArchitectures 64 // archMutex gates access to supportedArchitectures
62 archMutex sync.Mutex 65 archMutex sync.Mutex
63 // supportedArchitectures caches the architectures 66 // supportedArchitectures caches the architectures
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 } 914 }
912 915
913 // Region is specified in the HasRegion interface. 916 // Region is specified in the HasRegion interface.
914 func (env *azureEnviron) Region() (simplestreams.CloudSpec, error) { 917 func (env *azureEnviron) Region() (simplestreams.CloudSpec, error) {
915 ecfg := env.getSnapshot().ecfg 918 ecfg := env.getSnapshot().ecfg
916 return simplestreams.CloudSpec{ 919 return simplestreams.CloudSpec{
917 Region: ecfg.location(), 920 Region: ecfg.location(),
918 Endpoint: string(gwacl.GetEndpoint(ecfg.location())), 921 Endpoint: string(gwacl.GetEndpoint(ecfg.location())),
919 }, nil 922 }, nil
920 } 923 }
OLDNEW
« no previous file with comments | « environs/statepolicy.go ('k') | provider/common/policies.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b