Skip to content

Commit

Permalink
lens: Delete deprecated inspect commands
Browse files Browse the repository at this point in the history
Closes #2603.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Dec 4, 2023
1 parent 6151f15 commit 3cad130
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 55 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ Changelog for NeoFS Node
### Changed

### Removed
- Deprecated `neofs-adm [...] inspect` commands (#2603)

### Updated

### Updating from v0.39.0
`neofs-adm [...] inspect` commands were deleted, use `get` instead.

## [0.39.0] - 2023-12-12 - Baegado

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ import (
"github.com/spf13/cobra"
)

var inspectCMD = &cobra.Command{
Use: "inspect",
Short: "Object inspection",
Long: `Inspect specific object in a metabase.`,
Deprecated: "will be removed in the next release. Use `get` instead.",
Run: getFunc,
}

var getCMD = &cobra.Command{
Use: "get",
Short: "Object inspection",
Expand All @@ -27,9 +19,6 @@ var getCMD = &cobra.Command{
}

func init() {
common.AddAddressFlag(inspectCMD, &vAddress)
common.AddComponentPathFlag(inspectCMD, &vPath)

common.AddAddressFlag(getCMD, &vAddress)
common.AddComponentPathFlag(getCMD, &vPath)
}
Expand Down
1 change: 0 additions & 1 deletion cmd/neofs-lens/internal/meta/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ var Root = &cobra.Command{

func init() {
Root.AddCommand(
inspectCMD,
listGraveyardCMD,
listGarbageCMD,
writeObjectCMD,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ import (
"github.com/spf13/cobra"
)

var inspectCMD = &cobra.Command{
Use: "inspect",
Short: "Object inspection",
Long: `Inspect specific object in a Peapod.`,
Deprecated: "will be removed in the next release. Use `get` instead.",
Run: getFunc,
}

var getCMD = &cobra.Command{
Use: "get",
Short: "Get object",
Expand All @@ -22,11 +14,6 @@ var getCMD = &cobra.Command{
}

func init() {
common.AddAddressFlag(inspectCMD, &vAddress)
common.AddComponentPathFlag(inspectCMD, &vPath)
common.AddOutputFileFlag(inspectCMD, &vOut)
common.AddPayloadOnlyFlag(inspectCMD, &vPayloadOnly)

common.AddAddressFlag(getCMD, &vAddress)
common.AddComponentPathFlag(getCMD, &vPath)
common.AddOutputFileFlag(getCMD, &vOut)
Expand Down
3 changes: 2 additions & 1 deletion cmd/neofs-lens/internal/peapod/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var Root = &cobra.Command{
}

func init() {
Root.AddCommand(listCMD, inspectCMD, getCMD)
Root.AddCommand(listCMD)
Root.AddCommand(getCMD)
}

// open and returns read-only peapod.Peapod located in vPath.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ import (
"github.com/spf13/cobra"
)

var storageInspectObjCMD = &cobra.Command{
Use: "inspect",
Short: "Get object from the NeoFS node's storage snapshot",
Long: "Get object from the NeoFS node's storage snapshot",
Deprecated: "will be removed in the next release. Use `get` instead.",
Args: cobra.NoArgs,
Run: getFunc,
}

var storageGetObjCMD = &cobra.Command{
Use: "get",
Short: "Get object from the NeoFS node's storage snapshot",
Expand All @@ -25,11 +16,6 @@ var storageGetObjCMD = &cobra.Command{
}

func init() {
common.AddAddressFlag(storageInspectObjCMD, &vAddress)
common.AddOutputFileFlag(storageInspectObjCMD, &vOut)
common.AddConfigFileFlag(storageInspectObjCMD, &vConfig)
common.AddPayloadOnlyFlag(storageInspectObjCMD, &vPayloadOnly)

common.AddAddressFlag(storageGetObjCMD, &vAddress)
common.AddOutputFileFlag(storageGetObjCMD, &vOut)
common.AddConfigFileFlag(storageGetObjCMD, &vConfig)
Expand Down
1 change: 0 additions & 1 deletion cmd/neofs-lens/internal/storage/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ var Root = &cobra.Command{

func init() {
Root.AddCommand(
storageInspectObjCMD,
storageGetObjCMD,
storageStatusObjCMD,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ import (
"github.com/spf13/cobra"
)

var inspectCMD = &cobra.Command{
Use: "inspect",
Short: "Object inspection",
Long: `Inspect specific object in a write-cache.`,
Deprecated: "will be removed in the next release. Use `get` instead.",
Run: getFunc,
}

var getCMD = &cobra.Command{
Use: "get",
Short: "Object inspection",
Expand All @@ -23,11 +15,6 @@ var getCMD = &cobra.Command{
}

func init() {
common.AddAddressFlag(inspectCMD, &vAddress)
common.AddComponentPathFlag(inspectCMD, &vPath)
common.AddOutputFileFlag(inspectCMD, &vOut)
common.AddPayloadOnlyFlag(inspectCMD, &vPayloadOnly)

common.AddAddressFlag(getCMD, &vAddress)
common.AddComponentPathFlag(getCMD, &vPath)
common.AddOutputFileFlag(getCMD, &vOut)
Expand Down
3 changes: 2 additions & 1 deletion cmd/neofs-lens/internal/writecache/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ var Root = &cobra.Command{
}

func init() {
Root.AddCommand(listCMD, inspectCMD, getCMD)
Root.AddCommand(listCMD)
Root.AddCommand(getCMD)
}

func openWC(cmd *cobra.Command) *bbolt.DB {
Expand Down

0 comments on commit 3cad130

Please sign in to comment.