cli icon indicating copy to clipboard operation
cli copied to clipboard

Implement Periodic Scheduler in the CLI

Open darkofabijan opened this issue 6 years ago • 7 comments

https://github.com/renderedtext/s2-public-api-docs

CLI:

sem get schedules
sem get schedule <SCHEDULE_NAME>
sem edit schedule <SCHEDULE_NAME>
sem create schedule <SCHEDULE_NAME>
sem delete schedule <SCHEDULE_NAME>
sem apply -f <PATH_TO_FILE>
sem create -f <PATH_TO_FILE>

darkofabijan avatar Mar 06 '19 09:03 darkofabijan

Listing all schedules is not yet supported by the API if I have read the docs correctly:

sem get schedules

shiroyasha avatar Mar 06 '19 10:03 shiroyasha

Hmm yea. @DamjanBecirovic can we drop this "project_id" being required? :) https://github.com/renderedtext/s2-public-api-docs#list--schedules

darkofabijan avatar Mar 06 '19 10:03 darkofabijan

One more thing, we also need:

sem create -f <PATH_TO_FILE>

shiroyasha avatar Mar 06 '19 10:03 shiroyasha

@shiroyasha tnx. Updated description.

darkofabijan avatar Mar 06 '19 10:03 darkofabijan

What's the difference between create -f and apply -f ?

vendelin8 avatar Mar 06 '19 10:03 vendelin8

@vendelin8 Valid question.

create -f creates a new, non-existing, resource. apply -f updates an existing resource.


We had plans to expand apply -f to support a logic like:

if resource.exists?
  update(resource)
else
  create(resource)
end

but this has not yet been implemented.

shiroyasha avatar Mar 06 '19 10:03 shiroyasha

Ok, thanks.

vendelin8 avatar Mar 06 '19 10:03 vendelin8