├── test.json ├── doc ├── furtherExamples.md ├── images │ ├── .gitkeep │ ├── img.png │ ├── Awa_application_overview.png │ ├── Device_server_process_descriptions.png │ ├── Awa_LWM2M_device_server_positioning.png │ ├── Bootstrap_server_process_descriptions.png │ ├── Awa_LWM2M_device_server_positioning_150dpi.png │ ├── Device_server_process_descriptions_100dpi.png │ ├── Bootstrap_server_process_descriptions_100dpi.png │ ├── Device_server_process_descriptions_subscribe.png │ ├── Bootstrap_server_process_with_management_layer.png │ ├── CreatorDev_IoT_framework_device_server_overview.png │ ├── Device_server_process_descriptions_subscribe_100dpi.png │ ├── CreatorDev_IoT_framework_device_server_overview_100dpi.png │ └── Bootstrap_server_process_descriptions_with_management_layer_100dpi.png ├── img.png ├── coding_style.md ├── tasks.md ├── Attribution.md ├── userGuide.md ├── Vagrant.md ├── Licenses │ └── IMGLicense.md └── packageVersions.md ├── docker ├── ds │ ├── int │ │ ├── index.txt │ │ ├── serial │ │ └── .gitignore │ ├── root │ │ ├── index.txt │ │ ├── serial │ │ └── .gitignore │ ├── .gitignore │ ├── root.cnf │ └── intermediate.cnf ├── ssl │ └── .gitignore ├── Dockerfile.DeviceServerTest ├── Dockerfile.DeviceServerBuild ├── Vagrantfile └── nginx.conf ├── ansible ├── roles │ ├── _template_role │ │ ├── tasks │ │ │ ├── main.yml │ │ │ └── readme.md │ │ ├── vars │ │ │ ├── main.yml │ │ │ └── readme.md │ │ ├── meta │ │ │ ├── main.yml │ │ │ └── readme.md │ │ ├── files │ │ │ └── readme.md │ │ ├── handlers │ │ │ └── readme.md │ │ └── templates │ │ │ └── readme.md │ ├── docker-compose │ │ ├── vars │ │ │ ├── main.yml │ │ │ ├── default.yml │ │ │ ├── CentOS.yml │ │ │ └── readme.md │ │ ├── meta │ │ │ ├── main.yml │ │ │ └── readme.md │ │ ├── docker-compose.yml │ │ ├── files │ │ │ └── readme.md │ │ ├── handlers │ │ │ └── readme.md │ │ ├── tasks │ │ │ ├── main.yml │ │ │ └── readme.md │ │ └── templates │ │ │ └── readme.md │ └── docker-engine │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ ├── meta │ │ ├── main.yml │ │ └── readme.md │ │ ├── vars │ │ ├── main.yml │ │ ├── defaults.yml │ │ ├── CentOS-6.yml │ │ ├── readme.md │ │ ├── Ubuntu-16.04.yml │ │ ├── CentOS-7.yml │ │ ├── Ubuntu-14.10.yml │ │ ├── Ubuntu-15.04.yml │ │ ├── Ubuntu-15.10.yml │ │ ├── Ubuntu-14.04.yml │ │ └── Ubuntu-12.04.yml │ │ ├── docker-engine.yml │ │ ├── files │ │ └── readme.md │ │ ├── handlers │ │ └── readme.md │ │ ├── tasks │ │ └── readme.md │ │ └── templates │ │ └── readme.md ├── inventory │ └── hosts └── playbook.yml ├── test ├── DeviceServerTests │ ├── xunit.runner.json │ ├── testconfig.json │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── project.json │ ├── Fixtures │ │ └── TestWebAppFixture.cs │ └── DeviceServerTests.xproj ├── TestWebApplication │ ├── appsettings.json │ ├── web.config │ ├── Program.cs │ ├── Properties │ │ └── launchSettings.json │ ├── TestWebApp.xproj │ ├── Startup.cs │ └── project.json └── LWM2MTestClient │ ├── project.json │ ├── Properties │ └── AssemblyInfo.cs │ ├── LWM2MTestClient.xproj │ └── Resources │ ├── TSecurityMode.cs │ └── Base │ └── ChildCreatedEventArgs.cs ├── src ├── Imagination.LWM2M.Server │ ├── Properties │ │ ├── launchSettings.json │ │ └── AssemblyInfo.cs │ ├── BusinessLogic │ │ └── Identities.cs │ ├── appsettings.json │ ├── PSKIdentities.xml │ ├── project.json │ ├── Imagination.LWM2M.Server.xproj │ └── Model │ │ └── ClientMetrics.cs ├── Imagination.LWM2M.Bootstrap │ ├── Properties │ │ ├── launchSettings.json │ │ └── AssemblyInfo.cs │ ├── BusinessLogic │ │ └── Identities.cs │ ├── appsettings.json │ ├── PSKIdentities.xml │ ├── project.json │ ├── Imagination.LWM2M.Bootstrap.xproj │ ├── Model │ │ └── TSecurityMode.cs │ └── Interfaces │ │ └── IDALServers.cs ├── Imagination.Service.ChangeNotification │ ├── Properties │ │ ├── launchSettings.json │ │ └── AssemblyInfo.cs │ ├── appsettings.json │ ├── project.json │ ├── Imagination.Service.ChangeNotification.xproj │ └── Model │ │ └── TNotificationState.cs ├── Imagination.LWM2M.Common │ ├── Interfaces │ │ ├── IDALBlacklistedClients.cs │ │ └── IDALObjectDefinitions.cs │ ├── project.json │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Imagination.LWM2M.Common.xproj │ ├── ITlvSerialisable.cs │ ├── Model │ │ ├── TDataFormat.cs │ │ └── TBindingMode.cs │ ├── QueueNames.cs │ └── TLV │ │ └── TTlvTypeIdentifier.cs ├── Imagination.WebService.DeviceServer │ ├── Documentation │ │ ├── TNamedParameterType.cs │ │ ├── RouteDocumentationAttribute.cs │ │ ├── MethodDocumentationAttribute.cs │ │ └── NamedParameterDocumentationAttribute.cs │ ├── wwwroot │ │ └── web.config │ ├── appsettings.json │ ├── Properties │ │ └── launchSettings.json │ ├── Imagination.WebService.DeviceServer.xproj │ ├── Program.cs │ ├── project.json │ └── ServiceModels │ │ ├── Clients.cs │ │ ├── Identities.cs │ │ ├── Metrics.cs │ │ ├── APIEntryPoint.cs │ │ ├── Configuration.cs │ │ ├── Certificates.cs │ │ ├── AccessKeys.cs │ │ ├── PSKIdentities.cs │ │ └── Subscriptions.cs ├── Imagination.Model │ ├── project.json │ ├── Subscriptions │ │ └── TSubscriptionType.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Imagination.Model.xproj │ ├── Configuration │ │ ├── TCertificateFormat.cs │ │ ├── Certificate.cs │ │ └── PSKIdentity.cs │ ├── Metrics │ │ └── ClientMetric.cs │ └── ObjectDefinitions │ │ └── TPropertyDataType.cs ├── Imagination.Service.Webhook │ ├── appsettings.json │ ├── project.json │ └── Imagination.Service.Webhook.xproj ├── Imagination.Service.Subscription │ ├── appsettings.json │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── project.json │ └── Imagination.Service.Subscription.xproj ├── Imagination.Common │ ├── project.json │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Imagination.Common.xproj │ ├── Model │ │ ├── TDBAccessPermission.cs │ │ ├── TObjectState.cs │ │ ├── TMessagePublishMode.cs │ │ └── TAccessRight.cs │ ├── Exceptions │ │ └── ConflictException.cs │ ├── Utilities │ │ └── TJsonReaderState.cs │ └── DataAccess │ │ └── RabbitMQ │ │ └── RabbitMQConnection.cs ├── Imagination.Service.Common │ ├── project.json │ ├── Imagination.Service.Common.xproj │ └── ServiceModels │ │ ├── ObjectTypes.cs │ │ └── ObjectDefinitions.cs └── Imagination.WebService.Common │ ├── project.json │ ├── Properties │ └── AssemblyInfo.cs │ ├── Imagination.WebService.Common.xproj │ └── ServiceModels │ ├── TResponseFormat.cs │ ├── ResourcesCreated.cs │ └── ResourceCreated.cs ├── appsettings.env ├── .editorconfig ├── global.json ├── .dockerignore ├── tools └── Imagination.APIDocGenerator │ ├── Properties │ ├── launchSettings.json │ └── AssemblyInfo.cs │ ├── TDataExchangeFormat.cs │ ├── README.md │ ├── project.json │ ├── Imagination.APIDocGenerator.xproj │ ├── appsettings.json │ ├── TMessageType.cs │ └── IDocumentationSerialiser.cs ├── CONTRIBUTORS ├── NuGet.Config ├── ci ├── deviceserver-wait.sh └── run-tests.sh ├── scripts └── register-definitions.sh ├── launch_all.bat ├── IMGLicense.md └── Vagrantfile /test.json: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/furtherExamples.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /doc/images/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/ds/int/index.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/ds/int/serial: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /docker/ds/root/index.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/ds/root/serial: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost -------------------------------------------------------------------------------- /test/DeviceServerTests/xunit.runner.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: [] 3 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: [] 3 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/meta/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: [] 3 | -------------------------------------------------------------------------------- /ansible/inventory/hosts: -------------------------------------------------------------------------------- 1 | [local] 2 | localhost ansible_connection=local 3 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | docker_engine_version: 1.11.3 3 | -------------------------------------------------------------------------------- /doc/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/img.png -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": {} 3 | } -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": {} 3 | } -------------------------------------------------------------------------------- /doc/images/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/img.png -------------------------------------------------------------------------------- /src/Imagination.Service.ChangeNotification/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": {} 3 | } -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/defaults.yml: -------------------------------------------------------------------------------- 1 | --- 2 | docker_engine_key_server: "" 3 | docker_engine_gpg_key: "" -------------------------------------------------------------------------------- /appsettings.env: -------------------------------------------------------------------------------- 1 | # Environment variables exposed to all Device Server services 2 | ASPNETCORE_ENVIRONMENT=Development 3 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | 7 | [Makefile] 8 | indent_style = tab -------------------------------------------------------------------------------- /ansible/roles/docker-engine/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - docker-engine 6 | -------------------------------------------------------------------------------- /doc/images/Awa_application_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Awa_application_overview.png -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "projects": [ "src", "test", "tools" ], 3 | "sdk": { 4 | "version": "1.0.0-preview1-002702" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /doc/images/Device_server_process_descriptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Device_server_process_descriptions.png -------------------------------------------------------------------------------- /doc/coding_style.md: -------------------------------------------------------------------------------- 1 | ![](img.png) 2 | 3 | ---- 4 | 5 | 6 | # CreatorDev DeviceServer 7 | 8 | 9 | ## Coding style guide. 10 | 11 | ---- 12 | ---- 13 | -------------------------------------------------------------------------------- /doc/images/Awa_LWM2M_device_server_positioning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Awa_LWM2M_device_server_positioning.png -------------------------------------------------------------------------------- /doc/images/Bootstrap_server_process_descriptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Bootstrap_server_process_descriptions.png -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .git 3 | .vs 4 | .vagrant 5 | src/*/project.lock.json 6 | src/*/bin 7 | src/*/obj 8 | src/artifacts 9 | artifacts 10 | build 11 | -------------------------------------------------------------------------------- /doc/images/Awa_LWM2M_device_server_positioning_150dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Awa_LWM2M_device_server_positioning_150dpi.png -------------------------------------------------------------------------------- /doc/images/Device_server_process_descriptions_100dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Device_server_process_descriptions_100dpi.png -------------------------------------------------------------------------------- /ansible/playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: local 3 | become: true 4 | become_user: root 5 | become_method: sudo 6 | roles: 7 | - docker-engine 8 | - docker-compose 9 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/docker-engine.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: local 3 | become: true 4 | become_user: root 5 | become_method: sudo 6 | roles: 7 | - docker-engine 8 | -------------------------------------------------------------------------------- /doc/images/Bootstrap_server_process_descriptions_100dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Bootstrap_server_process_descriptions_100dpi.png -------------------------------------------------------------------------------- /doc/images/Device_server_process_descriptions_subscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Device_server_process_descriptions_subscribe.png -------------------------------------------------------------------------------- /doc/tasks.md: -------------------------------------------------------------------------------- 1 | 2 | ![](images/img.png) 3 | ---- 4 | 5 | # Device server project development tasks 6 | 7 | Below is a list of ongoing or suggested development tasks: 8 | 9 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/docker-compose.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: local 3 | become: true 4 | become_user: root 5 | become_method: sudo 6 | roles: 7 | - docker-compose 8 | -------------------------------------------------------------------------------- /doc/images/Bootstrap_server_process_with_management_layer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Bootstrap_server_process_with_management_layer.png -------------------------------------------------------------------------------- /doc/images/CreatorDev_IoT_framework_device_server_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/CreatorDev_IoT_framework_device_server_overview.png -------------------------------------------------------------------------------- /doc/images/Device_server_process_descriptions_subscribe_100dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Device_server_process_descriptions_subscribe_100dpi.png -------------------------------------------------------------------------------- /doc/images/CreatorDev_IoT_framework_device_server_overview_100dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/CreatorDev_IoT_framework_device_server_overview_100dpi.png -------------------------------------------------------------------------------- /ansible/roles/_template_role/files/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Files 2 | Any file stored in this folder is ready to be copied to the server. 3 | This implies that the files do not need to be edited via templating. -------------------------------------------------------------------------------- /ansible/roles/docker-compose/files/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Files 2 | Any file stored in this folder is ready to be copied to the server. 3 | This implies that the files do not need to be edited via templating. -------------------------------------------------------------------------------- /ansible/roles/docker-engine/files/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Files 2 | Any file stored in this folder is ready to be copied to the server. 3 | This implies that the files do not need to be edited via templating. -------------------------------------------------------------------------------- /doc/images/Bootstrap_server_process_descriptions_with_management_layer_100dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CreatorDev/DeviceServer/HEAD/doc/images/Bootstrap_server_process_descriptions_with_management_layer_100dpi.png -------------------------------------------------------------------------------- /docker/ssl/.gitignore: -------------------------------------------------------------------------------- 1 | # Create your certs and store them in this directory! 2 | # But don't worry.. You won't be able to commit them! 3 | 4 | # Ignore everything in this directory 5 | * 6 | # Except this file 7 | !.gitignore -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "Imagination.APIDocGenerator": { 4 | "commandName": "Project", 5 | "commandLineArgs": "output.raml" 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /docker/ds/.gitignore: -------------------------------------------------------------------------------- 1 | # Create your certs and store them in this directory! 2 | # But don't worry.. You won't be able to commit them! 3 | 4 | # Ignore everything in this directory 5 | * 6 | # Except this file 7 | !.gitignore 8 | !*.cnf 9 | !root 10 | !int 11 | -------------------------------------------------------------------------------- /docker/ds/int/.gitignore: -------------------------------------------------------------------------------- 1 | # Create your certs and store them in this directory! 2 | # But don't worry.. You won't be able to commit them! 3 | 4 | # Ignore everything in this directory 5 | * 6 | # Except this file 7 | !.gitignore 8 | !index.txt 9 | !serial 10 | -------------------------------------------------------------------------------- /docker/ds/root/.gitignore: -------------------------------------------------------------------------------- 1 | # Create your certs and store them in this directory! 2 | # But don't worry.. You won't be able to commit them! 3 | 4 | # Ignore everything in this directory 5 | * 6 | # Except this file 7 | !.gitignore 8 | !index.txt 9 | !serial 10 | -------------------------------------------------------------------------------- /docker/Dockerfile.DeviceServerTest: -------------------------------------------------------------------------------- 1 | FROM creatordev/dotnet-mono-base 2 | 3 | COPY . /app 4 | 5 | WORKDIR /app 6 | 7 | RUN dotnet restore && \ 8 | dotnet build --configuration=Debug src/* && \ 9 | dotnet build --configuration=Debug test/* 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/CentOS-6.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - ca-certificates 4 | 5 | # Valid Versions 6 | #docker-engine-1.7.1-1.el6.centos 7 | #docker-engine-1.7.0-1.el6.centos 8 | docker_engine_package_name: docker-engine-1.7.1-1.el6.centos 9 | docker_engine_user: centos 10 | -------------------------------------------------------------------------------- /test/TestWebApplication/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | /* 3 | Not loaded from DeviceServerTests 4 | */ 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Debug", 9 | "System": "Information", 10 | "Microsoft": "Information" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Common/Interfaces/IDALBlacklistedClients.cs: -------------------------------------------------------------------------------- 1 | using Imagination.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace Imagination.DataAccess 8 | { 9 | public interface IDALBlacklistedClients 10 | { 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Chris Dewbery (chris-dewbery-imgtec) 2 | Delme Thomas 3 | Kevin Dyer 4 | Matthew Hartstonge 5 | Roland Bewick 6 | Tony Walsworth 7 | Hayden Brown -------------------------------------------------------------------------------- /src/Imagination.Service.ChangeNotification/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ChangeNotification": { 11 | "NotificationTCPPort": "14050" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/TDataExchangeFormat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Imagination.Tools.APIDocGenerator 7 | { 8 | public enum TDataExchangeFormat 9 | { 10 | None = 0, 11 | Json, 12 | Xml, 13 | FormUrlEncoded, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/meta/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Meta 2 | Meta stores dependencies. As roles grow, you can start to depend on other roles. Dependencies always run before the main tasks. 3 | 4 | ```yaml 5 | --- 6 | dependencies: 7 | - { role: openssh } 8 | ``` 9 | 10 | If there are no dependencies, just leave an empty list. 11 | 12 | ```yaml 13 | --- 14 | dependencies: [] 15 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-compose/meta/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Meta 2 | Meta stores dependencies. As roles grow, you can start to depend on other roles. Dependencies always run before the main tasks. 3 | 4 | ```yaml 5 | --- 6 | dependencies: 7 | - { role: openssh } 8 | ``` 9 | 10 | If there are no dependencies, just leave an empty list. 11 | 12 | ```yaml 13 | --- 14 | dependencies: [] 15 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-engine/meta/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Meta 2 | Meta stores dependencies. As roles grow, you can start to depend on other roles. Dependencies always run before the main tasks. 3 | 4 | ```yaml 5 | --- 6 | dependencies: 7 | - { role: openssh } 8 | ``` 9 | 10 | If there are no dependencies, just leave an empty list. 11 | 12 | ```yaml 13 | --- 14 | dependencies: [] 15 | ``` -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/BusinessLogic/Identities.cs: -------------------------------------------------------------------------------- 1 | using Imagination.Model; 2 | using System; 3 | using System.Collections.Concurrent; 4 | 5 | namespace Imagination.LWM2M 6 | { 7 | internal class Identities 8 | { 9 | public PSKIdentity GetPSKIdentity(string identity) 10 | { 11 | return DataAccessFactory.Identities.GetPSKIdentity(identity); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/vars/default.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - python-pip 4 | 5 | docker_compose_package_name: "docker-compose" 6 | # Valid versions (release candidates removed) 7 | # 1.1.0 8 | # 1.2.0 9 | # 1.3.0 10 | # 1.3.1 11 | # 1.3.2 12 | # 1.3.3 13 | # 1.4.0 14 | # 1.4.1 15 | # 1.4.2 16 | # 1.5.0 17 | # 1.5.1 18 | # 1.5.2 19 | # 1.6.0 20 | # 1.6.1 21 | # 1.6.2 22 | # 1.7.0 23 | # 1.7.1 24 | docker_compose_version: 1.7.1 -------------------------------------------------------------------------------- /ansible/roles/docker-compose/vars/CentOS.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - python-pip 4 | 5 | docker_compose_package_name: "docker-compose" 6 | # Valid versions (release candidates removed) 7 | # 1.1.0 8 | # 1.2.0 9 | # 1.3.0 10 | # 1.3.1 11 | # 1.3.2 12 | # 1.3.3 13 | # 1.4.0 14 | # 1.4.1 15 | # 1.4.2 16 | # 1.5.0 17 | # 1.5.1 18 | # 1.5.2 19 | # 1.6.0 20 | # 1.6.1 21 | # 1.6.2 22 | # 1.7.0 23 | # 1.7.1 24 | docker_compose_version: 1.5.0 25 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Documentation/TNamedParameterType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Imagination.Documentation 7 | { 8 | public enum TNamedParameterType 9 | { 10 | NotSet = 0, 11 | String, 12 | Number, 13 | Integer, 14 | Date, 15 | Boolean, 16 | File, 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/BusinessLogic/Identities.cs: -------------------------------------------------------------------------------- 1 | using Imagination.DataAccess; 2 | using Imagination.Model; 3 | using System; 4 | using System.Collections.Concurrent; 5 | 6 | namespace Imagination.BusinessLogic 7 | { 8 | internal class Identities 9 | { 10 | public PSKIdentity GetPSKIdentity(string identity) 11 | { 12 | return DataAccessFactory.Identities.GetPSKIdentity(identity); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/wwwroot/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Imagination.Model/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.3-*", 3 | "description": "Imagination.Model Class Library", 4 | "authors": [ "Imagination Technologies" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | "frameworks": { 11 | "net451": { 12 | "imports": "netstandard1.5" 13 | } 14 | }, 15 | "dependencies": { 16 | "Imagination.Common": "1.0.4-*" 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/vars/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Variables 2 | 3 | As mentioned in templates, the Ansible crew frown on merging dictionaries, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 4 | 5 | A namespaced example 6 | 7 | ```yaml 8 | wordpress_domain: 'example.com' 9 | wordpress_database_prefix: 'wp_db_prefix_' 10 | wordpress_salt: 'kansc-09wu1enl;s-12h11231we1cz7cains' 11 | wordpress_user: 'jimmybobAdmin' 12 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-compose/vars/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Variables 2 | 3 | As mentioned in templates, the Ansible crew frown on merging dictionaries, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 4 | 5 | A namespaced example 6 | 7 | ```yaml 8 | wordpress_domain: 'example.com' 9 | wordpress_database_prefix: 'wp_db_prefix_' 10 | wordpress_salt: 'kansc-09wu1enl;s-12h11231we1cz7cains' 11 | wordpress_user: 'jimmybobAdmin' 12 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Variables 2 | 3 | As mentioned in templates, the Ansible crew frown on merging dictionaries, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 4 | 5 | A namespaced example 6 | 7 | ```yaml 8 | wordpress_domain: 'example.com' 9 | wordpress_database_prefix: 'wp_db_prefix_' 10 | wordpress_salt: 'kansc-09wu1enl;s-12h11231we1cz7cains' 11 | wordpress_user: 'jimmybobAdmin' 12 | ``` -------------------------------------------------------------------------------- /ansible/roles/_template_role/handlers/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible handlers 2 | 3 | Handlers are any tasks you want to run after completing a task. For example, enabling, starting or stopping a sevice. 4 | Handlers have no guarantee of completing successfully. 5 | 6 | ```yaml 7 | --- 8 | - name: Start MySQL 9 | service: 10 | name: mysql 11 | state: started 12 | 13 | - name: Restart MySQL 14 | service: 15 | name: mysql 16 | state: restarted 17 | 18 | - name: Stop MySQL 19 | service: 20 | name: mysql 21 | state: stopped 22 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-compose/handlers/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible handlers 2 | 3 | Handlers are any tasks you want to run after completing a task. For example, enabling, starting or stopping a sevice. 4 | Handlers have no guarantee of completing successfully. 5 | 6 | ```yaml 7 | --- 8 | - name: Start MySQL 9 | service: 10 | name: mysql 11 | state: started 12 | 13 | - name: Restart MySQL 14 | service: 15 | name: mysql 16 | state: restarted 17 | 18 | - name: Stop MySQL 19 | service: 20 | name: mysql 21 | state: stopped 22 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-engine/handlers/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible handlers 2 | 3 | Handlers are any tasks you want to run after completing a task. For example, enabling, starting or stopping a sevice. 4 | Handlers have no guarantee of completing successfully. 5 | 6 | ```yaml 7 | --- 8 | - name: Start MySQL 9 | service: 10 | name: mysql 11 | state: started 12 | 13 | - name: Restart MySQL 14 | service: 15 | name: mysql 16 | state: restarted 17 | 18 | - name: Stop MySQL 19 | service: 20 | name: mysql 21 | state: stopped 22 | ``` -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Documentation/RouteDocumentationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Imagination.Documentation 7 | { 8 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] 9 | public class RouteDocumentationAttribute: Attribute 10 | { 11 | public string Route { get; set; } 12 | public string DisplayName { get; set; } 13 | public string Summary { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-16.04.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-extra-{{ ansible_kernel }} 7 | 8 | # Valid versions 9 | #docker-engine=1.11.2-0~xenial 10 | #docker-engine=1.11.1-0~xenial 11 | #docker-engine=1.11.0-0~xenial 12 | docker_engine_package_name: docker-engine=1.11.2-0~xenial 13 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 14 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 15 | docker_engine_user: ubuntu 16 | -------------------------------------------------------------------------------- /src/Imagination.Model/Subscriptions/TSubscriptionType.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Imagination.Model.Subscriptions 7 | { 8 | public enum TSubscriptionType 9 | { 10 | NotSet = 0, 11 | 12 | // LWM2M Observations 13 | Observation = 1, 14 | 15 | // Server Event Notifications 16 | ClientConnected = 2, 17 | ClientDisconnected = 3, 18 | ClientUpdated = 4, 19 | ClientConnectionExpired = 5, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /docker/Dockerfile.DeviceServerBuild: -------------------------------------------------------------------------------- 1 | 2 | FROM creatordev/dotnet-mono-base 3 | 4 | COPY . /app 5 | 6 | WORKDIR /app 7 | 8 | RUN dotnet restore && \ 9 | dotnet build --configuration=Release src/* 10 | 11 | # copy libuv.so to /usr/lib to work around the DllNotFoundException that 12 | # is thrown by Kestrel on startup. Ideally when this nuget package is installed 13 | # it should copy the library to the correct location, so this can hopefully be 14 | # removed in the future. 15 | RUN ["bash", "-c", "cp /root/.nuget/packages/Libuv/*/runtimes/debian-x64/native/libuv.so /usr/lib"] 16 | -------------------------------------------------------------------------------- /NuGet.Config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /ci/deviceserver-wait.sh: -------------------------------------------------------------------------------- 1 | # waits for device server by polling the REST API entry point 2 | printf "Waiting for Device Server" 3 | 4 | DEVICE_SERVER_URI=$1 5 | 6 | MAX_ATTEMPTS=30 7 | COUNTER=0 8 | while [ $COUNTER -lt $MAX_ATTEMPTS ]; do 9 | printf "." 10 | set +e 11 | curl -s $DEVICE_SERVER_URI > index.html 12 | rc=$? 13 | set -e 14 | if [ $rc -eq 0 ]; 15 | then 16 | break 17 | fi 18 | COUNTER=`expr $COUNTER + 1` 19 | sleep 1 20 | done 21 | 22 | if [ $COUNTER -eq $MAX_ATTEMPTS ]; 23 | then 24 | echo "Device Server was not started successfully" 25 | exit 1 26 | fi 27 | 28 | echo "Device Server up" 29 | -------------------------------------------------------------------------------- /test/TestWebApplication/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /scripts/register-definitions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # register the object definitions from a json file 4 | # using the REST API 5 | ## 6 | 7 | if [ ! -z $1 ] 8 | then 9 | WEBSERVICE=$1 10 | else 11 | WEBSERVICE=http://localhost:8080 12 | fi 13 | 14 | JSON_FILE=ObjectDefinitions.json 15 | 16 | curl -vX POST ${WEBSERVICE}/objecttypes/definitions \ 17 | -d @${JSON_FILE} \ 18 | --header "Content-Type: application/vnd.imgtec.objectdefinitions+json" \ 19 | --header "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJPcmdJRCI6IjAiLCJleHAiOjE0OTA5NTgwMDB9.zw-laBQRc7Xcxo5excZQeiWRy67UqUq5SNP64U__NxE" 20 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.5-*", 3 | "description": "Imagination.LWM2M.Common Class Library", 4 | "authors": [ "Imagination Technologies" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "frameworks": { 12 | "net451": { 13 | "imports": "netstandard1.5" 14 | } 15 | }, 16 | 17 | "dependencies": { 18 | "CoAP": "1.1.0", 19 | "DTLS.Net": "1.0.21", 20 | "Imagination.Common": "1.0.4-*", 21 | "Imagination.Service.Common": "1.0.0-*", 22 | "Imagination.Model": "1.0.3-*" 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /doc/Attribution.md: -------------------------------------------------------------------------------- 1 | # Opensource Attributions 2 | 3 | Herein lie the required attributions for 3rd-party open source code that 4 | has been used within this project. Find the relevant license files under the 5 | licenses folder. 6 | 7 | ## stackme-joomla 8 | 9 | | Project | Author | Source | License | 10 | | --------------------------- | --------------------------------- | -------------------------------------------- | --------------- | 11 | | stackme/stackme-joomla | The Authors of stackme-joomla | https://github.com/stackme/stackme-joomla | BSD-3 Clause | 12 | 13 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Documentation/MethodDocumentationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Net; 3 | 4 | namespace Imagination.Documentation 5 | { 6 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] 7 | public class MethodDocumentationAttribute : Attribute 8 | { 9 | public string Summary { get; set; } 10 | public string[] RequestTypeNames { get; set; } 11 | public Type[] RequestTypes { get; set; } 12 | public Type[] ResponseTypes { get; set; } 13 | public HttpStatusCode[] StatusCodes { get; set; } 14 | public bool AllowMultipleSecuritySchemes { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Imagination.Service.Webhook/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ServiceConfiguration": { 11 | "Hostname": "", 12 | "MongoConnection": "mongodb://mongo.service.consul:27017", 13 | "RabbitMQConnections": [ 14 | { 15 | "Uri": "amqp://rabbitmq.service.consul", 16 | "Username": "username", 17 | "Password": "changme_soon" 18 | } 19 | ], 20 | "ChangeNotificationServers": [ "tcp://localhost" ] 21 | }, 22 | "Subscription": { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ServiceConfiguration": { 11 | "MongoConnection": "mongodb://mongo.service.consul:27017", 12 | "RabbitMQConnections": [ 13 | { 14 | "Uri": "amqp://rabbitmq.service.consul", 15 | "Username": "username", 16 | "Password": "changme_soon" 17 | } 18 | ], 19 | "ChangeNotificationServers": [ "tcp://localhost" ], 20 | "SigningKey": "1234567890ABCDEF1234567890ABCDEF" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Imagination.Service.Subscription/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ServiceConfiguration": { 11 | "Hostname": "", 12 | "MongoConnection": "mongodb://mongo.service.consul:27017", 13 | "RabbitMQConnections": [ 14 | { 15 | "Uri": "amqp://rabbitmq.service.consul", 16 | "Username": "username", 17 | "Password": "changme_soon" 18 | } 19 | ], 20 | "ChangeNotificationServers": [ "tcp://localhost" ] 21 | }, 22 | "Subscription": { 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - include_vars: "{{ item }}" 3 | with_first_found: 4 | - "../vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" 5 | - "../vars/{{ ansible_distribution }}.yml" 6 | - "../vars/{{ ansible_os_family }}.yml" 7 | - "../vars/default.yml" 8 | when: dependencies is not defined or pip_package_name is not defined 9 | 10 | - name: Install Dependencies 11 | package: 12 | name: "{{ item }}" 13 | state: present 14 | with_items: "{{ dependencies }}" 15 | 16 | - name: Install docker-compose 17 | pip: 18 | name: "{{ docker_compose_package_name }}" 19 | version: "{{ docker_compose_version }}" 20 | 21 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ServiceConfiguration": { 11 | "Hostname": "", 12 | "MongoConnection": "mongodb://mongo.service.consul:27017", 13 | "RabbitMQConnections": [ 14 | { 15 | "Uri": "amqp://rabbitmq.service.consul", 16 | "Username": "username", 17 | "Password": "changme_soon" 18 | } 19 | ], 20 | "ChangeNotificationServers": [ "tcp://localhost" ] 21 | }, 22 | "LWM2MServer": { 23 | "Port": 5683, 24 | "SecureOnly": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/TestWebApplication/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Builder; 8 | 9 | namespace TestWebApplication 10 | { 11 | public class Program 12 | { 13 | public static void Main(string[] args) 14 | { 15 | var host = new WebHostBuilder() 16 | .UseKestrel() 17 | .UseContentRoot(Directory.GetCurrentDirectory()) 18 | .UseIISIntegration() 19 | .UseStartup() 20 | .Build(); 21 | 22 | host.Run(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Verbose", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | }, 10 | "ServiceConfiguration": { 11 | "Hostname": "", 12 | "MongoConnection": "mongodb://mongo.service.consul:27017", 13 | "RabbitMQConnections": [ 14 | { 15 | "Uri": "amqp://rabbitmq.service.consul", 16 | "Username": "username", 17 | "Password": "changme_soon" 18 | } 19 | ], 20 | "ChangeNotificationServers": [ "tcp://localhost" ] 21 | }, 22 | "LWM2MBootstrap": { 23 | "Port": 15683, 24 | "SecureOnly": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:61504/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "api/values", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "web": { 20 | "commandName": "web", 21 | "environmentVariables": { 22 | "ASPNETCORE_ENVIRONMENT": "Development" 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/CentOS-7.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - ca-certificates 4 | 5 | # Valid Versions 6 | #docker-engine-1.11.2-1.el7.centos 7 | #docker-engine-1.11.1-1.el7.centos 8 | #docker-engine-1.11.0-1.el7.centos 9 | #docker-engine-1.10.3-1.el7.centos 10 | #docker-engine-1.10.2-1.el7.centos 11 | #docker-engine-1.10.1-1.el7.centos 12 | #docker-engine-1.10.0-1.el7.centos 13 | #docker-engine-1.9.1-1.el7.centos 14 | #docker-engine-1.9.0-1.el7.centos 15 | #docker-engine-1.8.3-1.el7.centos 16 | #docker-engine-1.8.2-1.el7.centos 17 | #docker-engine-1.8.1-1.el7.centos 18 | #docker-engine-1.8.0-1.el7.centos 19 | #docker-engine-1.7.1-1.el7.centos 20 | #docker-engine-1.7.0-1.el7.centos 21 | docker_engine_package_name: docker-engine-1.9.1-1.el7.centos 22 | docker_engine_user: centos 23 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/PSKIdentities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/PSKIdentities.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/TestWebApplication/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:52535/", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "launchUrl": "api/values", 15 | "environmentVariables": { 16 | "ASPNETCORE_ENVIRONMENT": "Development" 17 | } 18 | }, 19 | "TestWebApplication": { 20 | "commandName": "Project", 21 | "launchBrowser": true, 22 | "launchUrl": "http://localhost:5000/", 23 | "environmentVariables": { 24 | "ASPNETCORE_ENVIRONMENT": "Development" 25 | } 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /test/LWM2MTestClient/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "CoAP": "1.1.0", 9 | "DTLS.Net": "1.0.21", 10 | "Imagination.LWM2M.Common": "1.0.5-*", 11 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 12 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final", 13 | "Microsoft.Extensions.Logging": "1.0.0-rc2-final", 14 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final", 15 | "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final", 16 | "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-final", 17 | "Newtonsoft.Json": "8.0.3" 18 | }, 19 | 20 | "frameworks": { 21 | "net451": { 22 | "imports": "netstandard1.5" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test/DeviceServerTests/testconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "DeviceServerTests": { 3 | "RestAPI": { 4 | "URI": "http://localhost:8080", 5 | "ContentType": "xml", //"json" 6 | "Authentication": { 7 | "MasterKey": "b3JnYW5pc2F0aW9uXzBfa2V5", 8 | "MasterSecret": "b3JnYW5pc2F0aW9uXzBfa2V5", 9 | "Key": "8H8QhabSbtoRy9GK776u_k7cj3J0ozy322LQQRrh_hsozgAAIQBxvylxmVuzrc90S8c2_Vf_oTrKFnM58oVoxA", 10 | "Secret": "l7U2LhKfcp95LpvAmEhPSoItcf_z9_gKZd8Ew3h0OwK32K12fTzKvuTiksnqp4sHo_BOvZTuqJftKsDzZ8p0dg" 11 | } 12 | }, 13 | "LWM2MClient": { 14 | "URI": "coaps://localhost" 15 | }, 16 | 17 | "Identity": { 18 | "PSK": { 19 | "Key": "oFIrQFrW8EWcZ5u7eGfrkw", 20 | "Secret": "7CCDE14A5CF3B71C0C08C8B7F9E5" 21 | }, 22 | "Certificate": { 23 | 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/README.md: -------------------------------------------------------------------------------- 1 | # API documentation generator 2 | ---- 3 | 4 | This tool generates documentation for the LWM2M device management server REST API by using reflection to gather assemblies 5 | from an Imagination.DeviceServer executable, reading metadata from any class that extends ControllerBase and serialising 6 | a filtered subset of required metadata into requested output formats. 7 | 8 | This tool currently supports RAML 0.8 serialisation. 9 | 10 | ## Getting started 11 | 12 | Run the following command for help on how to run the tool: 13 | 14 | `Imagination.APIDocGenerator -h` 15 | 16 | Refer to **appsettings.json** for tool configuration settings. 17 | 18 | _Note: In order to use this tool, the Device Server must first be built._ 19 | 20 | ## Development tasks 21 | 22 | - Implement RAML 1.0 serialiser 23 | - Implement Swagger YAML and JSON serialisers -------------------------------------------------------------------------------- /src/Imagination.Common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.4-*", 3 | "authors": [ "Imagination Technologies" ], 4 | "dependencies": { 5 | "Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc2-final", 6 | "MongoDB.Driver": "2.2.3", 7 | "RabbitMQ.Client": "3.6.1", 8 | "Newtonsoft.Json": "8.0.3", 9 | "Microsoft.Extensions.Logging.Abstractions": "1.0.0-rc2-final", 10 | "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final" 11 | }, 12 | "description": "Imagination.Common Class Library", 13 | "frameworks": { 14 | "net451": { 15 | "imports": "netstandard1.5", 16 | "frameworkAssemblies": { 17 | "System.Drawing": "4.0.0.0", 18 | "System.Xml": "4.0.0.0", 19 | "System.Xml.Serialization": "4.0.0.0" 20 | } 21 | } 22 | }, 23 | "packOptions": { 24 | "licenseUrl": "", 25 | "projectUrl": "", 26 | "tags": [ "" ] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /launch_all.bat: -------------------------------------------------------------------------------- 1 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.Service.Subscription 2 | start bin\Debug\net451\win7-x64\Imagination.Service.Subscription.exe 3 | 4 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.Service.Webhook 5 | start bin\Debug\net451\win7-x64\Imagination.Service.Webhook.exe 6 | 7 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.Service.ChangeNotification 8 | start bin\Debug\net451\win7-x64\Imagination.Service.ChangeNotification.exe 9 | 10 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.LWM2M.Bootstrap 11 | start bin\Debug\net451\win7-x64\Imagination.LWM2M.Bootstrap.exe 12 | 13 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.LWM2M.Server 14 | start bin\Debug\net451\win7-x64\Imagination.LWM2M.Server.exe 15 | 16 | cd D:\Projects\Imagination.DeviceServer\src\Imagination.WebService.DeviceServer 17 | start bin\Debug\net451\win7-x64\Imagination.WebService.DeviceServer.exe 18 | -------------------------------------------------------------------------------- /src/Imagination.Service.Common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | 4 | "description": "Imagination.Service.Common Class Library", 5 | "authors": [ "Imagination Technologies" ], 6 | "packOptions": { 7 | "tags": [ "" ], 8 | "projectUrl": "", 9 | "licenseUrl": "" 10 | }, 11 | 12 | "frameworks": { 13 | "net451": { 14 | "imports": "netstandard1.5" 15 | } 16 | }, 17 | 18 | "dependencies": { 19 | "Imagination.Common": "1.0.4-*", 20 | "Imagination.Model": "1.0.3-*", 21 | "Microsoft.AspNetCore.Http.Abstractions": "1.0.0-rc2-final", 22 | "Microsoft.AspNetCore.Mvc.Formatters.Json": "1.0.0-rc2-final", 23 | "Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0-rc2-final", 24 | "Microsoft.IdentityModel.Tokens": "5.0.0-rc2-305061149", 25 | "Newtonsoft.Json": "8.0.3", 26 | "System.Buffers": "4.0.0-rc2-24027", 27 | "System.IdentityModel.Tokens.Jwt": "5.0.0-rc2-305061149" 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /src/Imagination.WebService.Common/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.3-*", 3 | "description": "Imagination.WebService.Common Class Library", 4 | "authors": [ "delme.thomas" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "frameworks": { 12 | "net451": { 13 | "imports": "netstandard1.5" 14 | } 15 | }, 16 | 17 | "dependencies": { 18 | "Imagination.Common": "1.0.4-*", 19 | "Imagination.Service.Common": "1.0.0-*", 20 | "Microsoft.AspNetCore.Http.Abstractions": "1.0.0-rc2-final", 21 | "Microsoft.AspNetCore.Mvc.Formatters.Json": "1.0.0-rc2-final", 22 | "Microsoft.AspNetCore.Mvc.Formatters.Xml": "1.0.0-rc2-final", 23 | "Microsoft.IdentityModel.Tokens": "5.0.0-rc2-305061149", 24 | "Newtonsoft.Json": "8.0.3", 25 | "System.Buffers": "4.0.0-rc2-24027", 26 | "System.IdentityModel.Tokens.Jwt": "5.0.0-rc2-305061149" 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /test/DeviceServerTests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("Hewlett-Packard Company")] 10 | [assembly: AssemblyProduct("FunctionalTests")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("2e7a6758-fb2f-49d7-b171-70f3b3b06e40")] 20 | -------------------------------------------------------------------------------- /test/LWM2MTestClient/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("Hewlett-Packard Company")] 10 | [assembly: AssemblyProduct("LWM2MTestClient")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("8a593841-62ea-4741-833d-85a361b38618")] 20 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Documentation/NamedParameterDocumentationAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace Imagination.Documentation 7 | { 8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true)] 9 | public class NamedParameterDocumentationAttribute : Attribute 10 | { 11 | public string Name { get; set; } 12 | public string DisplayName { get; set; } 13 | public TNamedParameterType Type { get; set; } 14 | public string Description { get; set; } 15 | 16 | public NamedParameterDocumentationAttribute(string name, string displayName, TNamedParameterType type, string description) 17 | { 18 | Name = name; 19 | DisplayName = displayName; 20 | Type = type; 21 | Description = description; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/tasks/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Tasks 2 | Herein lie all the YAML defined tasks relating to automating a given role. 3 | 4 | For example, 5 | 6 | ```yaml 7 | --- 8 | - name: Add Nginx Repository 9 | apt_repository: repo='ppa:nginx/stable' state=present 10 | 11 | - name: Install Nginx 12 | apt: pgk=nginx state=latest update_cache=true 13 | notify: 14 | - Start Nginx 15 | 16 | - name: Add H5BP Config 17 | copy: src=h5bp dest=/etc/nginx owner=root group=root 18 | 19 | - name: Disable Default Config 20 | file: dest=/etc/nginx/sites-enabled/defalt state=absent 21 | notify: 22 | - Reload Nginx 23 | 24 | - name: Add SFH Site Config 25 | template: src=serversforhackers.com.j2 dest=/etc/nginx/sites-available/{{ domain }} owner=root group=root 26 | 27 | - name: Enable SFH Site Config 28 | file: src=/etc/nginx/sites-available/{{ domain }} dest=/etc/nginx/sites-enabled/{{ domain }} state=link 29 | notify: 30 | - Reload Nginx 31 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-compose/tasks/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Tasks 2 | Herein lie all the YAML defined tasks relating to automating a given role. 3 | 4 | For example, 5 | 6 | ```yaml 7 | --- 8 | - name: Add Nginx Repository 9 | apt_repository: repo='ppa:nginx/stable' state=present 10 | 11 | - name: Install Nginx 12 | apt: pgk=nginx state=latest update_cache=true 13 | notify: 14 | - Start Nginx 15 | 16 | - name: Add H5BP Config 17 | copy: src=h5bp dest=/etc/nginx owner=root group=root 18 | 19 | - name: Disable Default Config 20 | file: dest=/etc/nginx/sites-enabled/defalt state=absent 21 | notify: 22 | - Reload Nginx 23 | 24 | - name: Add SFH Site Config 25 | template: src=serversforhackers.com.j2 dest=/etc/nginx/sites-available/{{ domain }} owner=root group=root 26 | 27 | - name: Enable SFH Site Config 28 | file: src=/etc/nginx/sites-available/{{ domain }} dest=/etc/nginx/sites-enabled/{{ domain }} state=link 29 | notify: 30 | - Reload Nginx 31 | ``` -------------------------------------------------------------------------------- /ansible/roles/docker-engine/tasks/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Tasks 2 | Herein lie all the YAML defined tasks relating to automating a given role. 3 | 4 | For example, 5 | 6 | ```yaml 7 | --- 8 | - name: Add Nginx Repository 9 | apt_repository: repo='ppa:nginx/stable' state=present 10 | 11 | - name: Install Nginx 12 | apt: pgk=nginx state=latest update_cache=true 13 | notify: 14 | - Start Nginx 15 | 16 | - name: Add H5BP Config 17 | copy: src=h5bp dest=/etc/nginx owner=root group=root 18 | 19 | - name: Disable Default Config 20 | file: dest=/etc/nginx/sites-enabled/defalt state=absent 21 | notify: 22 | - Reload Nginx 23 | 24 | - name: Add SFH Site Config 25 | template: src=serversforhackers.com.j2 dest=/etc/nginx/sites-available/{{ domain }} owner=root group=root 26 | 27 | - name: Enable SFH Site Config 28 | file: src=/etc/nginx/sites-available/{{ domain }} dest=/etc/nginx/sites-enabled/{{ domain }} state=link 29 | notify: 30 | - Reload Nginx 31 | ``` -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("Hewlett-Packard Company")] 10 | [assembly: AssemblyProduct("APIDocGenerator")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("79b7887f-33b3-4e3c-9cd7-5bcbfc3ecf19")] 20 | -------------------------------------------------------------------------------- /src/Imagination.Service.Subscription/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyConfiguration("")] 9 | [assembly: AssemblyCompany("Hewlett-Packard Company")] 10 | [assembly: AssemblyProduct("Imagination.Service.Subscription")] 11 | [assembly: AssemblyTrademark("")] 12 | 13 | // Setting ComVisible to false makes the types in this assembly not visible 14 | // to COM components. If you need to access a type in this assembly from 15 | // COM, set the ComVisible attribute to true on that type. 16 | [assembly: ComVisible(false)] 17 | 18 | // The following GUID is for the ID of the typelib if this project is exposed to COM 19 | [assembly: Guid("cad7c71a-5dde-48bd-913c-c95a67931617")] 20 | -------------------------------------------------------------------------------- /docker/ds/root.cnf: -------------------------------------------------------------------------------- 1 | [ ca ] 2 | default_ca = CA_default # The default ca section 3 | 4 | [ CA_default ] 5 | 6 | dir = ./root # top dir 7 | database = $dir/index.txt # index file. 8 | new_certs_dir = $dir # new certs dir 9 | 10 | certificate = ./Root.crt # The CA cert 11 | serial = $dir/serial # serial no file 12 | private_key = ./Root.key # CA private key 13 | RANDFILE = $dir/.rand # random number file 14 | 15 | default_days = 3650 # how long to certify for 16 | default_crl_days= 30 # how long before next CRL 17 | default_md = sha256 # md to use 18 | 19 | policy = policy_any # default policy 20 | 21 | [ policy_any ] 22 | countryName = supplied 23 | stateOrProvinceName = optional 24 | organizationName = optional 25 | organizationalUnitName = optional 26 | commonName = supplied 27 | emailAddress = optional 28 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-14.10.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-extra-{{ ansible_kernel }} 7 | 8 | # Valid Versions 9 | #docker-engine=1.11.2-0~wily 10 | #docker-engine=1.11.1-0~wily 11 | #docker-engine=1.11.0-0~wily 12 | #docker-engine=1.10.3-0~wily 13 | #docker-engine=1.10.1-0~wily 14 | #docker-engine=1.10.2-0~wily 15 | #docker-engine=1.10.0-0~wily 16 | #docker-engine=1.9.1-0~wily 17 | #docker-engine=1.9.0-0~wily 18 | #docker-engine=1.8.3-0~wily 19 | #docker-engine=1.8.2-0~wily 20 | #docker-engine=1.8.1-0~wily 21 | #docker-engine=1.8.0-0~wily 22 | #docker-engine=1.7.1-0~wily 23 | #docker-engine=1.6.2-0~wily 24 | #docker-engine=1.6.1-0~wily 25 | #docker-engine=1.6.0-0~wily 26 | #docker-engine=1.5.0-0~wily 27 | docker_engine_package_name: docker-engine=1.11.2-0~wily 28 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 29 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 30 | docker_engine_user: ubuntu -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-15.04.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-extra-{{ ansible_kernel }} 7 | 8 | # Valid Versions 9 | #docker-engine=1.11.2-0~wily 10 | #docker-engine=1.11.1-0~wily 11 | #docker-engine=1.11.0-0~wily 12 | #docker-engine=1.10.3-0~wily 13 | #docker-engine=1.10.1-0~wily 14 | #docker-engine=1.10.2-0~wily 15 | #docker-engine=1.10.0-0~wily 16 | #docker-engine=1.9.1-0~wily 17 | #docker-engine=1.9.0-0~wily 18 | #docker-engine=1.8.3-0~wily 19 | #docker-engine=1.8.2-0~wily 20 | #docker-engine=1.8.1-0~wily 21 | #docker-engine=1.8.0-0~wily 22 | #docker-engine=1.7.1-0~wily 23 | #docker-engine=1.6.2-0~wily 24 | #docker-engine=1.6.1-0~wily 25 | #docker-engine=1.6.0-0~wily 26 | #docker-engine=1.5.0-0~wily 27 | docker_engine_package_name: docker-engine=1.11.2-0~wily 28 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 29 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 30 | docker_engine_user: ubuntu -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-15.10.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-extra-{{ ansible_kernel }} 7 | 8 | # Valid Versions 9 | #docker-engine=1.11.2-0~wily 10 | #docker-engine=1.11.1-0~wily 11 | #docker-engine=1.11.0-0~wily 12 | #docker-engine=1.10.3-0~wily 13 | #docker-engine=1.10.1-0~wily 14 | #docker-engine=1.10.2-0~wily 15 | #docker-engine=1.10.0-0~wily 16 | #docker-engine=1.9.1-0~wily 17 | #docker-engine=1.9.0-0~wily 18 | #docker-engine=1.8.3-0~wily 19 | #docker-engine=1.8.2-0~wily 20 | #docker-engine=1.8.1-0~wily 21 | #docker-engine=1.8.0-0~wily 22 | #docker-engine=1.7.1-0~wily 23 | #docker-engine=1.6.2-0~wily 24 | #docker-engine=1.6.1-0~wily 25 | #docker-engine=1.6.0-0~wily 26 | #docker-engine=1.5.0-0~wily 27 | docker_engine_package_name: docker-engine=1.11.2-0~wily 28 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 29 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 30 | docker_engine_user: ubuntu -------------------------------------------------------------------------------- /docker/ds/intermediate.cnf: -------------------------------------------------------------------------------- 1 | [ ca ] 2 | default_ca = CA_default # The default ca section 3 | 4 | [ CA_default ] 5 | 6 | dir = ./int # top dir 7 | database = $dir/index.txt # index file. 8 | new_certs_dir = $dir # new certs dir 9 | 10 | certificate = ./CA.crt # The CA cert 11 | serial = $dir/serial # serial no file 12 | private_key = ./CA.key # CA private key 13 | RANDFILE = $dir/.rand # random number file 14 | 15 | default_days = 3650 # how long to certify for 16 | default_crl_days= 30 # how long before next CRL 17 | default_md = sha256 # md to use 18 | 19 | policy = policy_any # default policy 20 | 21 | [ policy_any ] 22 | countryName = supplied 23 | stateOrProvinceName = optional 24 | organizationName = optional 25 | organizationalUnitName = optional 26 | commonName = supplied 27 | emailAddress = optional 28 | -------------------------------------------------------------------------------- /test/DeviceServerTests/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "DeviceServer Functional Tests", 4 | "authors": [ "Imagination Technologies" ], 5 | "testRunner": "xunit", 6 | "dependencies": { 7 | "dotnet-test-xunit": "1.0.0-*", 8 | "Imagination.WebService.Common": "1.0.3-*", 9 | "Imagination.WebService.DeviceServer": "1.0.3-*", 10 | "LWM2MTestClient": "1.0.0-*", 11 | "Microsoft.AspNetCore.TestHost": "1.0.0-rc2-final", 12 | "Microsoft.Extensions.Configuration.Binder": "1.0.0-rc2-final", 13 | "System.Net.Http": "4.0.0.0", 14 | "System.Text.RegularExpressions": "4.0.10", 15 | "TestWebApplication": "1.0.0-*", 16 | "xunit": "2.1.0", 17 | "xunit.runner.console": "2.1.0" 18 | }, 19 | "frameworks": { 20 | "net451": { 21 | "imports": "netstandard1.5", 22 | "frameworkAssemblies": { 23 | } 24 | } 25 | }, 26 | "buildOptions": { 27 | "copyToOutput": { 28 | "include": [ "xunit.runner.json", "testconfig.json" ] 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-14.04.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-extra-{{ ansible_kernel }} 7 | 8 | # Valid Versions 9 | #docker-engine=1.11.2-0~trusty 10 | #docker-engine=1.11.1-0~trusty 11 | #docker-engine=1.11.0-0~trusty 12 | #docker-engine=1.10.3-0~trusty 13 | #docker-engine=1.10.2-0~trusty 14 | #docker-engine=1.10.1-0~trusty 15 | #docker-engine=1.10.0-0~trusty 16 | #docker-engine=1.9.1-0~trusty 17 | #docker-engine=1.9.0-0~trusty 18 | #docker-engine=1.8.3-0~trusty 19 | #docker-engine=1.8.2-0~trusty 20 | #docker-engine=1.8.1-0~trusty 21 | #docker-engine=1.8.0-0~trusty 22 | #docker-engine=1.7.1-0~trusty 23 | #docker-engine=1.7.0-0~trusty 24 | #docker-engine=1.6.2-0~trusty 25 | #docker-engine=1.6.1-0~trusty 26 | #docker-engine=1.6.0-0~trusty 27 | #docker-engine=1.5.0-0~trusty 28 | docker_engine_package_name: docker-engine=1.11.2-0~trusty 29 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 30 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 31 | docker_engine_user: ubuntu -------------------------------------------------------------------------------- /ansible/roles/docker-engine/vars/Ubuntu-12.04.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dependencies: 3 | - apt-transport-https 4 | - ca-certificates 5 | - apparmor 6 | - linux-image-generic-lts-trusty 7 | - linux-image-extra-{{ ansible_kernel }} 8 | 9 | # Valid Versions 10 | #docker-engine_1.11.2-0~precise 11 | #docker-engine_1.11.1-0~precise 12 | #docker-engine_1.11.0-0~precise 13 | #docker-engine_1.10.3-0~precise 14 | #docker-engine_1.10.2-0~precise 15 | #docker-engine_1.10.1-0~precise 16 | #docker-engine_1.10.0-0~precise 17 | #docker-engine_1.9.1-0~precise 18 | #docker-engine_1.9.0-0~precise 19 | #docker-engine_1.8.3-0~precise 20 | #docker-engine_1.8.2-0~precise 21 | #docker-engine_1.8.1-0~precise 22 | #docker-engine_1.8.0-0~precise 23 | #docker-engine_1.7.1-0~precise 24 | #docker-engine_1.6.2-0~precise 25 | #docker-engine_1.6.1-0~precise 26 | #docker-engine_1.6.0-0~precise 27 | #docker-engine_1.5.0-0~precise 28 | docker_engine_package_name: docker-engine=1.11.2-0~precise 29 | docker_engine_key_server: "hkp://p80.pool.sks-keyservers.net:80" 30 | docker_engine_gpg_key: "58118E89F3A912897C070ADBF76221572C52609D" 31 | docker_engine_user: ubuntu -------------------------------------------------------------------------------- /src/Imagination.Service.ChangeNotification/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.3-*", 3 | "description": "Imagination.Service.ChangeNotification Console Application", 4 | "authors": [ "delme.thomas" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "buildOptions": { 12 | "emitEntryPoint": true 13 | }, 14 | 15 | "dependencies": { 16 | "Imagination.Common": "1.0.4-*", 17 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 18 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 19 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 20 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 21 | }, 22 | 23 | "commands": { 24 | "Imagination.Service.ChangeNotification": "Imagination.Service.ChangeNotification" 25 | }, 26 | 27 | "frameworks": { 28 | "net451": { 29 | "imports": "netstandard1.5", 30 | "frameworkAssemblies": { 31 | "System.Configuration": "4.0.0.0" 32 | } 33 | } 34 | } 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "buildOptions": { 4 | "emitEntryPoint": true 5 | }, 6 | 7 | "dependencies": { 8 | "Imagination.Service.Common": "1.0.0-*", 9 | "Imagination.WebService.DeviceServer": "1.0.3-*", 10 | //"Imagination.Service.Common": "1.0.0-*", 11 | //"Imagination.Webservice.Common": "1.0.2-*", 12 | "Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final", 13 | "Microsoft.Extensions.Configuration": "1.0.0-rc2-final", 14 | "Microsoft.Extensions.Configuration.Binder": "1.0.0-rc2-final", 15 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 16 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 17 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 18 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 19 | /*"Microsoft.NETCore.App": { 20 | "type": "platform", 21 | "version": "1.0.0-rc2-3002702" 22 | }*/ 23 | }, 24 | 25 | "frameworks": { 26 | "net451": { 27 | "imports": "netstandard1.5" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/DeviceServerTests/Fixtures/TestWebAppFixture.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.TestHost; 6 | using Microsoft.AspNetCore.Hosting; 7 | using TestWebApplication; 8 | using System.Net.Http; 9 | 10 | namespace DeviceServerTests.Fixtures 11 | { 12 | public class TestWebAppFixture : IDisposable 13 | { 14 | public TestServer TestServer { get; private set; } 15 | public HttpClient Client { get; private set; } 16 | 17 | public TestWebAppFixture() 18 | { 19 | //WebHostBuilder builder = TestServer.CreateBuilder(); 20 | WebHostBuilder builder = new WebHostBuilder(); 21 | builder.UseStartup(); 22 | builder.UseUrls("http://localhost:56789"); 23 | 24 | TestServer = new TestServer(builder); 25 | 26 | Client = TestServer.CreateClient(); 27 | } 28 | 29 | public void Dispose() 30 | { 31 | TestServer.Dispose(); 32 | Client.Dispose(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ansible/roles/_template_role/templates/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Templates 2 | Ansible templates use Python's Jinja2, but not all of it so there are a few caveats with templating, but minimal. In relation to variables, the Ansible crew frown on merging, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 3 | 4 | Example : 5 | 6 | ```yaml 7 | - name: Configure Nginx 8 | template: 9 | src: /nginx.conf.j2 10 | dest: /etc/nginx/nginx.conf 11 | owner: root 12 | group: root 13 | mode: 0600 14 | ``` 15 | Template Variables under role/templates/main.yml 16 | 17 | ```yaml 18 | domain: example.com 19 | ``` 20 | 21 | A very bad Nginx template. Make sure template names are ended with .j2 for conformity. 22 | ```jinja2 23 | # Use h5bp Nginx config for security ;) 24 | server { 25 | listen 80 default_server; 26 | server_name *.{{ '{{' }} domain {{ '}}' }}; 27 | 28 | root /var/www/{{ '{{' }} domain {{ '}}' }}/public; 29 | index index.html index.htm index.php; 30 | 31 | location / { 32 | try_files $uri $uri/ /index.php$is_args$args; 33 | } 34 | } 35 | ``` 36 | -------------------------------------------------------------------------------- /ansible/roles/docker-compose/templates/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Templates 2 | Ansible templates use Python's Jinja2, but not all of it so there are a few caveats with templating, but minimal. In relation to variables, the Ansible crew frown on merging, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 3 | 4 | Example : 5 | 6 | ```yaml 7 | - name: Configure Nginx 8 | template: 9 | src: /nginx.conf.j2 10 | dest: /etc/nginx/nginx.conf 11 | owner: root 12 | group: root 13 | mode: 0600 14 | ``` 15 | Template Variables under role/templates/main.yml 16 | 17 | ```yaml 18 | domain: example.com 19 | ``` 20 | 21 | A very bad Nginx template. Make sure template names are ended with .j2 for conformity. 22 | ```jinja2 23 | # Use h5bp Nginx config for security ;) 24 | server { 25 | listen 80 default_server; 26 | server_name *.{{ '{{' }} domain {{ '}}' }}; 27 | 28 | root /var/www/{{ '{{' }} domain {{ '}}' }}/public; 29 | index index.html index.htm index.php; 30 | 31 | location / { 32 | try_files $uri $uri/ /index.php$is_args$args; 33 | } 34 | } 35 | ``` 36 | -------------------------------------------------------------------------------- /ansible/roles/docker-engine/templates/readme.md: -------------------------------------------------------------------------------- 1 | # Ansible Templates 2 | Ansible templates use Python's Jinja2, but not all of it so there are a few caveats with templating, but minimal. In relation to variables, the Ansible crew frown on merging, so it is advisable to keep all variables separate but prefixed with a namespace to help avoid issues. 3 | 4 | Example : 5 | 6 | ```yaml 7 | - name: Configure Nginx 8 | template: 9 | src: /nginx.conf.j2 10 | dest: /etc/nginx/nginx.conf 11 | owner: root 12 | group: root 13 | mode: 0600 14 | ``` 15 | Template Variables under role/templates/main.yml 16 | 17 | ```yaml 18 | domain: example.com 19 | ``` 20 | 21 | A very bad Nginx template. Make sure template names are ended with .j2 for conformity. 22 | ```jinja2 23 | # Use h5bp Nginx config for security ;) 24 | server { 25 | listen 80 default_server; 26 | server_name *.{{ '{{' }} domain {{ '}}' }}; 27 | 28 | root /var/www/{{ '{{' }} domain {{ '}}' }}/public; 29 | index index.html index.htm index.php; 30 | 31 | location / { 32 | try_files $uri $uri/ /index.php$is_args$args; 33 | } 34 | } 35 | ``` 36 | -------------------------------------------------------------------------------- /src/Imagination.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.Common")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.Common")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c4e34a8-990f-464f-9b70-0be91250bc92")] 24 | -------------------------------------------------------------------------------- /src/Imagination.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.Model")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.Model")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("1481fb58-5bcb-4960-a1b9-ec0adbfef011")] 24 | -------------------------------------------------------------------------------- /src/Imagination.Service.Subscription/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "Imagination.Service.Subscription Console Application", 4 | "authors": [ "Imagination Technologies" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "buildOptions": { 12 | "emitEntryPoint": true 13 | }, 14 | 15 | "dependencies": { 16 | "Imagination.Common": "1.0.4-*", 17 | "Imagination.LWM2M.Common": "1.0.5-*", 18 | "Imagination.Model": "1.0.3-*", 19 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 20 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 21 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 22 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 23 | }, 24 | 25 | "commands": { 26 | "Imagination.Service.Subscription": "Imagination.Service.Subscription" 27 | }, 28 | 29 | "frameworks": { 30 | "net451": { 31 | "imports": "netstandard1.5", 32 | "frameworkAssemblies": { 33 | "System.Configuration": "4.0.0.0" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.LWM2M.Common")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.LWM2M.Common")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("259a02c7-4dbc-4e7c-acec-d03282e7bca0")] 24 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.LWM2M.Server")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.LWM2M.Server")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("2e7d84a1-3708-448f-8041-e06d28b59237")] 24 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.LWM2M.Bootstrap")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.LWM2M.Bootstrap")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9e0170cb-f3c0-4c0a-8c4e-13c889721437")] 24 | -------------------------------------------------------------------------------- /src/Imagination.WebService.Common/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.WebService.Common")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.WebService.Common")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("5017431e-0f71-4732-a6d2-1c19a9660b3f")] 24 | -------------------------------------------------------------------------------- /src/Imagination.Service.Webhook/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-*", 3 | "description": "Imagination.Service.Webhook Console Application", 4 | "authors": [ "Imagination Technologies" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "buildOptions": { 12 | "emitEntryPoint": true 13 | }, 14 | 15 | "dependencies": { 16 | "Imagination.Common": "1.0.4-*", 17 | "Imagination.Service.Common": "1.0.0-*", 18 | "Imagination.LWM2M.Common": "1.0.5-*", 19 | "Imagination.Model": "1.0.3-*", 20 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 21 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 22 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 23 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 24 | }, 25 | 26 | "commands": { 27 | "Imagination.Service.Webhook": "Imagination.Service.Webhook" 28 | }, 29 | 30 | "frameworks": { 31 | "net451": { 32 | "imports": "netstandard1.5", 33 | "frameworkAssemblies": { 34 | "System.Configuration": "4.0.0.0" 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Imagination.WebService.Common/Imagination.WebService.Common.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 5017431e-0f71-4732-a6d2-1c19a9660b3f 10 | Imagination 11 | ..\..\artifacts\obj\$(MSBuildProjectName) 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Imagination.WebService.DeviceServer.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 3490757a-2165-4170-8867-48cd336497cf 10 | Imagination 11 | ..\artifacts\obj\$(MSBuildProjectName) 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Imagination.Service.ChangeNotification/Imagination.Service.ChangeNotification.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 308f76e5-9a63-4920-901b-d827730a7fa3 10 | Imagination 11 | ..\..\artifacts\obj\$(MSBuildProjectName) 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Imagination.Service.ChangeNotification/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Imagination.Service.ChangeNotification")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Imagination Technologies")] 12 | [assembly: AssemblyProduct("Imagination.Service.ChangeNotification")] 13 | [assembly: AssemblyCopyright("Copyright © Imagination Technologies 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("308f76e5-9a63-4920-901b-d827730a7fa3")] 24 | -------------------------------------------------------------------------------- /src/Imagination.Model/Imagination.Model.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 1481fb58-5bcb-4960-a1b9-ec0adbfef011 10 | Imagination.Model 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/TestWebApplication/TestWebApp.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 18724c92-95bb-420b-b7c0-94291d254b42 10 | TestWebApp 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Common/Imagination.LWM2M.Common.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 259a02c7-4dbc-4e7c-acec-d03282e7bca0 10 | Imagination.LWM2M 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/LWM2MTestClient/LWM2MTestClient.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 8a593841-62ea-4741-833d-85a361b38618 11 | LWM2MTestClient 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.3-*", 3 | "description": "Imagination.LWM2M.Bootstrap Console Application", 4 | "authors": [ "Imagination Technologies" ], 5 | "packOptions": { 6 | "tags": [ "" ], 7 | "projectUrl": "", 8 | "licenseUrl": "" 9 | }, 10 | 11 | "buildOptions": { 12 | "emitEntryPoint": true 13 | }, 14 | 15 | 16 | "dependencies": { 17 | "Imagination.Common": "1.0.4-*", 18 | "Imagination.Model": "1.0.3-*", 19 | "CoAP": "1.1.0", 20 | "Imagination.LWM2M.Common": "1.0.5-*", 21 | "Microsoft.Extensions.Configuration": "1.0.0-rc2-final", 22 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 23 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 24 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 25 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 26 | }, 27 | 28 | "commands": { 29 | "Imagination.LWM2M.Bootstrap": "Imagination.LWM2M.Bootstrap" 30 | }, 31 | 32 | "frameworks": { 33 | "net451": { 34 | "frameworkAssemblies": { 35 | "System.ServiceModel": "4.0.0.0" 36 | }, 37 | "imports": "netstandard1.5" 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.6-*", 3 | "description": "Imagination.LWM2M.Server Console Application", 4 | "authors": [ "Imagination Technologies" ], 5 | 6 | "packOptions": { 7 | 8 | "tags": [ "" ], 9 | "projectUrl": "", 10 | "licenseUrl": "" 11 | }, 12 | 13 | "buildOptions": { 14 | "emitEntryPoint": true 15 | }, 16 | 17 | "dependencies": { 18 | "Imagination.Common": "1.0.4-*", 19 | "Imagination.LWM2M.Common": "1.0.5-*", 20 | "Imagination.Model": "1.0.3-*", 21 | "Microsoft.Extensions.Configuration": "1.0.0-rc2-final", 22 | "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final", 23 | "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final", 24 | "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0-rc2-final", 25 | "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final" 26 | }, 27 | 28 | "commands": { 29 | "Imagination.LWM2M.Server": "Imagination.LWM2M.Server" 30 | }, 31 | 32 | "frameworks": { 33 | "net451": { 34 | "frameworkAssemblies": { 35 | "System.Configuration": "4.0.0.0", 36 | "System.ServiceModel": "4.0.0.0" 37 | }, 38 | "imports": "netstandard1.5" 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tools/Imagination.APIDocGenerator/Imagination.APIDocGenerator.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 79b7887f-33b3-4e3c-9cd7-5bcbfc3ecf19 10 | Imagination.Tools.APIDocGenerator 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Bootstrap/Imagination.LWM2M.Bootstrap.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 9e0170cb-f3c0-4c0a-8c4e-13c889721437 11 | Imagination.LWM2M.Bootstrap 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Imagination.Service.Common/Imagination.Service.Common.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 0ca01feb-ed3e-4242-b720-f30cff618ada 11 | Imagination.Service.Common 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Imagination.WebService.DeviceServer/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Hosting; 7 | using Microsoft.AspNetCore.Builder; 8 | using Microsoft.AspNetCore.Hosting.Server.Features; 9 | 10 | namespace Imagination.WebService.DeviceServer 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | var host = new WebHostBuilder() 17 | .UseKestrel() 18 | .UseContentRoot(Directory.GetCurrentDirectory()) 19 | .UseIISIntegration() 20 | .UseStartup() 21 | .Build(); 22 | 23 | IServerAddressesFeature serverAddressesFeature = host.ServerFeatures.Get(); 24 | if (serverAddressesFeature != null) 25 | { 26 | serverAddressesFeature.Addresses.Clear(); 27 | serverAddressesFeature.Addresses.Add("http://*:8080"); 28 | } 29 | 30 | host.Run(); 31 | BusinessLogic.BusinessLogicFactory.ServiceMessages.Stop(); 32 | Console.WriteLine("Exiting."); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Imagination.Service.Webhook/Imagination.Service.Webhook.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | 94ff8638-fcd8-47d0-b600-c843663ef8e9 11 | Imagination.Service.Webhook 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Imagination.Service.Subscription/Imagination.Service.Subscription.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 10 | cad7c71a-5dde-48bd-913c-c95a67931617 11 | Imagination.Service.Subscription 12 | .\obj 13 | .\bin\ 14 | v4.5.2 15 | 16 | 17 | 18 | 2.0 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /doc/userGuide.md: -------------------------------------------------------------------------------- 1 | ![](images/img.png) 2 | ---- 3 | 4 | # The LWM2M device management server user guide 5 | The device server is a self-hosted LWM2M device bootstrap/management server with CoAP and REST interfaces. The purpose of the device server is to manage the provisioning, authentication and connectivity of IoT devices, to query and supply resource information, and to service CoAP *Observe* notifications. 6 | 7 | ![](images/CreatorDev_IoT_framework_device_server_overview_100dpi.png) 8 | 9 | 10 | The device server acts as a bridge between CoAP/LWM2M on the device network side, and HTTP/REST on the internet side, allowing web and mobile applications to manage device connectivity and to utilise device side properties and resources. 11 | 12 | ## Contents 13 | 14 | * [Introduction](devServer.md) 15 | * [Installation and deployment](devServerInstallation.md) 16 | * [The device server REST API](DSRESTindex.md) 17 | * [Client authentication](authentication.md) 18 | * [Device authentication](devauth.md) 19 | * [Response optimisation](ResponseOptimization.md) 20 | * [Common operations](commonDeviceServerOperations.md) 21 | * [Subscribing to CoAP observations](subscribingToObservations.md) 22 | * [Metrics](metrics.md) 23 | * [Package versions](packageVersions.md) 24 | 25 | ---- 26 | 27 | ---- 28 | -------------------------------------------------------------------------------- /doc/Vagrant.md: -------------------------------------------------------------------------------- 1 | # Vagrant DeviceServer 2 | 3 | The Vagrantfile provided fires up and provisions a VM that can be based on your 4 | favorite operating system (at the moment CentOS 7 and Ubuntu). Under the hood 5 | Ansible is used to configure docker-engine and docker-compose. Once everything 6 | is in place it runs docker-compose up 7 | 8 | # Create the VM 9 | After having [vagrant][vg] and [VirtualBox][vb] installed, enter the repository root and 10 | run 11 | 12 | ```sh 13 | vagrant up 14 | ``` 15 | 16 | This should install everything and provision on the first run. If errors occur 17 | first try reprovisioning, then if all else fails, destroy and run up again: 18 | 19 | ```sh 20 | vagrant provision 21 | # If it hits the fan 22 | vagrant destroy && vagrant up 23 | ``` 24 | 25 | # Access services 26 | The image sets up the VM to have endpoints and services accessible from: 27 | 28 | ```sh 29 | 10.0.0.100 30 | ``` 31 | 32 | # SSH Access 33 | By ssh'ing in you can mangle anything within the VM, run docker commands, 34 | and also install your preferred applications. 35 | 36 | ```sh 37 | vagrant ssh 38 | ``` 39 | 40 | The provisioning step adds the native OS user to the docker group to run docker 41 | commands, or alternatively prepend all docker commands with sudo. 42 | 43 | [vg]: 44 | [vb]: -------------------------------------------------------------------------------- /src/Imagination.LWM2M.Server/Imagination.LWM2M.Server.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 2e7d84a1-3708-448f-8041-e06d28b59237 10 | Imagination.LWM2M.Server 11 | ..\..\artifacts\obj\$(MSBuildProjectName) 12 | .\bin\ 13 | 14 | 15 | 2.0 16 | 17 | 18 | True 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Imagination.Common/Imagination.Common.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 3c4e34a8-990f-464f-9b70-0be91250bc92 10 | Imagination 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/DeviceServerTests/DeviceServerTests.xproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | 2e7a6758-fb2f-49d7-b171-70f3b3b06e40 10 | DeviceServerTests 11 | .\obj 12 | .\bin\ 13 | v4.5.2 14 | 15 | 16 | 2.0 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /IMGLicense.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016, Imagination Technologies Limited and/or its affiliated group companies. 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 6 | 7 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 8 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 9 | 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 10 | 11 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 12 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13 | -------------------------------------------------------------------------------- /Vagrantfile: -------------------------------------------------------------------------------- 1 | # -*- mode: ruby -*- 2 | # vi: set ft=ruby : 3 | 4 | $script = <