Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 64 for execute (0.32 sec)

  1. cni/pkg/util/executil.go

    	err := externalCommand.Run()
    
    	if err != nil || len(stderr.Bytes()) != 0 {
    		return stderr.String(), err
    	}
    
    	return strings.TrimSuffix(stdout.String(), "\n"), err
    }
    
    func Execute(cmd string, args ...string) error {
    	log.Debugf("Running command: %s %s", cmd, strings.Join(args, " "))
    	externalCommand := exec.Command(cmd, args...)
    	stdout := &bytes.Buffer{}
    	stderr := &bytes.Buffer{}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/cmd/istioctl_test.go

    	rootCmd := GetRootCmd([]string{"--unknown-flag"})
    	fErr := rootCmd.Execute()
    
    	switch fErr.(type) {
    	case istioctlutil.CommandParseError:
    		// do nothing
    	default:
    		t.Errorf("Expected a CommandParseError, but got %q.", fErr)
    	}
    
    	// we should propagate to subcommands
    	rootCmd = GetRootCmd([]string{"analyze", "--unknown-flag"})
    	fErr = rootCmd.Execute()
    
    	switch fErr.(type) {
    	case istioctlutil.CommandParseError:
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Aug 29 14:53:25 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  3. istioctl/pkg/util/testutil/util.go

    func VerifyOutput(t *testing.T, cmd *cobra.Command, c TestCase) {
    	t.Helper()
    
    	cmd.SetArgs(c.Args)
    
    	var out bytes.Buffer
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    	cmd.SilenceUsage = true
    
    	fErr := cmd.Execute()
    	output := out.String()
    
    	if c.ExpectedOutput != "" && c.ExpectedOutput != output {
    		t.Fatalf("Unexpected output for '%s %s'\n got: %q\nwant: %q", cmd.Name(),
    			strings.Join(c.Args, " "), output, c.ExpectedOutput)
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 2K bytes
    - Viewed (0)
  4. istioctl/cmd/istioctl/main.go

    		fmt.Fprintf(os.Stderr, "Could not initialize: %v\n", err)
    		exitCode := cmd.GetExitCode(err)
    		os.Exit(exitCode)
    	}
    
    	rootCmd := cmd.GetRootCmd(os.Args[1:])
    
    	log.EnableKlogWithCobra()
    
    	if err := rootCmd.Execute(); err != nil {
    		exitCode := cmd.GetExitCode(err)
    		os.Exit(exitCode)
    	}
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue May 23 17:08:31 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  5. istioctl/pkg/waypoint/waypoint_test.go

    				t.Fatal("expected output is empty")
    			}
    
    			var out bytes.Buffer
    			rootCmd := Cmd(ctx)
    			rootCmd.SetArgs(tt.args)
    			rootCmd.SetOut(&out)
    			rootCmd.SetErr(&out)
    
    			fErr := rootCmd.Execute()
    			if fErr != nil {
    				t.Fatal(fErr)
    			}
    			output := out.String()
    			if output != expectedOut {
    				t.Fatalf("expected %s, got %s", expectedOut, output)
    			}
    		})
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Apr 04 15:53:09 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  6. istioctl/pkg/proxystatus/proxystatus_test.go

    	t.Helper()
    
    	var out bytes.Buffer
    	cmd.SetArgs(c.args)
    	cmd.SilenceUsage = true
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    
    	fErr := cmd.Execute()
    	output := out.String()
    
    	if c.expectedOutput != "" && c.expectedOutput != output {
    		t.Fatalf("Unexpected output for 'istioctl %s'\n got: %q\nwant: %q", strings.Join(c.args, " "), output, c.expectedOutput)
    	}
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Mar 15 08:28:50 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  7. istioctl/pkg/admin/istiodconfig.go

    		return err
    	default:
    		return fmt.Errorf("output format %q not supported", ga.outputFormat)
    	}
    }
    
    type istiodConfigLog struct {
    	state flagState
    }
    
    func (id *istiodConfigLog) execute(out io.Writer) error {
    	return id.state.run(out)
    }
    
    func chooseClientFlag(ctrzClient *ControlzClient, reset bool, outputLogLevel, stackTraceLevel, outputFormat string) *istiodConfigLog {
    	if reset {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Sat Apr 13 05:23:38 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  8. istioctl/pkg/workload/workload_test.go

    	t.Helper()
    
    	var out bytes.Buffer
    	cmd.SetArgs(c.args)
    	cmd.SetOut(&out)
    	cmd.SetErr(&out)
    	cmd.SilenceUsage = true
    	if c.namespace != "" {
    		namespace = c.namespace
    	}
    
    	fErr := cmd.Execute()
    	output := out.String()
    
    	if c.expectedException {
    		if fErr == nil {
    			t.Fatalf("Wanted an exception, "+
    				"didn't get one, output was %q", output)
    		}
    	} else {
    		if fErr != nil {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  9. istioctl/pkg/proxyconfig/proxyconfig.go

    	if eds {
    		path += "?include_eds=true"
    	}
    	debug, err := kubeClient.EnvoyDoWithPort(context.TODO(), podName, podNamespace, "GET", path, proxyAdminPort)
    	if err != nil {
    		return nil, fmt.Errorf("failed to execute command on %s.%s sidecar: %v", podName, podNamespace, err)
    	}
    	return debug, err
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Apr 16 03:28:36 GMT 2024
    - 48K bytes
    - Viewed (0)
  10. cni/pkg/iptables/iptables.go

    	var execErrs []error
    
    	if cfg.cfg.RestoreFormat {
    		// Execute iptables-restore
    		execErrs = append(execErrs, cfg.executeIptablesRestoreCommand(iptablesBuilder, &cfg.iptV, true))
    		// Execute ip6tables-restore
    		if cfg.cfg.EnableIPv6 {
    			execErrs = append(execErrs, cfg.executeIptablesRestoreCommand(iptablesBuilder, &cfg.ipt6V, false))
    		}
    	} else {
    		// Execute iptables commands
    		execErrs = append(execErrs,
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue May 07 19:54:50 GMT 2024
    - 19.7K bytes
    - Viewed (0)
Back to top