Skip to content

Commit ddd80a1

Browse files
authored
Updated inv with user consent (#998)
1 parent 662daf5 commit ddd80a1

21 files changed

Lines changed: 1841 additions & 1557 deletions

File tree

inventory/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.35.0-dev
1+
2.35.0

inventory/api/compute/v1/compute.proto

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,15 @@ message HostResource {
239239
(buf.validate.field).string = {max_bytes: 1024},
240240
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
241241
]; // textual message that describes dns_suffix for ACM mode.
242-
242+
// Six-digit user-consent code entered by the operator from the device screen.
243+
// Written by orch-cli via APIv2 when current_kvm_state = KVM_STATE_AWAITING_CONSENT.
244+
// Consumed (read then cleared) by kvm-manager.
245+
// TODO: Remove persist desired_consent_code in the inventory DB in a future release.
246+
string desired_consent_code = 106 [
247+
(ent.field) = {optional: true},
248+
(buf.validate.field).string = {pattern: "^[0-9]{6}$"},
249+
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
250+
];
243251
string tenant_id = 100 [
244252
(ent.field) = {
245253
immutable: true

inventory/docs/api/inventory.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,7 @@ textual message that describes the AMT status of Host. Set by DM RM only. |
588588
| user_lvm_size | [uint32](#uint32) | | LVM size in GB. |
589589
| amt_control_mode | [AmtControlMode](#compute-v1-AmtControlMode) | | coming from user selection |
590590
| amt_dns_suffix | [string](#string) | | textual message that describes dns_suffix for ACM mode. |
591+
| desired_consent_code | [string](#string) | | Six-digit user-consent code entered by the operator from the device screen. Written by orch-cli via APIv2 when current_kvm_state = KVM_STATE_AWAITING_CONSENT. Consumed (read then cleared) by kvm-manager. TODO: Remove persist desired_consent_code in the inventory DB in a future release. |
591592
| tenant_id | [string](#string) | | Tenant Identifier |
592593
| created_at | [string](#string) | | Creation timestamp |
593594
| updated_at | [string](#string) | | Update timestamp |

inventory/docs/inventory-er-diagram.svg

Lines changed: 837 additions & 833 deletions
Loading

inventory/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
github.com/hashicorp/vault/api v1.22.0
2727
github.com/hashicorp/vault/api/auth/kubernetes v0.10.0
2828
github.com/iancoleman/strcase v0.3.0
29-
github.com/jackc/pgx/v5 v5.8.0
29+
github.com/jackc/pgx/v5 v5.9.0
3030
github.com/labstack/echo-contrib v0.50.1
3131
github.com/labstack/echo/v4 v4.15.1
3232
github.com/lib/pq v1.11.2

inventory/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
189189
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
190190
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
191191
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
192-
github.com/jackc/pgx/v5 v5.8.0 h1:TYPDoleBBme0xGSAX3/+NujXXtpZn9HBONkQC7IEZSo=
193-
github.com/jackc/pgx/v5 v5.8.0/go.mod h1:QVeDInX2m9VyzvNeiCJVjCkNFqzsNb43204HshNSZKw=
192+
github.com/jackc/pgx/v5 v5.9.0 h1:T/dI+2TvmI2H8s/KH1/lXIbz1CUFk3gn5oTjr0/mBsE=
193+
github.com/jackc/pgx/v5 v5.9.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4=
194194
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
195195
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
196196
github.com/jhump/protoreflect v1.17.0 h1:qOEr613fac2lOuTgWN4tPAtLL7fUSbuJL5X5XumQh94=

inventory/internal/ent/hostresource.go

Lines changed: 12 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inventory/internal/ent/hostresource/hostresource.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inventory/internal/ent/hostresource/where.go

Lines changed: 80 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inventory/internal/ent/hostresource_create.go

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)