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

✨ rename fleet => inventory #1920

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cnquery/cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func init() {

// v6 should make detect-cicd and category flag public
scanCmd.Flags().Bool("detect-cicd", true, "Try to detect CI/CD environments. If detected, set the asset category to 'cicd'.")
scanCmd.Flags().String("category", "fleet", "Set the category for the assets to 'fleet|cicd'.")
scanCmd.Flags().String("category", "inventory", "Set the category for the assets to 'inventory|cicd'.")
scanCmd.Flags().MarkHidden("category")
}

Expand Down
7 changes: 5 additions & 2 deletions providers-sdk/v1/inventory/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ func NewState(state string) State {
}

var AssetCategory_schemevalue = map[string]AssetCategory{
"fleet": AssetCategory_CATEGORY_FLEET,
"cicd": AssetCategory_CATEGORY_CICD,
// FIXME: DEPRECATED, remove in v11.0 vv
"fleet": AssetCategory_CATEGORY_INVENTORY,
// ^^
"inventory": AssetCategory_CATEGORY_INVENTORY,
"cicd": AssetCategory_CATEGORY_CICD,
}

// UnmarshalJSON parses either an int or a string representation of
Expand Down
30 changes: 15 additions & 15 deletions providers-sdk/v1/inventory/inventory.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions providers-sdk/v1/inventory/inventory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum State {
}

enum AssetCategory {
CATEGORY_FLEET = 0;
CATEGORY_INVENTORY = 0;
CATEGORY_CICD = 1;
}

Expand Down Expand Up @@ -64,7 +64,7 @@ message Asset {
// platform id detection mechanisms
repeated string id_detector = 31;

// indicator is this is a fleet asset or a CI/CD run
// indicator is this is an inventory object or a CI/CD run
AssetCategory category = 32;

repeated Asset related_assets = 33;
Expand Down
Loading