Project

General

Profile

Bug #4311

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

Added by Tomáš Strachota over 5 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

Has duplicate Hammer CLI - Bug #4306: Unable to successfully perform a CLI command that uses a nested resource.Closed2014-02-10

Associated revisions

Revision d31f0a47 (diff)
Added by Tomas Strachota over 5 years ago

Fixes #4311 - searchables, id resolver and option builders

Revision ad4b9438 (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - read and write commands merged

Revision fcba1710 (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - option builders

Revision 5c086e6a (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - read and write commands merged

Revision 34669743 (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - updated documentation

Revision 168fb89b (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - fixes and additional tests

Revision 1a4b1e04 (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - get_resource_id refactoring

Revision 4e6883bc (diff)
Added by Tomas Strachota over 5 years ago

Refs #4311 - test fixes

Revision 3f28451b (diff)
Added by Tomas Strachota over 5 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 (diff)
Added by Tomas Strachota over 5 years ago

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

Revision c22b05ca
Added by Tomas Strachota over 5 years ago

Merge pull request #105 from tstrachota/id_resolv

Refs #4311 - name -> id

Revision e28e2af9
Added by Tomas Strachota over 5 years ago

Merge pull request #112 from tstrachota/id_resolv

Fixes #4311 - name -> id

History

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

  • Target version set to 1.8.4

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

  • Status changed from Assigned to Ready For Testing

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

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

#5 Updated by Dmitri Dolguikh over 5 years ago

  • Target version changed from 1.8.4 to 1.8.3

#6 Updated by Dmitri Dolguikh over 5 years ago

  • Target version changed from 1.8.3 to 1.8.4

#7 Updated by Dmitri Dolguikh over 5 years ago

  • Target version changed from 1.8.4 to 1.8.3

#8 Updated by Anonymous over 5 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