Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4reverts #13392

Merged
merged 2 commits into from Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Next Next commit
Revert "Option --url and --connection should imply --remote."
This reverts commit ca980c2.

Signed-off-by: Brent Baude <bbaude@redhat.com>
  • Loading branch information
baude committed Mar 1, 2022
commit cc4a70c806a74b3bf4acfd2983a61b2ef74bd6f9
8 changes: 0 additions & 8 deletions cmd/podman/registry/remote.go
Expand Up @@ -30,12 +30,6 @@ func IsRemote() bool {
fs.Usage = func() {}
fs.SetInterspersed(false)
fs.BoolVarP(&remoteFromCLI.Value, "remote", "r", remote, "")
connectionFlagName := "connection"
ignoredConnection := ""
fs.StringVarP(&ignoredConnection, connectionFlagName, "c", "", "")
urlFlagName := "url"
ignoredURL := ""
fs.StringVar(&ignoredURL, urlFlagName, "", "")

// The shell completion logic will call a command called "__complete" or "__completeNoDesc"
// This command will always be the second argument
Expand All @@ -45,8 +39,6 @@ func IsRemote() bool {
start = 2
}
_ = fs.Parse(os.Args[start:])
// --connection or --url implies --remote
remoteFromCLI.Value = remoteFromCLI.Value || fs.Changed(connectionFlagName) || fs.Changed(urlFlagName)
})
return podmanOptions.EngineMode == entities.TunnelMode || remoteFromCLI.Value
}
2 changes: 0 additions & 2 deletions docs/source/markdown/podman.1.md
Expand Up @@ -42,7 +42,6 @@ and "$graphroot/networks" as rootless.

#### **--connection**, **-c**
Connection to use for remote podman, including Mac and Windows (excluding WSL2) machines, (Default connection is configured in `containers.conf`)
Setting this option will switch the **--remote** option to true.
Remote connections use local containers.conf for default.

#### **--conmon**
Expand Down Expand Up @@ -109,7 +108,6 @@ environment variable is set, the **--remote** option defaults to true.

#### **--url**=*value*
URL to access Podman service (default from `containers.conf`, rootless `unix://run/user/$UID/podman/podman.sock` or as root `unix://run/podman/podman.sock`).
Setting this option will switch the **--remote** option to true.

- `CONTAINER_HOST` is of the format `<schema>://[<user[:<password>]@]<host>[:<port>][<path>]`

Expand Down
11 changes: 0 additions & 11 deletions test/system/001-basic.bats
Expand Up @@ -126,17 +126,6 @@ See 'podman version --help'" "podman version --remote"
if grep -- " --remote " <<<"$output"; then
die "podman --help, with CONTAINER_CONNECTION set, is showing --remote"
fi

# When it detects --url or --connection, --remote is not an option
run_podman --url foobar --help
if grep -- " --remote " <<<"$output"; then
die "podman --help, with --url set, is showing --remote"
fi

run_podman --connection foobar --help
if grep -- " --remote " <<<"$output"; then
die "podman --help, with --connection set, is showing --remote"
fi
}

# Check that just calling "podman-remote" prints the usage message even
Expand Down