Skip to content

Commit

Permalink
fix getting LSP UUID by name
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Sep 26, 2021
1 parent b765c45 commit fd74548
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/ovs/ovn-nbctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,11 @@ func (c Client) ConvertLspNameToUuid(name string) (string, error) {
klog.Errorf("failed to get lsp uuid by name, %v", err)
return "", err
}
return strings.TrimSpace(lines[0]), nil
if uuid := strings.TrimSpace(lines[0]); uuid != "" {
return uuid, nil
}

return "", fmt.Errorf("logical switch port %s not found", name)
}

func (c Client) SetPortsToPortGroup(portGroup string, portNames []string) error {
Expand Down

0 comments on commit fd74548

Please sign in to comment.