func (verifier *bundleDataVerifier) verifyOptions() {
	if verifier.charms == nil {
		return
	}
	for appName, svc := range verifier.bd.Applications {
		charm := verifier.charms[svc.Charm]
		if charm == nil {
			// An error will be produced by verifyApplications for this case.
			continue
		}
		config := charm.Config()
		for name, value := range svc.Options {
			opt, ok := config.Options[name]
			if !ok {
				verifier.addErrorf("cannot validate application %q: configuration option %q not found in charm %q", appName, name, svc.Charm)
				continue
			}
			_, err := opt.validate(name, value)
			if err != nil {
				verifier.addErrorf("cannot validate application %q: %v", appName, err)
			}
		}
	}
}
// verifyOptions verifies that the options are correctly defined
// with respect to the charm config options.
verifyOptions verifies that the options are correctly defined
with respect to the charm config options.
// verifyOptions verifies that the options are correctly defined // with respect to the charm config options .
func (verifier *bundleDataVerifier) verifyOptions() {
	if verifier.charms == nil {
		return
	}
	for appName, svc := range verifier.bd.Applications {
		charm := verifier.charms[svc.Charm]
		if charm == nil {
			continue
		}
		config := charm.Config()
		for name, value := range svc.Options {
			opt, ok := config.Options[name]
			if !ok {
				verifier.addErrorf("cannot validate application %q: configuration option %q not found in charm %q", appName, name, svc.Charm)
				continue
			}
			_, err := opt.validate(name, value)
			if err != nil {
				verifier.addErrorf("cannot validate application %q: %v", appName, err)
			}
		}
	}
}
func ( verifier * bundleDataVerifier ) verifyOptions ( ) { if verifier . charms == nil { return } for appName , svc := range verifier . bd . Applications { charm := verifier . charms [ svc . Charm ] if charm == nil { continue } config := charm . Config ( ) for name , value := range svc . Options { opt , ok := config . Options [ name ] if ! ok { verifier . addErrorf ( " " , appName , name , svc . Charm ) continue } _ , err := opt . validate ( name , value ) if err != nil { verifier . addErrorf ( " " , appName , err ) } } } }
verifyOptions verifies that the options are correctly defined
with respect to the charm config options.
verifyOptions verifies that the options are correctly defined with respect to the charm config options .
// An error will be produced by verifyApplications for this case.