Remove some debugging messages.

This commit is contained in:
Olaf Seibert 2019-05-02 10:51:40 +02:00
parent 43bb372f84
commit 377867969b
2 changed files with 2 additions and 11 deletions

View File

@ -48,7 +48,7 @@ type RunConfig struct {
OpenstackProvider string `mapstructure:"openstack_provider"` OpenstackProvider string `mapstructure:"openstack_provider"`
UseFloatingIp bool `mapstructure:"use_floating_ip"` UseFloatingIp bool `mapstructure:"use_floating_ip"`
sourceImageOpts images.ListOpts // derived from .SourceImageFilters.Filters ImageFilterOptions sourceImageOpts images.ListOpts
} }
type ImageFilter struct { type ImageFilter struct {

View File

@ -55,16 +55,10 @@ func (s *StepSourceImageInfo) Run(ctx context.Context, state multistep.StateBag)
if err != nil { if err != nil {
return false, err return false, err
} }
ui.Message(fmt.Sprintf("Resulting images: %d", len(imgs)))
for index, img := range imgs {
ui.Message(fmt.Sprintf("index +%v, image %+v", index, img))
ui.Message(fmt.Sprintf("Metadata %+v", img.Metadata))
ui.Message(fmt.Sprintf("Properties %+v", img.Properties))
for _, img := range imgs {
// Check if all Properties are satisfied // Check if all Properties are satisfied
if PropertiesSatisfied(&img, &s.SourceProperties) { if PropertiesSatisfied(&img, &s.SourceProperties) {
ui.Message(fmt.Sprintf("Matched properties %+v", s.SourceProperties))
count++ count++
if count == 1 { if count == 1 {
// Tentatively return this result. // Tentatively return this result.
@ -74,12 +68,9 @@ func (s *StepSourceImageInfo) Run(ctx context.Context, state multistep.StateBag)
if count > 1 { if count > 1 {
break break
} }
} else {
ui.Message(fmt.Sprintf("FAILED to match properties %+v", s.SourceProperties))
} }
} }
ui.Message(fmt.Sprintf("Count = %v", count))
switch count { switch count {
case 0: // Continue looking at next page. case 0: // Continue looking at next page.
return true, nil return true, nil