Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
/ pulp Public archive

django conversion - repo_groups urls #1670

Merged
merged 2 commits into from
Feb 24, 2015
Merged

Conversation

asmacdo
Copy link
Contributor

@asmacdo asmacdo commented Feb 20, 2015

Convert repo groups urls.

Hand testing, all identical where expected:
Includes a fix for BZ-1194421

GET /v2/repo_groups/
http://fpaste.org/185364/38587891/
POST /v2/repo_groups/
valid: http://fpaste.org/185372/59647142/
dupe: http://fpaste.org/185376/59826142/
invalid: http://fpaste.org/185377/85992414/

GET /v2/repo_groups/<repo_group_id>/
valid: http://fpaste.org/185379/86021314/
invalid: http://fpaste.org/185381/38602891/

DELETE /v2/repo_groups/<repo_group_id>/
valid: http://fpaste.org/185383/60646142/
invalid: http://fpaste.org/185386/23860786/

PUT /v2/repo_groups/<repo_group_id>/
valid id: http://fpaste.org/185390/38613831/
invalid id: http://fpaste.org/185392/23861529/
invalid params: http://fpaste.org/185393/61678142/

POST /v2/repo_groups/<repo_group_id>/actions/associate/
http://fpaste.org/185407/38634491/
POST /v2/repo_groups/<repo_group_id>/actions/unassociate/
http://fpaste.org/185409/42386356/
Test function
http://fpaste.org/185406/23863285/

GET /v2/repo_grous/<repo_group_id>/distributors/
This one includes a bugfix for BZ-1194421:
http://fpaste.org/188365/63810142/
POST /v2/repo_grous/<repo_group_id>/distributors/
http://fpaste.org/187792/43762811/

GET /v2/repo_grous/<repo_group_id>/distributors/<distributor_id>/
http://fpaste.org/187798/76869142/
GET /v2/repo_grous/<repo_group_id>/distributors/<distributor_id>/ with fake id
http://fpaste.org/187802/14243770/

PUT /v2/repo_grous/<repo_group_id>/distributors/<distributor_id>/
Valid: http://fpaste.org/187820/14243794/
Invalid body: http://fpaste.org/187848/38209114/
Invalid repo group id or dist id: http://fpaste.org/188373/64561142/

DELETE /v2/repo_grous/<repo_group_id>/distributors/<distributor_id>/
http://fpaste.org/188224/44922014/

POST /v2/repo_groups/<repo_group_id>/actions/publish/
http://fpaste.org/188339/44601801/

@pulpbot
Copy link
Member

pulpbot commented Feb 20, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/279/
Test PASSed.

return generate_json_response_with_pulp_encoder(groups)

@auth_required(authorization.CREATE)
@json_body_allow_empty
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 in this case it should require the body, since for repo group creation you need at least the 'id' which is the required key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as #1670 (comment).

@ipanova ipanova self-assigned this Feb 23, 2015
:param distributor_id: distributor to get
:type distributor_id: str

:return: response containing a serialized dict of the added distributor
Copy link
Member

Choose a reason for hiding this comment

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

response containing a serialized dict of requested distributor

@pulpbot
Copy link
Member

pulpbot commented Feb 23, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/284/
Test PASSed.

@pulpbot
Copy link
Member

pulpbot commented Feb 23, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/285/

Build result: FAILURE

[...truncated 7 lines...]Fetching upstream changes from https://github.com/pulp/pulp.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/pulp/pulp.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse refs/remotes/origin/pr/1670/merge^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/pr/1670/merge^{commit} # timeout=10Checking out Revision c066f5e92510852331b14306658c363046defbae (refs/remotes/origin/pr/1670/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f c066f5e92510852331b14306658c363046defbaeFirst time build. Skipping changelog.Triggering rhel7-npTriggering f21-npTriggering rhel6-npTriggering rhel5-npTriggering f20-nprhel7-np completed with result FAILUREf21-np completed with result FAILURErhel6-np completed with result FAILURErhel5-np completed with result SUCCESSf20-np completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 secondSetting status of be59e8f to FAILURE with url https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/unittest-pulp-pr/285/ and message: Merged build finished.
Test FAILed.

@pulpbot
Copy link
Member

pulpbot commented Feb 23, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/286/

Build result: FAILURE

[...truncated 7 lines...]Fetching upstream changes from https://github.com/pulp/pulp.git > git --version # timeout=10 > git fetch --tags --progress https://github.com/pulp/pulp.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse refs/remotes/origin/pr/1670/merge^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/pr/1670/merge^{commit} # timeout=10Checking out Revision 57e0408 (refs/remotes/origin/pr/1670/merge) > git config core.sparsecheckout # timeout=10 > git checkout -f 57e0408f08ff274c09c9682bce5072ebe1315491First time build. Skipping changelog.Triggering rhel7-npTriggering f21-npTriggering rhel6-npTriggering rhel5-npTriggering f20-nprhel7-np completed with result FAILUREf21-np completed with result FAILURErhel6-np completed with result FAILURErhel5-np completed with result SUCCESSf20-np completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 1 secondSetting status of 73a040c to FAILURE with url https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/unittest-pulp-pr/286/ and message: Merged build finished.
Test FAILed.

cursor = collection.find({})
groups = []
for group in cursor:
group['_href'] = reverse('repo_group_resource', kwargs={'repo_group_id': group['id']})
Copy link
Member

Choose a reason for hiding this comment

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

by the way, since reverse of 'repo_group_resource' is repeated 4 times you can do something like here c30f096#diff-113ebb31dc6faa5d855700dc67532dddR162

same with 'repo_group_distributor_resource'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense but it is replacing a one line call that is unlikely to change. I would prefer to leave as since it will be more transparent.

@pulpbot
Copy link
Member

pulpbot commented Feb 24, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/291/
Test PASSed.

@ipanova
Copy link
Member

ipanova commented Feb 24, 2015

LGTM. well done!

@ipanova ipanova assigned asmacdo and unassigned ipanova Feb 24, 2015
@ipanova ipanova added the LGTM label Feb 24, 2015
@pulpbot
Copy link
Member

pulpbot commented Feb 24, 2015

Refer to this link for build results (access rights to CI server needed):
https://pulp-jenkins.rhev-ci-vms.eng.rdu2.redhat.com//job/unittest-pulp-pr/294/
Test PASSed.

asmacdo added a commit that referenced this pull request Feb 24, 2015
django conversion - repo_groups urls
@asmacdo asmacdo merged commit 508df83 into pulp:master Feb 24, 2015
@asmacdo asmacdo deleted the django-repo-groups branch April 27, 2015 20:37
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.

3 participants