-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement bridge-device functionality for onboarding non-OCF compliant devices #420
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
8da3d70
implement OCF bridge device
jkralik b00e77d
Allow to set data to bridged device
jkralik 67e3393
init device ondemand -> allow to configure setup
jkralik 15940a8
cleanup API
jkralik d866587
clean-up API
jkralik 44c2c39
cleanup service API
jkralik 70caf32
check onDeviceUpdated==nil in deviceConstructor
jkralik dcd1222
drop invalid messsages
jkralik f20c8eb
fixup
jkralik 73e4dcd
fixup
jkralik 66e8f26
cleanup interfaces
jkralik 8936ec2
add Shutdown method
jkralik fb2528a
fix shutdown
jkralik 428fb87
fixup check in device for cloudmanager
jkralik ce83b3f
Fix issues and add tests (#421)
Danielius1922 6810f97
Refactor and add unit tests (#422)
Danielius1922 f24ca8c
fix deduplicate first notification
jkralik 2d8f1ca
allow to discover mutliple devices on the same endpoint
jkralik 949429d
fixup
jkralik 1c4ae68
try to use also oic/res if the oic/d not exists
jkralik 599185a
oic/res will be part of each device
jkralik 5fe1ddb
ignore mcast with di that is not exists
jkralik bffb125
filter links by deviceID
jkralik 95dc970
try to use same options when creates the observation
jkralik 877fd89
Test observe resource
jkralik 89e6640
add WithDeviceID option to more commands
jkralik 386ed20
allow to configure client to set deviceID also to query parameter
jkralik f4c3258
fix tests
jkralik c4d1402
fixup test
jkralik 8974793
generate also resources to the device
jkralik 1d6cee4
allow to use multiple external ipv4 and ipv6 addresses
jkralik 2df28d2
fix linter
jkralik 733226f
fix tests
jkralik 60cc12e
fix linter
jkralik 31d9167
bridge: add onboarding and offboarding test
Danielius1922 9693baa
bridge: add maintenance resource
Danielius1922 784f7bd
ocfbridge: add signal handling
Danielius1922 b05476f
Add test-bridge target
Danielius1922 10ad7c3
bridge: add unit-tests
Danielius1922 f84a7cc
bridge: test device with mocked coap-gateway
Danielius1922 4c79c41
bridge: Use random for test service to avoid clashes
Danielius1922 6f8edf9
bridge: use secured TLS communication
Danielius1922 f117737
bridge: implement Credential Resource for CA Configuration during onb…
jkralik 1192f66
new device can return also error
jkralik d6d3897
load config for crendtial resource
jkralik a553654
fix linter
jkralik 9e994f5
publish bridge-device docker image
jkralik 61868ed
include config.yaml
jkralik 4bdb8b6
bridge: add custom logger support
Danielius1922 221b966
bridge: fix SonarCloud issues
Danielius1922 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# TODO | ||
|
||
- Set RootCAs to the cloud connection | ||
- Unit tests | ||
- Set logger to package and propagate to package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/**************************************************************************** | ||
* | ||
* Copyright (c) 2023 plgd.dev s.r.o. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"), | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | ||
* either express or implied. See the License for the specific | ||
* language governing permissions and limitations under the License. | ||
* | ||
****************************************************************************/ | ||
|
||
package cloud | ||
|
||
import ( | ||
"github.com/plgd-dev/device/v2/schema/cloud" | ||
) | ||
|
||
type Configuration struct { | ||
ResourceTypes []string `yaml:"-" json:"rt"` | ||
Interfaces []string `yaml:"-" json:"if"` | ||
Name string `yaml:"-" json:"n"` | ||
AuthorizationProvider string `yaml:"authorizationProvider" json:"apn"` | ||
CloudID string `yaml:"cloudID" json:"sid"` | ||
URL string `yaml:"cloudEndpoint" json:"cis"` | ||
LastErrorCode int `yaml:"-" json:"clec"` | ||
ProvisioningStatus cloud.ProvisioningStatus `yaml:"-" json:"cps"` | ||
AuthorizationCode string `yaml:"-" json:"-"` | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
TODO: update to vnext after