ChameleonCloud / python-chi

Python client for the Chameleon testbed
Apache License 2.0
4 stars 4 forks source link

add some idempotent methods #24

Closed msherman64 closed 2 years ago

msherman64 commented 3 years ago

resolves issue #23

These are examples / stubs for idempotent commands, for each of lease, server, and container create. The use case is for jupyter notebooks that will be re-run repeatedly, and should converge on some state.

Mark-Powers commented 2 years ago

Less branchy and still covers the same bases. I'm not super opinionated on this though so I do approve unless @Mark-Powers strongly prefers to make these changes.

This is a great solution, and it helps a lot with readability in case we want to make any changes in the future. @willtholke could you update the methods with this pattern?