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 create Git backed automation domain #571

Merged
merged 4 commits into from
Apr 24, 2019

Conversation

jvlcek
Copy link
Member

@jvlcek jvlcek commented Apr 1, 2019

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1600961

This PR, along with PR manageiq-ui-classic/5416 will provide the support to allow the API to be used to create a Git backed automation domain.

Steps for Testing/QA [Optional]

Create a GIT based automate domain repository.

Use the API to issue a POST command to `/api/automate_domains with data similar to:
{
"git_url": "https://gitlab.exampledomain.com/gitlab_repo/AwesomeDomain",
"ref_type": "branch",
"ref_name": "master",
}

e.g.:

cat action_create_from_git
{
"git_url": "https://gitlab.exampledomain.com/gitlab_repo/AwesomeDomain",
"ref_type": "branch",
"ref_name": "master",
}
curl -k --user admin:SECRET_PASSWORD -i -X POST -H "Accept: application/json" -d @action_create_from_git https://my-miq-host/api/automate_domains

@jvlcek
Copy link
Member Author

jvlcek commented Apr 1, 2019

@miq-bot add_label enhancement
@miq-bot add_label bug
@miq-bot add_label hammer/no

@jvlcek
Copy link
Member Author

jvlcek commented Apr 1, 2019

@mkanoor Please review

@jvlcek
Copy link
Member Author

jvlcek commented Apr 8, 2019

@Fryguy, @abellotti and @mkanoor Please review.

Copy link
Member

@abellotti abellotti 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 Joe, a couple of questions/minor changes.


begin
unless GitBasedDomainImportService.available?
raise "Git owner role must enabled to import git repositories"
Copy link
Member

Choose a reason for hiding this comment

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

raise BadRequestError, "Git owner ...."

Copy link
Member Author

Choose a reason for hiding this comment

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

@abellotti Got it.

@miq-bot
Copy link
Member

miq-bot commented Apr 8, 2019

Some comments on commits jvlcek/manageiq-api@7dc2970~...7b07dd3

spec/requests/automate_domains_spec.rb

  • ⚠️ - 114 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Apr 8, 2019

Checked commits jvlcek/manageiq-api@7dc2970~...7b07dd3 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 1 offense detected

app/controllers/api/automate_domains_controller.rb

@jvlcek
Copy link
Member Author

jvlcek commented Apr 8, 2019

Note: This PR relies on manageiq-ui-classic/5416

@abellotti
Copy link
Member

abellotti commented Apr 9, 2019

LGTM!! Thanks @jvlcek for the API enhancement. 👍 @Fryguy and @mkanoor can you lend some 👀 here. Thanks.

@abellotti abellotti self-assigned this Apr 9, 2019
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 👍

@gtanzillo gtanzillo added this to the Sprint 110 Ending Apr 29, 2019 milestone Apr 24, 2019
@gtanzillo gtanzillo merged commit f12cf95 into ManageIQ:master Apr 24, 2019
@ghost
Copy link

ghost commented Apr 29, 2019

Fixes #354

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.

5 participants