Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

1237 - distributor config#262

Merged
ammaritiz merged 1 commit into
pulp:2.13-devfrom
ammaritiz:1237-distributor-config
Jun 7, 2017
Merged

1237 - distributor config#262
ammaritiz merged 1 commit into
pulp:2.13-devfrom
ammaritiz:1237-distributor-config

Conversation

@ammaritiz
Copy link
Copy Markdown
Contributor

Added validation to check if distributor_config is specified while associating distributor to repository.

Issue 1237

@pulpbot
Copy link
Copy Markdown
Member

pulpbot commented Jun 2, 2017

Can one of the admins verify this patch?

1 similar comment
@pulpbot
Copy link
Copy Markdown
Member

pulpbot commented Jun 2, 2017

Can one of the admins verify this patch?

Copy link
Copy Markdown
Member

@dkliban dkliban left a comment

Choose a reason for hiding this comment

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

Looks like you created your branch from master instead of 2.13-dev. There are 12 commits in this PR when only 1 is expected.

Copy link
Copy Markdown
Contributor

@werwty werwty left a comment

Choose a reason for hiding this comment

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

@ammaritiz Thanks for this PR! 🎉
Please rebase this change to the 2.13-dev branch to avoid merging in changes from master.

:rtype: tuple of length two. Either (False, str) or (True, None)
"""
path = config.get(constants.CONFIG_INSTALL_PATH)
if not path:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like path is already being validated on line 100.
It definitely makes sense for the puppet install distributor to check that a install_path is provided so maybe just update the return value on line 102

"""
path = config.get(constants.CONFIG_INSTALL_PATH)
if not path:
return False, _('config not specified')
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The error message should be clearer, something like:
"An install_path has to be specified for the puppet install distributor."

@ammaritiz ammaritiz force-pushed the 1237-distributor-config branch 4 times, most recently from 0c9b0a1 to 3a8ba60 Compare June 2, 2017 18:08
@werwty
Copy link
Copy Markdown
Contributor

werwty commented Jun 2, 2017

@ammaritiz ammaritiz force-pushed the 1237-distributor-config branch 2 times, most recently from f304b49 to af533cd Compare June 2, 2017 18:20
@ammaritiz
Copy link
Copy Markdown
Contributor Author

I have made the necessary changes. Please review.

@bmbouter
Copy link
Copy Markdown
Member

bmbouter commented Jun 2, 2017

@ammaritiz This PR looks good. Consider adjusting the commit message to adhere to this form which has line wrapping.

Config validation was returning True instead of False when a distributor_config
was not specified while associating a distributor to a repository.

closes #1237
https://pulp.plan.io/issues/1237
@ammaritiz ammaritiz force-pushed the 1237-distributor-config branch from af533cd to 34e1d5b Compare June 2, 2017 20:15
@dkliban
Copy link
Copy Markdown
Member

dkliban commented Jun 7, 2017

ok test

@ammaritiz ammaritiz merged commit 29b537a into pulp:2.13-dev Jun 7, 2017
@ammaritiz ammaritiz deleted the 1237-distributor-config branch June 7, 2017 14:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants