Bug 1709450 - hammer import-templates does not update settings when run repeatedly
Summary: hammer import-templates does not update settings when run repeatedly
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-13 15:36 UTC by Peter Ondrejka
Modified: 2019-10-29 15:24 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-29 15:24:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Peter Ondrejka 2019-05-13 15:36:53 UTC
Description of problem:
When running hammer import-templates several times with changed parameters, the templates are not updated -- settings from the first run still hold

Version-Release number of selected component (if applicable):
Satellite 6.5, 6.6 as well

How reproducible:
always

Steps to Reproduce:
1. run the following command

hammer import-templates --prefix 'Community - '  \
                        --filter '.*statuses$' \
                        --branch ea0a9cdac724a49aa6d0b89108927c6cd2c7cc50  \

2. Note that new report template is displayed in Satellite UI under Any Org / Any Location context
3. Rerun the command with org and loc specified:

hammer import-templates --prefix 'Community - '  \
                        --filter '.*statuses$' \
                        --branch ea0a9cdac724a49aa6d0b89108927c6cd2c7cc50  \
                        --organization 'Default Organization' \
                        --location 'Default Location'

Import successful message is displayed.

4. View Monitor > Report Templates under Default Organization and Default Location the template is not displayed, it is still under any context. It is necessary to delete the previous import to have the next run actually complete. 

Actual results:
described above

Expected results:
Either the parameters should be updated on repeating run, or a message should be displayed with warning that the update was not done

Additional info:

Comment 4 Marek Hulan 2019-05-17 13:14:47 UTC
You need to use --organization-ids, not --organization-id, that is for setting the current context. The command help says " --organization-ids ORGANIZATION_IDS       REPLACE organizations with given ids."  The organization-id only says " --organization-id ORGANIZATION_ID         Organization ID" which is not overly helpful but I think we track there elsewhere already. Mind to retest with -ids param and close if it works?

Comment 5 Peter Ondrejka 2019-10-29 15:24:20 UTC
works with --organizations --locations, closing with help clarification tracked in different bz


Note You need to log in before you can comment on or make changes to this bug.