github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/provider/cloudsigma/environcaps.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package cloudsigma
     5  
     6  import (
     7  	"github.com/juju/juju/core/constraints"
     8  	"github.com/juju/juju/environs/context"
     9  )
    10  
    11  var unsupportedConstraints = []string{
    12  	constraints.Container,
    13  	constraints.InstanceType,
    14  	constraints.Tags,
    15  	constraints.VirtType,
    16  }
    17  
    18  // ConstraintsValidator returns a Validator instance which
    19  // is used to validate and merge constraints.
    20  func (env *environ) ConstraintsValidator(ctx context.ProviderCallContext) (constraints.Validator, error) {
    21  	validator := constraints.NewValidator()
    22  	validator.RegisterUnsupported(unsupportedConstraints)
    23  	return validator, nil
    24  }
    25  
    26  // SupportNetworks returns whether the environment has support to
    27  // specify networks for applications and machines.
    28  func (env *environ) SupportNetworks() bool {
    29  	return false
    30  }