-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add basic tasking request creation #48
Add basic tasking request creation #48
Conversation
capella_console_client/tasking.py
Outdated
"windowClose": window_close, | ||
"collectionTier": collection_tier, | ||
"productCategory": product_category, | ||
"archiveHoldback": archive_holdback, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd make archiveHoldback
, customAttribute1
and customAttribute2
conditional
something like
# above list
CONDITIONAL_PROPERTIES = [..]
# might want to default archive holdback to None
cond_properties = {_snake_to_camel(k): loc[k] for k in CONDITIONAL_PROPERTIES if k in loc and loc[k] is None}
if cond_properties:
payload["properties"].update(cond_properties)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So archive holdback currently defaults to the string "none"; were you wanting to default to not passing a value at all? I believe that since the others default to None
there won't be anything posted if they're not defined by the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@log0s - looking pretty close.
Only considerable thing that's missing are some examples for the docs (https://capella-console-client.readthedocs.io/en/main/pages/example_usage.html)
-> new sections (1 for create tasking request and 1 for create repeat request) in docs/pages/example_usage.rst
would be great
Added some stuff in. Let me know if it looks good or if there's something else you'd like there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - looks great
No description provided.