Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

feat: add V2 support-scheduler #421

Merged
merged 1 commit into from
Nov 8, 2021
Merged

feat: add V2 support-scheduler #421

merged 1 commit into from
Nov 8, 2021

Conversation

siggiskulason
Copy link

This commit adds support for support-scheduler endpoints:

  • interval [add,name,list,rm,update]
  • intervalaction [add,name,list,rm,update]

Fix #388

Signed-off-by: Siggi Skulason siggi.skulason@canonical.com

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-cli/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?) WIll be added in separate PR
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?) Will be added in a separate PR

Testing Instructions

  1. Install EdgeXFoundry and start up support-scheduler service
  2. Build the CLI from this PR with make build and test the commands as follows:

interval [add/list/name/rm/update]

# print help
./bin/edgex-cli interval

# add interval
./bin/edgex-cli interval add -h
./bin/edgex-cli interval add -n "hourly" -i "1h"

# get the new interval
./bin/edgex-cli interval name -h
./bin/edgex-cli interval name -n "hourly"
./bin/edgex-cli interval name -n "hourly" -v
./bin/edgex-cli interval name -n "hourly" -j | jq '.'

# list all intervals
./bin/edgex-cli interval list -h
./bin/edgex-cli interval list
./bin/edgex-cli interval list -v
./bin/edgex-cli interval list  -j | jq '.'

# update interval
./bin/edgex-cli interval update -h
./bin/edgex-cli interval update -n "hourly" -i "1m"
./bin/edgex-cli interval name -n "hourly" -v

# remove interval
./bin/edgex-cli interval rm -h
./bin/edgex-cli interval rm  -n "hourly" 
./bin/edgex-cli interval name -n "hourly" 
./bin/edgex-cli interval list

interval action [add/list/name/rm/update]

# print help
./bin/edgex-cli intervalaction

# add interval action
./bin/edgex-cli intervalaction add -h
./bin/edgex-cli interval add -n "hourly" -i "1h"
./bin/edgex-cli intervalaction add -n "name01" -i "midnight" -a "{\"type\": \"REST\", \"host\": \"192.168.0.102\", \"port\": 8080, \"httpMethod\": \"GET\"}"

# get the new interval action
./bin/edgex-cli intervalaction name -h
./bin/edgex-cli intervalaction name -n "name01"
./bin/edgex-cli intervalaction name -n "name01" -v
./bin/edgex-cli intervalaction name -n "name01" -j | jq '.'

# list all interval actions
./bin/edgex-cli intervalaction list -h
./bin/edgex-cli intervalaction list
./bin/edgex-cli intervalaction list -v
./bin/edgex-cli intervalaction list  -j | jq '.'

# update interval action
./bin/edgex-cli intervalaction update -h
./bin/edgex-cli intervalaction update -n "name01" --admin-state "LOCKED"
./bin/edgex-cli intervalaction name -n "name01" -v

# remove interval action
./bin/edgex-cli intervalaction rm -h
./bin/edgex-cli intervalaction rm  -n "name01" 
./bin/edgex-cli intervalaction name -n "name01" 
./bin/edgex-cli intervalaction list

New Dependency Instructions (If applicable)

This commit adds support for support-scheduler endpoints:

- interval [add,name,list,rm,update]
- intervalaction [add,name,list,rm,update]

Fix #388

Signed-off-by: Siggi Skulason <siggi.skulason@canonical.com>
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@siggiskulason siggiskulason merged commit 556616e into edgexfoundry:main Nov 8, 2021
@siggiskulason siggiskulason deleted the add-support-schecduler-v2 branch December 3, 2021 13:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade CLI to V2 - update interval commands
2 participants