github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/provider/oracle/network/zones.go (about)

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package network
     5  
     6  // AvailabilityZone implements common.AvailabilityZone
     7  type AvailabilityZone struct {
     8  	// name is the nam of the zone
     9  	name string
    10  }
    11  
    12  // NewAvailabilityZone returns a new availability zone
    13  func NewAvailabilityZone(name string) AvailabilityZone {
    14  	return AvailabilityZone{
    15  		name: name,
    16  	}
    17  }
    18  
    19  // Name is specified on the common.AvailabilityZone interface
    20  func (a AvailabilityZone) Name() string {
    21  	return a.name
    22  }
    23  
    24  // Available is specified on the common.AvailabilityZone interface
    25  func (a AvailabilityZone) Available() bool {
    26  	// we don't really have availability zones in oracle cloud. We only
    27  	// have regions
    28  	// TODO (gsamfira): Remove AvailabilityZone when bug
    29  	// https://bugs.launchpad.net/juju/+bug/1680652
    30  	// is resolved
    31  	return true
    32  }