Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for outputFormat (0.23 sec)

  1. cmd/kubeadm/app/util/output/output.go

    	return ret
    }
    
    // ToPrinter receives an outputFormat and returns a printer capable of
    // handling format printing.
    // Returns error if the specified outputFormat does not match supported formats.
    func (pf *PrintFlags) ToPrinter() (Printer, error) {
    	outputFormat := ""
    	if pf.OutputFormat != nil {
    		outputFormat = *pf.OutputFormat
    	}
    
    	if pf.TextPrintFlags != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Apr 19 08:22:45 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/template_flags_test.go

    			outputFormat:   "go-template-file",
    			templateArg:    templateFile.Name(),
    			expectedOutput: "foo",
    		},
    		{
    			name:           "valid output format and invalid template argument results in the templateArg contents as the output",
    			outputFormat:   "go-template",
    			templateArg:    "invalid",
    			expectedOutput: "invalid",
    		},
    		{
    			name:          "no printer is matched on an invalid outputFormat",
    			outputFormat:  "invalid",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/genericclioptions/jsonpath_flags_test.go

    			outputFormat:   "jsonpath-as-json={ .metadata.name }",
    			expectedOutput: "foo",
    		},
    		{
    			name:          "valid jsonpath-as-json output format and no --template argument results in an error",
    			outputFormat:  "jsonpath-as-json",
    			expectedError: "template format specified but no template given",
    		},
    		{
    			name:           "valid jsonpath-as-json output format and --template argument succeeds",
    			outputFormat:   "jsonpath-as-json",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 02 09:47:52 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  4. istioctl/pkg/writer/envoy/configdump/endpoint_test.go

    	tests := []struct {
    		name         string
    		outputFormat string
    		filter       EndpointFilter
    	}{
    		{
    			name:         "emptyfilter",
    			outputFormat: "json",
    			filter:       EndpointFilter{},
    		},
    		{
    			name:         "emptyfilter",
    			outputFormat: "yaml",
    			filter:       EndpointFilter{},
    		},
    		{
    			name:         "portfilter",
    			outputFormat: "json",
    			filter: EndpointFilter{
    				Port: 8080,
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jul 12 02:25:59 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  5. operator/cmd/mesh/operator-dump.go

    	if err := validateOperatorOutputFormatFlag(odArgs.common.outputFormat); err != nil {
    		l.LogAndFatal(fmt.Errorf("unknown output format: %v", odArgs.common.outputFormat))
    	}
    
    	_, mstr, err := renderOperatorManifest(args, &odArgs.common)
    	if err != nil {
    		l.LogAndFatal(err)
    	}
    
    	var output string
    	if output, err = yamlToFormat(mstr, odArgs.common.outputFormat); err != nil {
    		l.LogAndFatal(err)
    	}
    	l.Print(output)
    }
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 23 17:08:31 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  6. istioctl/pkg/proxyconfig/proxyconfig.go

    	path := "stats"
    	if outputFormat == jsonOutput || outputFormat == yamlOutput {
    		// for yaml output we will convert the json to yaml when printed
    		path += "?format=json"
    	} else if outputFormat == prometheusOutput {
    		path += "/prometheus"
    	} else if outputFormat == prometheusMergedOutput {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 16 03:28:36 UTC 2024
    - 48K bytes
    - Viewed (0)
  7. operator/cmd/mesh/profile-dump.go

    			return err
    		}
    	}
    
    	var output string
    	if output, err = yamlToFormat(y, pdArgs.outputFormat); err != nil {
    		return err
    	}
    	l.Print(output)
    	return nil
    }
    
    // validateOutputFormatFlag validates if the output format is valid.
    func validateProfileOutputFormatFlag(outputFormat string) error {
    	switch outputFormat {
    	case jsonOutput, yamlOutput, flagsOutput:
    	default:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Mar 15 01:18:49 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  8. istioctl/pkg/ztunnelconfig/ztunnelconfig.go

    		RunE: runConfigDump(ctx, common, func(cw *ztunnelDump.ConfigWriter) error {
    			switch common.outputFormat {
    			case summaryOutput:
    				return cw.PrintSecretSummary()
    			case jsonOutput, yamlOutput:
    				return cw.PrintSecretDump(common.outputFormat)
    			default:
    				return fmt.Errorf("output format %q not supported", common.outputFormat)
    			}
    		}),
    		ValidArgsFunction: completion.ValidPodsNameArgs(ctx),
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 06 20:18:34 UTC 2024
    - 22K bytes
    - Viewed (0)
  9. istioctl/pkg/admin/istiodconfig.go

    		if err != nil {
    			return err
    		}
    		if ga.outputFormat == "yaml" {
    			if outputBytes, err = yaml.JSONToYAML(outputBytes); err != nil {
    				return err
    			}
    		}
    		_, err = out.Write(outputBytes)
    		return err
    	default:
    		return fmt.Errorf("output format %q not supported", ga.outputFormat)
    	}
    }
    
    type istiodConfigLog struct {
    	state flagState
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 13 05:23:38 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  10. istioctl/pkg/admin/istiodconfig_test.go

    		outputLogLevel  string
    		stackTraceLevel string
    		outputFormat    string
    	}
    	tests := []struct {
    		name string
    		args args
    		want *istiodConfigLog
    	}{
    		{
    			name: "given --reset flag return reset command",
    			args: args{
    				ctrzClient:      ctrzClient,
    				reset:           true,
    				outputLogLevel:  "",
    				stackTraceLevel: "",
    				outputFormat:    "",
    			},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 15 15:02:17 UTC 2023
    - 6.2K bytes
    - Viewed (0)
Back to top