Skip to content

Add create/delete commands for device/thing tags [IOT-1481] #53

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 8 commits into from
Nov 8, 2021

Conversation

polldo
Copy link
Contributor

@polldo polldo commented Nov 4, 2021

Motivation

As per #48 we want to introduce tags for things and devices. This pr implements the create and delete commands for both thing and device tags

Change description

Add commands:

  • device create-tags
  • thing create-tags
  • device delete-tags
  • thing delete-tags

Additional Notes

Reviewer checklist

  • PR address a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in main.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.
  • History is clean, commit messages are meaningful (see CONTRIBUTING.md) and are well formatted.

@polldo polldo requested review from eclipse1985 and glumia November 4, 2021 16:24
@polldo polldo changed the title Add create/delete commands for device/thing tags Add create/delete commands for device/thing tags [IOT-1481] Nov 5, 2021
Copy link
Contributor

@glumia glumia left a comment

Choose a reason for hiding this comment

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

Added just some suggestions for minor improvements, overall it's ok for me.

Kudos for command/tag, it's great! 😁


// CreateTags allows to create or overwrite tags
// on a resource of Arduino IoT Cloud
func CreateTags(params *CreateTagsParams) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could add a validation of params.Resource here so that if it doesn't have a valid value we avoid loading the configuration and instantiating the iot client for nothing.

What do you think?

Co-authored-by: Giuseppe Lumia <[email protected]>
@polldo polldo merged commit 0a77650 into main Nov 8, 2021
@polldo polldo deleted the polldo/tags-create-delete branch November 8, 2021 15:27
polldo pushed a commit that referenced this pull request Sep 2, 2022
Introduce tags for things and devices. Implements the following commands:
- device create-tags 
- device delete-tags
- thing create-tags 
- thing delete-tags
polldo pushed a commit that referenced this pull request Sep 2, 2022
Introduce tags for things and devices. Implements the following commands:
- device create-tags 
- device delete-tags
- thing create-tags 
- thing delete-tags
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.

3 participants