uyuni icon indicating copy to clipboard operation
uyuni copied to clipboard

Process date values in spacecmd api calls (bsc#1198903)

Open ycedres opened this issue 2 years ago • 1 comments

What does this PR change?

Inside the spacecmd command-line interface the api function was showing an error when trying to pass dates with the -A argument. Now it parses the dates and calls the API endpoint with a suitable parameter type.

An example:

api -A "sle-product-sles15-sp3-pool-x86_64,2022-05-20,2022-05-25" channel.software.listAllPackages

GUI diff

No difference.

  • [x] DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • [x] DONE

Test coverage

  • No tests: bugfix

  • [x] DONE

Links

Fixes #1198903 Tracks https://github.com/SUSE/spacewalk/issues/17671

  • [x] DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • [ ] No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • [ ] Re-run test "changelog_test"
  • [ ] Re-run test "backend_unittests_pgsql"
  • [ ] Re-run test "java_pgsql_tests"
  • [ ] Re-run test "schema_migration_test_pgsql"
  • [ ] Re-run test "susemanager_unittests"
  • [ ] Re-run test "javascript_lint"
  • [ ] Re-run test "spacecmd_unittests"

ycedres avatar Jun 01 '22 15:06 ycedres

@ycedres can you please add tests?

agraul avatar Jun 01 '22 15:06 agraul