Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SWATCH-1929: Replace rhsm.VM_HOST_UUID by system profile.virtual_host…
…_uuid (#3043) Jira issue: [SWATCH-1929](https://issues.redhat.com/browse/SWATCH-1929) ## Description Add support for the recently added system profile fact virtual_host_uuid (RedHatInsights/inventory-schemas#121) which replaces legacy facts rhsm.VM_HOST_UUID. ## Testing 1.- podman-compose up 2.- Create hosts for orgId=16790890 in Insights database ``` ./bin/insert-mock-hosts --hbi --clear --org 16790890 --account account123 --num-guests 1 --hypervisor-id 123456 ``` 3.- DEV_MODE=true SUBSCRIPTION_SYNC_ENABLED=true ENABLE_SYNCHRONOUS_OPERATIONS=true ./gradlew :bootRun 4.- Perform tally snapshot: ```bash http PUT ":8000/api/rhsm-subscriptions/v1/internal/rpc/tally/snapshots/16790890" \ Origin:console.redhat.com \ x-rh-swatch-synchronous-request:true \ x-rh-swatch-psk:placeholder \ x-rh-identity:$(echo -n '{"identity":{"account_number":"","type":"User","user":{"is_org_admin":true},"internal":{"org_id":"16790890"}}}' | base64 -w 0) ``` 5.- Query the created hosts in the swatch database and confirm the virtual_host_uuid has been used: `SELECT hypervisor_uuid FROM hosts;` It should be 123456.
- Loading branch information
Showing
9 changed files
with
19 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,6 @@ properties: | |
type: array | ||
items: | ||
$ref: "hbi-network-interface.yaml" | ||
virtual_host_uuid: | ||
type: string | ||
|
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