Bug 1110012
Summary: | Deleting content view version yields undefined method `search_type' for Katello::PuppetModule:Class | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> |
Component: | Hammer | Assignee: | David Davis <daviddavis> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Tazim Kolhar <tkolhar> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.3 | CC: | cwelton, daviddavis, jmontleo, tkolhar |
Target Milestone: | Unspecified | ||
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://projects.theforeman.org/issues/6250 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-07-02 14:07:05 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Og Maciel
2014-06-16 20:16:13 UTC
forgot to mention that I also associated the CV (version 1) to an activation key I'm not quite understanding what the content-view-id option is, where it came from, or why it was added. I think there were a bunch of these options added to content view commands that weren't fully tested. Created redmine issue http://projects.theforeman.org/issues/6250 from this bug Moving to POST since upstream bug http://projects.theforeman.org/issues/6250 has been closed # hammer content-view info --name con_view_act_key --organization ACME_Corporation ID: 139 Name: con_view_act_key Label: con_view_act_key Composite: Description: Organization: ACME_Corporation Repositories: Puppet Modules: Environments: 1) ID: 1 Name: Library 2) ID: 45 Name: DEV Versions: 1) ID: 127 Version: 1 Published: 2014/06/19 07:39:33 Components: # hammer content-view version delete --id 127 --content-view-id 139 --organization-id 1 Could not delete the content view: Cannot delete version while it is in environments: Library When I try to delete lifecycle environments from Version I get error in UI. Have filed the https://bugzilla.redhat.com/show_bug.cgi?id=1111070 Tazim, that's the intended behavior. You have to first remove the content view version from the environments in order to delete it. To remove environments from the content view in the CLI: hammer content-view remove-from-environment --environment-id 1 --id 139 Also, there's an remove command that will both remove any associations automatically including the environments and versions. In this case, it would be: hammer content-view remove --content-view-version-ids 127 --id 139 --environment-ids "1,45" Or even shortened: hammer content-view remove --content-view-version-ids 127 --id 139 Unable to remove environment # hammer content-view remove-from-environment --environment Library --id 2 Could not remove the content view from environment: Error: environment found more than once # hammer content-view remove --content-view-version-ids 2 --id 2 [................................................................. ] [91%] Task d284cd79-db1a-47b6-a66c-f0168bdbbc85: error Couldn't find Katello::ContentViewHistory with id=2 # hammer content-view info --name con_view --organization ACME_Corporation ID: 2 Name: con_view Label: con_view Composite: Description: Organization: ACME_Corporation Repositories: Puppet Modules: 1) ID: 1 UUID: 30c3ef3d-892d-40e2-99a2-88f2d361bbbb Name: motd Author: jeffmccune Created: 2014/06/20 08:38:35 Updated: 2014/06/20 08:38:35 Environments: Versions: Components: Here's the issue for c#12. In the mean time you can use --environment-id instead of --environment. https://bugzilla.redhat.com/show_bug.cgi?id=1111231 And the fix for c#13 is being included with this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1110020 See this PR for more info: https://github.com/Katello/katello/pull/4299 VERIFIED: # hammer content-view version delete --id 3 --content-view-id 3 --organization-id 1 [......................................................................] [100%] Task 30c6a1c2-a6a4-4b3a-9cc9-3128f79fb0f5: success # hammer content-view info --name con_view_test --organization ACME_Corporation ID: 3 Name: con_view_test Label: con_view_test Composite: Description: Organization: ACME_Corporation Repositories: Puppet Modules: Environments: Versions: Components: This was delivered with 6.0.3, which is the Satellite 6 Beta. |