-
Notifications
You must be signed in to change notification settings - Fork 111
Add client for IoT command service #790
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
Changes from 64 commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
359a793
Checkpoint
bretambrose aa12ba8
Checkpoint
bretambrose 0327dcf
Updates
bretambrose f8567cd
Checkpoint pre gen diff
8f357e1
V2 Codegen Building
4632528
Shadow tests
1548624
Fix and refactor tests
a561ae9
Checkpoint
b6276dd
Regen
7f8dac8
Identity tests
bretambrose c802893
Merge branch 'main' into RequestResponseWorkspace
ba0ef19
Codegen and format updates
e519763
V2ServiceError -> V2ErrorResponse
88889a5
unreferenced params
bretambrose be267e3
Trivial change to invoke fresh CI
bretambrose 20a9fe2
Will this setup the env variables?
bretambrose 634aea8
Manual test invoke of cli
bretambrose ec5fb72
Revert "Manual test invoke of cli"
bretambrose 421baab
Does the build have credentials injected?
bretambrose f04dfd6
Check for session
bretambrose d799ec9
non-change to trigger CI
bretambrose bd03d8a
Updated builder to a version that passes session credentials to the c…
bretambrose 3fd6892
Non-change
bretambrose 1799c1a
Non change
bretambrose 5fa7606
Update CI jobs with CI-test credentials
bretambrose c57dec7
Basic CI Prep
bc9273e
Skip service tests on macs where keychain access/code-signing is nece…
2fb685f
Can't have empty test exe
8876976
Provison second parameter
278a5e1
Temporarily allow mac service testing
272cf93
Device location csr
5881ac3
Builder with fleet provisioning env
31e556d
Use credentials with smoke tests too
0e9dc45
Released CRT
bretambrose ae2d4bc
Merge branch 'main' into RequestResponseWorkspacePreFormat
60b947c
Update submodule
3bfee21
Merge branch 'main' into RequestResponseWorkspacePreFormat
bretambrose 25358b0
Updated codegen
1a0902f
Get some credentials before building
23c0c06
Add command
sfodagain d4cd259
Update crt
sfodagain e4d6354
Move init helpers
sfodagain c862e3b
Update other services
sfodagain cd321a6
Fix status update
sfodagain 94c33ca
Fix errors
sfodagain 3c2df76
Use enum for device types
sfodagain c299a1e
Use enum for device type
sfodagain da5c54e
Add missing streams
sfodagain 4deacf9
Fix topic for json stream
sfodagain ee75249
Rename CommandExecutionsEvent to CommandExecutionEvent
sfodagain 8e342e9
Renaming command to commands
sfodagain e32c408
Fix cmake
sfodagain 7fc0ac3
Fix naming
sfodagain 18a9ba6
Remove v1 client
sfodagain 3201087
Add docs
sfodagain 52cf0fa
Use custom branch in aws-crt-cpp
sfodagain e970c1e
Add tests
sfodagain 6a800a8
Fix race condition in service tests
sfodagain edaad93
Merge branch 'main' into RequestResponseWorkspacePreFormat
sfodagain ef1a389
More data race fixes
sfodagain 7be99cf
Apply clang-format
sfodagain b716a2f
Remove ServiceStreamingOperation from Identity
sfodagain 37a2906
Fix typo
sfodagain f43b70b
Merge branch 'RequestResponseWorkspacePreFormat' into iot-command
sfodagain 4953a99
Remove extra semicolon
sfodagain 0cc6387
Update cmake file
sfodagain 29ad002
Fix doxygen comments
sfodagain 7653915
Use stable ordering
sfodagain b44ffb1
Apply changes from RequestResponseWorkspace
sfodagain 1242e24
Remove extra credentials
sfodagain caf8ca8
Update aws-crt-cpp
sfodagain e322482
Merge branch 'RequestResponseWorkspacePreFormat' into iot-command
sfodagain 383323b
IoT command client sample (#791)
sfod 3cbe796
Merge branch 'main' into iot-command
sfodagain fa15132
Rename sample to commands-sandbox
sfodagain 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 hidden or 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,17 @@ | ||
import Builder | ||
import os | ||
|
||
class SdkCiPrep(Builder.Action): | ||
def run(self, env): | ||
if os.environ.get('AWS_ACCESS_KEY_ID') != None: | ||
print(f"Local credentials exist") | ||
if os.environ.get('AWS_SESSION_TOKEN') != None: | ||
print(f"Local credentials are session based") | ||
else: | ||
print(f"No Local credentials") | ||
|
||
|
||
actions = [ | ||
Builder.SetupCrossCICrtEnvironment() | ||
] | ||
return Builder.Script(actions, name='sdk-ci-prep') |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,127 @@ | ||
# This file is generated | ||
|
||
cmake_minimum_required(VERSION 3.9...3.31) | ||
|
||
project(IotCommands-cpp LANGUAGES CXX VERSION ${SIMPLE_VERSION}) | ||
|
||
set(GENERATED_ROOT_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") | ||
set(GENERATED_INCLUDE_DIR "${GENERATED_ROOT_DIR}/include") | ||
set(GENERATED_CONFIG_HEADER "${GENERATED_INCLUDE_DIR}/aws/iotcommands/Config.h") | ||
configure_file(include/aws/iotcommands/Config.h.in ${GENERATED_CONFIG_HEADER} @ONLY) | ||
|
||
if (NOT CMAKE_CXX_STANDARD) | ||
set(CMAKE_CXX_STANDARD 11) | ||
endif() | ||
|
||
file(GLOB AWS_IOTCOMMANDS_HEADERS | ||
"include/aws/iotcommands/*.h" | ||
${GENERATED_CONFIG_HEADER} | ||
) | ||
|
||
file(GLOB AWS_IOTCOMMANDS_SRC | ||
"source/*.cpp" | ||
) | ||
|
||
file(GLOB AWS_IOTCOMMANDS_CPP_SRC | ||
${AWS_IOTCOMMANDS_SRC} | ||
) | ||
|
||
if (WIN32) | ||
if (MSVC) | ||
source_group("Header Files\\aws\\iotcommands\\" FILES ${AWS_IOTCOMMANDS_HEADERS}) | ||
|
||
source_group("Source Files" FILES ${AWS_IOTCOMMANDS_SRC}) | ||
endif () | ||
endif() | ||
|
||
add_library(IotCommands-cpp ${AWS_IOTCOMMANDS_CPP_SRC}) | ||
|
||
set_target_properties(IotCommands-cpp PROPERTIES LINKER_LANGUAGE CXX) | ||
|
||
set(CMAKE_C_FLAGS_DEBUGOPT "") | ||
|
||
#set warnings | ||
if (MSVC) | ||
target_compile_options(IotCommands-cpp PRIVATE /W4 /WX) | ||
else () | ||
target_compile_options(IotCommands-cpp PRIVATE -Wall -Wno-long-long -pedantic -Werror) | ||
endif () | ||
|
||
target_compile_definitions(IotCommands-cpp PRIVATE $<$<CONFIG:Debug>:DEBUG_BUILD>) | ||
|
||
if (BUILD_SHARED_LIBS) | ||
target_compile_definitions(IotCommands-cpp PUBLIC "-DAWS_IOTCOMMANDS_USE_IMPORT_EXPORT") | ||
target_compile_definitions(IotCommands-cpp PRIVATE "-DAWS_IOTCOMMANDS_EXPORTS") | ||
|
||
install(TARGETS IotCommands-cpp | ||
EXPORT IotCommands-cpp-targets | ||
ARCHIVE | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT Development | ||
LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
NAMELINK_SKIP | ||
COMPONENT Runtime | ||
RUNTIME | ||
DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
COMPONENT Runtime) | ||
|
||
install(TARGETS IotCommands-cpp | ||
EXPORT IotCommands-cpp-targets | ||
LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
NAMELINK_ONLY | ||
COMPONENT Development) | ||
else() | ||
install(TARGETS IotCommands-cpp | ||
EXPORT IotCommands-cpp-targets | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
COMPONENT Development) | ||
endif() | ||
|
||
target_include_directories(IotCommands-cpp PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include>) | ||
|
||
if (BUILD_DEPS) | ||
if (NOT IS_SUBDIRECTORY_INCLUDE) | ||
aws_use_package(aws-crt-cpp) | ||
endif() | ||
endif() | ||
|
||
target_link_libraries(IotCommands-cpp ${DEP_AWS_LIBS}) | ||
|
||
install(FILES ${AWS_IOTCOMMANDS_HEADERS} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aws/iotcommands/" COMPONENT Development) | ||
|
||
if (BUILD_SHARED_LIBS) | ||
set(TARGET_DIR "shared") | ||
else() | ||
set(TARGET_DIR "static") | ||
endif() | ||
|
||
include(CMakePackageConfigHelpers) | ||
if (DEFINED SIMPLE_VERSION) | ||
write_basic_package_version_file( | ||
"${CMAKE_CURRENT_BINARY_DIR}/iotcommands-cpp-config-version.cmake" | ||
COMPATIBILITY SameMajorVersion | ||
) | ||
endif() | ||
|
||
install(EXPORT "IotCommands-cpp-targets" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/IotCommands-cpp/${TARGET_DIR}" | ||
NAMESPACE AWS:: | ||
COMPONENT Development) | ||
|
||
configure_file("cmake/iotcommands-cpp-config.cmake" | ||
"${CMAKE_CURRENT_BINARY_DIR}/iotcommands-cpp-config.cmake" | ||
@ONLY) | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/iotcommands-cpp-config.cmake" | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/IotCommands-cpp/" | ||
COMPONENT Development) | ||
|
||
if(NOT CMAKE_CROSSCOMPILING) | ||
if (BUILD_TESTING AND NOT BYO_CRYPTO) | ||
add_subdirectory(tests) | ||
endif() | ||
endif() |
This file contains hidden or 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,25 @@ | ||
# This file is generated | ||
|
||
include(CMakeFindDependencyMacro) | ||
|
||
find_dependency(aws-crt-cpp) | ||
|
||
macro(aws_load_targets type) | ||
include(${CMAKE_CURRENT_LIST_DIR}/${type}/@[email protected]) | ||
endmacro() | ||
|
||
# Allow static or shared lib to be used. | ||
# If both are installed, choose based on BUILD_SHARED_LIBS. | ||
if (BUILD_SHARED_LIBS) | ||
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/shared") | ||
aws_load_targets(shared) | ||
else() | ||
aws_load_targets(static) | ||
endif() | ||
else() | ||
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/static") | ||
aws_load_targets(static) | ||
else() | ||
aws_load_targets(shared) | ||
endif() | ||
endif() |
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.
Uh oh!
There was an error while loading. Please reload this page.