Unable to update host's content source via hammer
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1488465
Refer to bugzilla for additional details.
Description of problem:
`hammer host update --content-source-id` seems to have no effect - command finishes successfully but content source is not changed on WebUI (currently it's the only place where it's possible to check content source due to #1488150 and #1488130 ).
Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 14
Steps to Reproduce:
1. Create a host (with or without content source specified, doesn't matter)
2. Update host's content source via hammer:
hammer host update --id="115" --content-source-id="23"
3. Go to WebUI, Hosts -> All hosts -> #host_name# -> Edit, check selected content source.
Although update command finished with successful message ('Host updated'), content source was not changed.
Content source was changed.
Refer to bugzilla for additonal details.
Fixes #21016 - Can update content source in host
Prior to this commit a simple call like
hammer host update --id=1 --content-source-id=2
would fail because the content facet nested attributes code would reject
updating any request that did not contain a content-view-id or a
lifecycle-environment-id. This code fixes that by updating the model to
say "if content facet is present update any changes that come in Else
check on cv-id and environment"