Bug #4311

Name searches don't work when there are other parameters in the search route

Added by Tomáš Strachota over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Hammer core
Target version:Foreman - Sprint 23
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

Search by name works fine when the resource is searchable globally.
Eg.

hammer architecture info --name i386
# hits /api/architectures?search= ...

The problem occurs when the name must be searched in scope of some other resource, eg. org:

hammer sync_plan info --name test --organization-id ACME_Corporation
# hits /api/organizations/ACME_Corporation/sync_plans?search= ...

The search function doesn't have access to the organization id and the api call fails with "missing parameter" exception.


Related issues

Duplicated by Hammer CLI - Bug #4306: Unable to successfully perform a CLI command that uses a ... Closed 02/10/2014

Associated revisions

Revision d31f0a47
Added by Tomas Strachota over 3 years ago

Fixes #4311 - searchables, id resolver and option builders

Revision ad4b9438
Added by Tomas Strachota over 3 years ago

Refs #4311 - read and write commands merged

Revision fcba1710
Added by Tomas Strachota over 3 years ago

Refs #4311 - option builders

Revision 5c086e6a
Added by Tomas Strachota over 3 years ago

Refs #4311 - read and write commands merged

Revision 34669743
Added by Tomas Strachota over 3 years ago

Refs #4311 - updated documentation

Revision 168fb89b
Added by Tomas Strachota over 3 years ago

Refs #4311 - fixes and additional tests

Revision 1a4b1e04
Added by Tomas Strachota over 3 years ago

Refs #4311 - get_resource_id refactoring

Revision 4e6883bc
Added by Tomas Strachota over 3 years ago

Refs #4311 - test fixes

Revision 3f28451b
Added by Tomas Strachota over 3 years ago

Refs #4311 - single resource command, associated list command

Ther are solving the issues with selecting correct api route when there is more
than one possible.

Revision 72c5d232
Added by Tomas Strachota over 3 years ago

Refs #4311 - additional tests for the id resolver and option builders

Revision c22b05ca
Added by Tomas Strachota over 3 years ago

Merge pull request #105 from tstrachota/id_resolv

Refs #4311 - name -> id

Revision e28e2af9
Added by Tomas Strachota over 3 years ago

Merge pull request #112 from tstrachota/id_resolv

Fixes #4311 - name -> id

History

#1 Updated by Tomáš Strachota over 3 years ago

  • Target version set to Sprint 22

#3 Updated by Tomáš Strachota over 3 years ago

  • Status changed from Assigned to Ready For Testing

#4 Updated by Tomáš Strachota over 3 years ago

  • Duplicated by Bug #4306: Unable to successfully perform a CLI command that uses a nested resource. added

#5 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#6 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 23 to Sprint 22

#7 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#8 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Applied in changeset hammer-cli-foreman|commit:d31f0a4718b6b6e31a1a860747f6d509d0b61f93.

Also available in: Atom PDF