mirror of
https://github.com/containers/podman.git
synced 2025-06-04 21:55:24 +08:00
Update system connection add & remove
Add new --farm flag to podman system connection add so that a user can add a new connection to a farm immediately. Update system connection remove such that when a connection is removed, the connection is also removed from any farms that have it. Add docs and tests for these changes. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
This commit is contained in:
@ -167,6 +167,17 @@ func StringMatchRegexSlice(s string, re []string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IndexOfStringInSlice returns the index if a string is in a slice, otherwise
|
||||
// it returns -1 if the string is not found
|
||||
func IndexOfStringInSlice(s string, sl []string) int {
|
||||
for i := range sl {
|
||||
if sl[i] == s {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
// ParseSignal parses and validates a signal name or number.
|
||||
func ParseSignal(rawSignal string) (syscall.Signal, error) {
|
||||
// Strip off leading dash, to allow -1 or -HUP
|
||||
|
Reference in New Issue
Block a user