-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: atulpatel261194 <[email protected]>
- Loading branch information
1 parent
745a92f
commit 9cf56d1
Showing
29 changed files
with
507 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Copyright (c) 2022-2023 Dell Inc, or its subsidiaries. | ||
|
||
// Package cmd implements the ipsec related CLI commands | ||
package cmd | ||
|
||
import ( | ||
"log" | ||
"os" | ||
|
||
"github.com/opiproject/godpu/cmd/common" | ||
"github.com/opiproject/godpu/cmd/inventory" | ||
"github.com/opiproject/godpu/cmd/ipsec" | ||
"github.com/opiproject/godpu/cmd/network" | ||
"github.com/opiproject/godpu/cmd/storage" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// NewCommand handles the cli for evpn, ipsec, invetory and storage | ||
func NewCommand() *cobra.Command { | ||
// | ||
// This is the root command for the CLI | ||
// | ||
|
||
c := &cobra.Command{ | ||
Use: "godpu", | ||
Short: "godpu - DPUs and IPUs cli commands", | ||
Run: func(cmd *cobra.Command, _ []string) { | ||
err := cmd.Help() | ||
if err != nil { | ||
log.Fatalf("[ERROR] %s", err.Error()) | ||
} | ||
os.Exit(1) | ||
}, | ||
} | ||
c.AddCommand(inventory.NewInventoryCommand()) | ||
c.AddCommand(ipsec.NewIPSecCommand()) | ||
c.AddCommand(storage.NewStorageCommand()) | ||
c.AddCommand(network.NewEvpnCommand()) | ||
|
||
flags := c.PersistentFlags() | ||
flags.String(common.AddrCmdLineArg, "localhost:50151", "address of OPI gRPC server") | ||
flags.String(common.TLSFiles, "", "TLS files in client_cert:client_key:ca_cert format.") | ||
|
||
return c | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.