Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for exporting and importing reports #18284

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

branic
Copy link
Contributor

@branic branic commented Dec 12, 2018

These rake scripts and classes provide functionality for exporting/importing of the following ManageIQ object types:

  • Reports

This PR uses the framework that was implemented for PRs #14126, #15256, #16717, and others to export/import other ManageIQ object types.

These scripts are based on the CFME RH Consulting Scripts and are used by Red Hat consultants to enable storing customizations in Git and maintaining customizations between environments (e.g. dev/qa/prod) for an SDLC lifecycle.

Links [Optional]

Steps for Testing/QA [Optional]

Exporting

  1. Create a directory for the exports
mkdir /tmp/reports
  1. Export user defined reports
vmdb
bin/rake evm:export:reports -- --directory /tmp/reports

Importing

  1. Import all report yaml files in a directory
# vmdb
# bin/rake evm:import:reports -- --source /tmp/reports
  1. or Import specific report yaml file
# vmdb
# bin/rake evm:import:report -- --source /tmp/reports/Test_Report.yaml

@branic
Copy link
Contributor Author

branic commented Dec 12, 2018

/cc @gmcculloug @gtanzillo

@gtanzillo
Copy link
Member

@branic I just got to this today. Looks good so far. Need to looks at the tests...

@@ -0,0 +1,67 @@
describe TaskHelpers::Exports::ServiceDialogs do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be TaskHelpers::Exports::Reports here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, you're correct. That's what I get for copy/pasting.

@gtanzillo
Copy link
Member

@branic This looks good. Can you please take care of the rubocop issues with trailing spaces in the report yamls? Once that's done I'll merge. Thanks 👍

@miq-bot
Copy link
Member

miq-bot commented Dec 20, 2018

Checked commit branic@5ee0142 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
6 files checked, 0 offenses detected
Everything looks fine. 👍

@branic
Copy link
Contributor Author

branic commented Dec 20, 2018

@gtanzillo Fixed the rubocop trailing spaces and squashed all the commits into one.

Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Thanks @branic

@gtanzillo gtanzillo added this to the Sprint 102 Ending Jan 7, 2019 milestone Dec 20, 2018
@gtanzillo gtanzillo self-assigned this Dec 20, 2018
@gtanzillo gtanzillo merged commit 73e075e into ManageIQ:master Dec 20, 2018
@branic branic deleted the reports_export_import branch December 20, 2018 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants