func (c *ConfigCLISteps) exec(action, peerID, mspID, appName, appVersion, compName, compVersion, channelID string) error {
	var err error
	queryResult, err = c.BDDContext.configCLI.Exec(action, channelID, mspID, peerID, appName, appVersion, compName, compVersion)
	if err != nil {
		return fmt.Errorf("failed to %s config: %v", action, err)
	}
	return nil
}
exec executes action on config using config cli
package bddtests
import (
	"fmt"
	"strings"
	"github.com/DATA-DOG/godog"
)
var queryResult string
type ConfigCLISteps struct {
	BDDContext *BDDContext
}
func NewConfigCLISteps(context *BDDContext) *ConfigCLISteps {
	return &ConfigCLISteps{BDDContext: context}
}
func (c *ConfigCLISteps) UpdateConfig(configFile, mspID, orgID, channelID string) error {
	_, err := c.BDDContext.configCLI.ExecUpdate(channelID, mspID, orgID, configFile, "")
	if err != nil {
		return fmt.Errorf("failed to update config: %v", err)
	}
	return nil
}
func (c *ConfigCLISteps) UpdateConfigWithExceptions(configFile, mspID, orgID, channelID, blackListRegex string) error {
	var targets []string
	if blackListRegex != "" {
		logger.Infof("Config won't be updated on the following peers: [%s]", blackListRegex)
		var err error
		targets, err = c.getLocalTargets(orgID, blackListRegex)
		if err != nil {
			return err
		}
	}
	peers := ""
	if len(targets) > 0 {
		for i, target := range targets {
			peers += target
			if i+1 < len(targets) {
				peers += ","
			}
		}
		logger.Infof("Updating config on peers: [%s]", peers)
	}
	_, err := c.BDDContext.configCLI.ExecUpdate(channelID, mspID, orgID, configFile, peers)
	if err != nil {
		return fmt.Errorf("failed to update config: %v", err)
	}
	return nil
}
func (c *ConfigCLISteps) getLocalTargets(orgID string, blackListRegex string) ([]string, error) {
	return getLocalTargets(c.BDDContext, orgID, blackListRegex)
}