Skip to content

fix status value options in subscriptions CLI #821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

jreiberkyle
Copy link
Contributor

@jreiberkyle jreiberkyle commented Dec 8, 2022

Related Issue(s):

Closes # 815

Proposed Changes:

For inclusion in changelog (if applicable):

  1. fix status value options in planet subscriptions list

Not intended for changelog:

Diff of User Interface

Old behavior:

planet-client-python$> planet subscriptions list --limit 1 | jq .status
"running"
planet-client-python$> planet subscriptions list --status running
Usage: planet subscriptions list [OPTIONS]
Try 'planet subscriptions list --help' for help.

Error: Invalid value for '--status': 'running' is not one of 'created', 'queued', 'processing', 'failed', 'success'.
planet-client-python$> planet subscriptions list --status success
Error: {"error":{"reason":"Request failed schema validation","details":["parameter 'status' in query has an error: JSON value is not one of the allowed values"]}}

New behavior:

planet-client-python$> planet subscriptions list --status running
{"name": "test", "source": {"type": "catalog", "parameters": {"asset_types": ["ortho_visual"], "end_time": "2023-11-01T00:00:00Z", "geometry": <REDACTED>, "type": "Polygon"}, "item_types": ["SkySatCollect"], "start_time": "2018-10-01T00:00:00Z"}}, "tools": [{"type": "clip", "parameters": {"aoi": {"coordinates": <REDACTED>, "type": "Polygon"}}}], "delivery": {"type": "google_cloud_storage", "parameters": {"bucket": "<REDACTED>", "credentials": "<REDACTED>"}}, "created": "2022-11-17T20:41:01.094277Z", "_links": {"_self": "https://api.planet.com/subscriptions/v1/abebfd94-4845-46a1-a96e-a911ca9dbf9b"}, "status": "running", "id": "abebfd94-4845-46a1-a96e-a911ca9dbf9b", "updated": "2022-11-17T20:41:10.158928Z"}
planet-client-python$> planet subscriptions list --status invalid
Usage: planet subscriptions list [OPTIONS]
Try 'planet subscriptions list --help' for help.

Error: Invalid value for '--status': 'invalid' is not one of 'running', 'cancelled', 'preparing', 'pending', 'completed', 'suspended', 'failed'.

PR Checklist:

  • This PR is as small and focused as possible
  • If this PR includes proposed changes for inclusion in the changelog, the title of this PR summarizes those changes and is ready for inclusion in the Changelog.
  • I have updated docstrings for function changes and docs in the 'docs' folder for user interface / behavior changes
  • This PR does not break any examples or I have updated them

(Optional) @mentions for Notifications:

@jreiberkyle jreiberkyle requested a review from sgillies December 8, 2022 00:51
@jreiberkyle jreiberkyle self-assigned this Dec 8, 2022
@jreiberkyle jreiberkyle added this to the 2.0b1: Core 'MVP' milestone Dec 8, 2022
@jreiberkyle
Copy link
Contributor Author

FYI @sgillies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant