func (client *cniClient) constructNetworkConfig(cfg interface{}, plugin string) (*libcni.NetworkConfig, error) {
	configBytes, err := json.Marshal(cfg)
	if err != nil {
		seelog.Errorf("[ECSCNI] Marshal configuration for plugin %s failed, error: %v", plugin, err)
		return nil, err
	}
	networkConfig := &libcni.NetworkConfig{
		Network: &cnitypes.NetConf{
			Type: plugin,
		},
		Bytes: configBytes,
	}

	return networkConfig, nil
}
func (client *cniClient) constructNetworkConfig(cfg interface{}, plugin string) (*libcni.NetworkConfig, error) {
	configBytes, err := json.Marshal(cfg)
	if err != nil {
		seelog.Errorf("[ECSCNI] Marshal configuration for plugin %s failed, error: %v", plugin, err)
		return nil, err
	}
	networkConfig := &libcni.NetworkConfig{
		Network: &cnitypes.NetConf{
			Type: plugin,
		},
		Bytes: configBytes,
	}

	return networkConfig, nil
}
func ( client * cniClient ) constructNetworkConfig ( cfg interface { } , plugin string ) ( * libcni . NetworkConfig , error ) { configBytes , err := json . Marshal ( cfg ) if err != nil { seelog . Errorf ( " " , plugin , err ) return nil , err } networkConfig := & libcni . NetworkConfig { Network : & cnitypes . NetConf { Type : plugin , } , Bytes : configBytes , } return networkConfig , nil }
// constructNetworkConfig takes in the config from agent and construct the configuration
// that's accepted by the libcni
constructNetworkConfig takes in the config from agent and construct the configuration that s accepted by the libcni