diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..eba1110b5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..5c44f0ac3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,147 @@ +name: CI +on: + push: + branches: + - main + tags: [v*] + paths-ignore: + - README.md + - CHANGELOG.md + - LICENSE + pull_request: + # Sequence of patterns matched against refs/heads + branches: + - main + paths-ignore: + - README.md + - CHANGELOG.md + - LICENSE +env: + PROJECT: 'datasance-pot' + IMAGE_NAME: 'agent' + POTCTL_VERSION: '1.0.0' + CONTROLLER_IMAGE: 'ghcr.io/datasance/controller:latest' + +jobs: + build: + runs-on: ubuntu-20.04 + permissions: + actions: write + checks: write + contents: write + deployments: write + id-token: write + issues: write + discussions: write + packages: write + pages: write + pull-requests: write + repository-projects: write + security-events: write + statuses: write + name: Build and Publish + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' +# cache: 'gradle' + - uses: gradle/gradle-build-action@v2 + with: + gradle-version: 8.4 + arguments: build copy + + - name: 'Get Previous tag' + id: previoustag + uses: "WyriHaximus/github-action-get-previous-tag@v1" + with: + fallback: 0.0.0 + - name: Set image tag + shell: bash + id: tags + run: | + if [[ ${{ github.ref_name }} =~ ^v.* ]] ; then + VERSION=${{ github.ref_name }} + echo "VERSION=${VERSION:1}" >> "${GITHUB_OUTPUT}" + else + VERSION=${{ steps.previoustag.outputs.tag }} + echo "VERSION=${VERSION:1}-${{ github.run_number }}" >> "${GITHUB_OUTPUT}" + fi + + - name: Login to Github Container Registry + + uses: docker/login-action@v2 + with: + registry: "ghcr.io" + username: ${{ github.actor }} + password: ${{ secrets.GH_PAT }} + + - name: Build and Push to ghcr + + uses: docker/build-push-action@v3 + id: build_push_ghcr + with: + file: Dockerfile + push: true + tags: | + ghcr.io/datasance/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.VERSION }} + ghcr.io/datasance/${{ env.IMAGE_NAME }}:latest + ghcr.io/datasance/${{ env.IMAGE_NAME }}:main + + - name: Set up Ruby 3.1.4 + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.4 + - run: | + gem install --no-document fpm + fpm -h + - name: get gradle version + shell: bash + id: version + run: echo "version=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}')" >> "${GITHUB_OUTPUT}" + - name: get package version + shell: bash + id: pkg_version + run: | + if [[ ${{ github.ref_name }} =~ ^v.* ]] ; then + echo "version=${{ steps.version.outputs.version }}" >> "${GITHUB_OUTPUT}" + else + echo "version=${{ steps.version.outputs.version }}-${{ github.run_number }}" >> "${GITHUB_OUTPUT}" + fi + - run: echo ${{ steps.version.outputs.version }} + - name: Create deb package + shell: bash + id: create_deb_package + run: | + cd packaging/iofog-agent + fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk | openjdk-17-jdk' -d docker-ce -t deb -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr + echo "pkg created" + ls + - name: Create rpm package + shell: bash + id: create_rpm_package + run: | + cd packaging/iofog-agent + fpm -s dir --depends java-17-openjdk -d docker-ce -t rpm -n iofog-agent -v ${{ steps.pkg_version.outputs.version }} -a all --rpm-os 'linux' --after-install rpm.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade rpm.sh etc usr; + echo "pkg created" + ls + + - uses: bluwy/substitute-string-action@v1 + id: sub + with: + _input-text: ${{ steps.pkg_version.outputs.version }} + '-': _ + - run: echo ${{ steps.sub.outputs.result }} + + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + packaging/iofog-agent/iofog-agent_${{ steps.pkg_version.outputs.version }}_all.deb + packaging/iofog-agent/iofog-agent-${{ steps.pkg_version.outputs.version }}-1.noarch.rpm + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 diff --git a/Dockerfile b/Dockerfile index 2a81fb793..740820124 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,18 +30,19 @@ RUN mkdir -p /usr/share/gradle /usr/share/gradle/ref \ && ln -s /usr/share/gradle/gradle-${GRADLE_VERSION} /usr/bin/gradle # 5- Define environmental variables required by gradle -ENV GRADLE_VERSION 8.4 -ENV GRADLE_HOME /usr/bin/gradle -ENV GRADLE_USER_HOME /cache -ENV PATH $PATH:$GRADLE_HOME/bin +ENV GRADLE_VERSION=8.4 +ENV GRADLE_HOME=/usr/bin/gradle +ENV GRADLE_USER_HOME=/cache +ENV PATH=$PATH:$GRADLE_HOME/bin VOLUME $GRADLE_USER_HOME COPY . . -RUN gradle build copy -x test --no-daemon +RUN gradle build -x test --no-daemon +RUN gradle copy -x test --no-daemon -FROM registry.access.redhat.com/ubi8/ubi-minimal:8.5 +FROM registry.access.redhat.com/ubi8/ubi-minimal:latest RUN true && \ microdnf install -y curl ca-certificates java-17-openjdk-headless sudo shadow-utils && \ @@ -90,4 +91,4 @@ RUN true && \ chown :iofog-agent /usr/bin/iofog-agent && \ true -CMD [ "java", "-jar", "/usr/bin/iofog-agentd.jar", "start" ] +CMD [ "java", "-jar", "/usr/bin/iofog-agentd.jar", "start" ] \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6adee1b8d..e7bf728fc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,240 +1,240 @@ -#trigger: -# tags: -# include: -# - v* -# branches: -# include: -# - develop -# - release* -# -# paths: -# exclude: -# - README.md -# - CHANGELOG.md -# - LICENSE -# -#variables: -# repository: 'focal-freedom-236620/agent' -# buildTag: $(Build.BuildId) -# ref: $(Build.SourceBranch) -# branchTag: $(Build.SourceBranchName) -# imageTag: -# -#jobs: -# - job: Agent -# pool: -# vmImage: 'Ubuntu-20.04' -# -# steps: -# - task: Gradle@2 -# inputs: -# workingDirectory: '' -# gradleWrapperFile: 'gradlew' -# gradleOptions: '-Xmx3072m' -# javaHomeOption: 'JDKVersion' -# jdkVersionOption: '1.8' -# jdkArchitectureOption: 'x64' -# publishJUnitResults: true -# testResultsFiles: '**/TEST-*.xml' -# tasks: 'build' -# -# - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 -# displayName: ReportGenerator -# inputs: -# reports: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacoco/test/jacocoTestReport.xml' -# targetdir: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacocoHtml' -# reporttypes: 'HtmlInline_AzurePipelines;Badges' -# -# - task: PublishCodeCoverageResults@1 -# inputs: -# codeCoverageTool: 'JaCoCo' -# summaryFileLocation: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacoco/test/jacocoTestReport.xml' -# reportDirectory: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacocoHtml' -# displayName: 'Publish Code Coverage Results' -# -# # We need nodejs for Snyk -# - task: NodeTool@0 -# inputs: -# versionSpec: '12.x' -# displayName: 'Install Node.js' -# -# - script: | -# ./gradlew copyJar -# displayName: 'copy jars' -# -# - script: | -# npm i -g snyk -# snyk monitor --project-name=AgentCI -# env: -# SNYK_TOKEN: $(snykToken) -# displayName: 'Snyk monitor' -# -# - script: | -# if [[ $(ref) == refs/tags* ]]; then -# TAG=$(echo $(ref) | sed "s|refs/tags/v||g") -# echo "##vso[task.setvariable variable=imageTag]$TAG" -# else -# LATESTTAG=$(git tag | tail -1) -# LATESTVERS=${LATESTTAG#?} -# if [ -z "$LATESTVERS" ]; then LATESTVERS=0.0.0; fi -# echo "##vso[task.setvariable variable=imageTag]$LATESTVERS-b$(buildTag)" -# fi -# echo $(imageTag) -# displayName: 'Setup supplementary tag for docker images' -# name: setvarStep -# -# - script: | -# echo "gcr.io/$(repository):$(imageTag)" > GCR_DOCKER_IMAGE -# displayName: 'Save Docker image name and tag to GCR_DOCKER_IMAGE into artifacts' -# -# - task: Docker@2 -# displayName: 'build docker image' -# inputs: -# containerRegistry: 'Edgeworx GCP' -# repository: $(repository) -# command: 'build' -# Dockerfile: 'Dockerfile' -# tags: | -# $(imageTag) -# $(branchTag) -# latest -# -# - task: Docker@2 -# displayName: 'push docker image' -# inputs: -# containerRegistry: 'Edgeworx GCP' -# repository: $(repository) -# command: 'push' -# Dockerfile: 'Dockerfile' -# tags: | -# $(imageTag) -# $(branchTag) -# latest -# condition: or(and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release/')), and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/develop')), and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))) -# -# -# - script: | -# echo "api test" -# displayName: 'api tests' -# -# - task: DownloadSecureFile@1 -# inputs: -# secureFile: 'package_cloud' -# displayName: 'download package cloud token file' -# -# - task: UseRubyVersion@0 -# inputs: -# versionSpec: '= 2.7' -# addToPath: true -# displayName: 'install rubygem to be used to install package_cloud cli' -# -# - script: | -# gem install --no-document fpm -# fpm -h -# gem install package_cloud -# package_cloud -h -# echo "config file..." -# echo $DOWNLOADSECUREFILE_SECUREFILEPATH -# displayName: 'install package_cloud cli and fpm' -# -# - script: | -# version=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') -# if [[ $(Build.SourceBranch) == refs/tags* ]]; then -# pkg_version=$version -# else -# pkg_version=$version-b$(Build.BuildId) -# fi -# echo $pkg_version -# cd packaging/iofog-agent -# fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk' -d docker -t deb -n iofog-agent -v $pkg_version -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr -# echo "pkg maybe created" -# echo $(ls | grep *.deb) -# echo "##vso[task.setvariable variable=pkg_version]$pkg_version" -# displayName: 'create deb package' -# -# - script: | -# sudo apt-get install jq -# displayName: 'install jq' -# -# - script: | -# curl https://packagecloud.io/install/repositories/iofog/iofogctl/script.deb.sh | sudo bash -# sudo apt-get install iofogctl=$(iofogctl.version) -# displayName: 'install iofogctl' -# -# - script: | -# sudo apt-get update -y -# sudo apt-get install -y bats -# displayName: 'install bats' -# -# - script: | -# sed -i "s|CONTROLLER_IMAGE=.*|CONTROLLER_IMAGE=\"$(controller.image)\"|g" test/resources/env.sh -# sudo bash test/deploy_ecn.bash deployControlPlane -# displayName: 'deploy local ecn' -# -# - script: | -# sudo bash test/run.bash -# displayName: 'integration test' -# -# - script: | -# sudo bash test/deploy_ecn.bash deleteECN -# displayName: 'delete ecn' -# condition: always() -# -# - script: | -# cd packaging/iofog-agent -# package=$(ls | grep *.deb) -# echo "package..." -# echo $package -# -# package_cloud push iofog/iofog-agent-dev/any/any $package --config=$DOWNLOADSECUREFILE_SECUREFILEPATH -# displayName: 'publish deb to package-cloud' -# -# - script: | -# cd packaging/iofog-agent -# echo $(pkg_version) -# fpm -s dir --depends java-11-openjdk -d docker-ce -t rpm -n iofog-agent -v $(pkg_version) -a all --rpm-os 'linux' --after-install rpm.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade rpm.sh etc usr; -# echo "pkg maybe created" -# echo $(ls | grep *.rpm) -# displayName: 'create rpm package' -# -# - script: | -# cd packaging/iofog-agent -# package=$(ls | grep *.rpm) -# echo "package..." -# echo $package -# -# package_cloud push iofog/iofog-agent-dev/rpm_any/rpm_any $package --config=$DOWNLOADSECUREFILE_SECUREFILEPATH -# displayName: 'publish rpm to package-cloud' -# -# - script: | -# cd packaging/iofog-agent -# sed -i.bak 's/default/dev/g' etc/iofog-agent/config-switcher_new.xml -# fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk' -d docker -t deb -n iofog-agent -v 0.0.0-dev -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr -# echo "pkg maybe created" -# echo $(ls | grep *.deb) -# echo "package..." -# package=$(ls | grep *.deb) -# echo $package -# package_cloud yank iofog/iofog-agent-dev/any/any iofog-agent_0.0.0-dev_all.deb --config=$DOWNLOADSECUREFILE_SECUREFILEPATH -# package_cloud push iofog/iofog-agent-dev/any/any iofog-agent_0.0.0-dev_all.deb --config=$DOWNLOADSECUREFILE_SECUREFILEPATH -# displayName: 'publish deb develop package to package-cloud' -# condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/develop')) -# -# - task: CopyFiles@2 -# inputs: -# SourceFolder: $(System.DefaultWorkingDirectory) -# TargetFolder: $(Build.ArtifactStagingDirectory) -# Contents: | -# GCR_DOCKER_IMAGE -# **/libs/** -# packaging/**/* -# Dockerfile -# OverWrite: true -# displayName: 'copy all artefacts' -# -# - task: PublishBuildArtifacts@1 -# inputs: -# PathtoPublish: '$(Build.ArtifactStagingDirectory)' -# ArtifactName: 'agent' -# displayName: 'publish artefacts' -# +trigger: + tags: + include: + - v* + branches: + include: + - develop + - release* + + paths: + exclude: + - README.md + - CHANGELOG.md + - LICENSE + +variables: + repository: 'focal-freedom-236620/agent' + buildTag: $(Build.BuildId) + ref: $(Build.SourceBranch) + branchTag: $(Build.SourceBranchName) + imageTag: + +jobs: + - job: Agent + pool: + vmImage: 'Ubuntu-18.04' + + steps: + - task: Gradle@2 + inputs: + workingDirectory: '' + gradleWrapperFile: 'gradlew' + gradleOptions: '-Xmx3072m' + javaHomeOption: 'JDKVersion' + jdkVersionOption: '1.8' + jdkArchitectureOption: 'x64' + publishJUnitResults: true + testResultsFiles: '**/TEST-*.xml' + tasks: 'build' + + - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4 + displayName: ReportGenerator + inputs: + reports: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacoco/test/jacocoTestReport.xml' + targetdir: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacocoHtml' + reporttypes: 'HtmlInline_AzurePipelines;Badges' + + - task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: 'JaCoCo' + summaryFileLocation: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacoco/test/jacocoTestReport.xml' + reportDirectory: '$(System.DefaultWorkingDirectory)/iofog-agent-daemon/build/reports/jacocoHtml' + displayName: 'Publish Code Coverage Results' + + # We need nodejs for Snyk + - task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install Node.js' + + - script: | + ./gradlew copyJar + displayName: 'copy jars' + + - script: | + npm i -g snyk + snyk monitor --project-name=AgentCI + env: + SNYK_TOKEN: $(snykToken) + displayName: 'Snyk monitor' + + - script: | + if [[ $(ref) == refs/tags* ]]; then + TAG=$(echo $(ref) | sed "s|refs/tags/v||g") + echo "##vso[task.setvariable variable=imageTag]$TAG" + else + LATESTTAG=$(git tag | tail -1) + LATESTVERS=${LATESTTAG#?} + if [ -z "$LATESTVERS" ]; then LATESTVERS=0.0.0; fi + echo "##vso[task.setvariable variable=imageTag]$LATESTVERS-b$(buildTag)" + fi + echo $(imageTag) + displayName: 'Setup supplementary tag for docker images' + name: setvarStep + + - script: | + echo "gcr.io/$(repository):$(imageTag)" > GCR_DOCKER_IMAGE + displayName: 'Save Docker image name and tag to GCR_DOCKER_IMAGE into artifacts' + + - task: Docker@2 + displayName: 'build docker image' + inputs: + containerRegistry: 'Edgeworx GCP' + repository: $(repository) + command: 'build' + Dockerfile: 'Dockerfile' + tags: | + $(imageTag) + $(branchTag) + latest + + - task: Docker@2 + displayName: 'push docker image' + inputs: + containerRegistry: 'Edgeworx GCP' + repository: $(repository) + command: 'push' + Dockerfile: 'Dockerfile' + tags: | + $(imageTag) + $(branchTag) + latest + condition: or(and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/heads/release/')), and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/develop')), and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))) + + + - script: | + echo "api test" + displayName: 'api tests' + + - task: DownloadSecureFile@1 + inputs: + secureFile: 'package_cloud' + displayName: 'download package cloud token file' + + - task: UseRubyVersion@0 + inputs: + versionSpec: '= 2.7' + addToPath: true + displayName: 'install rubygem to be used to install package_cloud cli' + + - script: | + gem install --no-document fpm + fpm -h + gem install package_cloud + package_cloud -h + echo "config file..." + echo $DOWNLOADSECUREFILE_SECUREFILEPATH + displayName: 'install package_cloud cli and fpm' + + - script: | + version=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') + if [[ $(Build.SourceBranch) == refs/tags* ]]; then + pkg_version=$version + else + pkg_version=$version-b$(Build.BuildId) + fi + echo $pkg_version + cd packaging/iofog-agent + fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk' -d docker -t deb -n iofog-agent -v $pkg_version -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr + echo "pkg maybe created" + echo $(ls | grep *.deb) + echo "##vso[task.setvariable variable=pkg_version]$pkg_version" + displayName: 'create deb package' + + - script: | + sudo apt-get install jq + displayName: 'install jq' + + - script: | + curl https://packagecloud.io/install/repositories/iofog/iofogctl/script.deb.sh | sudo bash + sudo apt-get install iofogctl=$(iofogctl.version) + displayName: 'install iofogctl' + + - script: | + sudo apt-get update -y + sudo apt-get install -y bats + displayName: 'install bats' + + - script: | + sed -i "s|CONTROLLER_IMAGE=.*|CONTROLLER_IMAGE=\"$(controller.image)\"|g" test/resources/env.sh + sudo bash test/deploy_ecn.bash deployControlPlane + displayName: 'deploy local ecn' + + - script: | + sudo bash test/run.bash + displayName: 'integration test' + + - script: | + sudo bash test/deploy_ecn.bash deleteECN + displayName: 'delete ecn' + condition: always() + + - script: | + cd packaging/iofog-agent + package=$(ls | grep *.deb) + echo "package..." + echo $package + + package_cloud push iofog/iofog-agent-dev/any/any $package --config=$DOWNLOADSECUREFILE_SECUREFILEPATH + displayName: 'publish deb to package-cloud' + + - script: | + cd packaging/iofog-agent + echo $(pkg_version) + fpm -s dir --depends java-11-openjdk -d docker-ce -t rpm -n iofog-agent -v $(pkg_version) -a all --rpm-os 'linux' --after-install rpm.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade rpm.sh etc usr; + echo "pkg maybe created" + echo $(ls | grep *.rpm) + displayName: 'create rpm package' + + - script: | + cd packaging/iofog-agent + package=$(ls | grep *.rpm) + echo "package..." + echo $package + + package_cloud push iofog/iofog-agent-dev/rpm_any/rpm_any $package --config=$DOWNLOADSECUREFILE_SECUREFILEPATH + displayName: 'publish rpm to package-cloud' + + - script: | + cd packaging/iofog-agent + sed -i.bak 's/default/dev/g' etc/iofog-agent/config-switcher_new.xml + fpm -s dir -d 'openjdk-8-jdk | openjdk-11-jdk' -d docker -t deb -n iofog-agent -v 0.0.0-dev -a all --deb-no-default-config-files --after-install debian.sh --after-remove remove.sh --before-upgrade upgrade.sh --after-upgrade debian.sh etc usr + echo "pkg maybe created" + echo $(ls | grep *.deb) + echo "package..." + package=$(ls | grep *.deb) + echo $package + package_cloud yank iofog/iofog-agent-dev/any/any iofog-agent_0.0.0-dev_all.deb --config=$DOWNLOADSECUREFILE_SECUREFILEPATH + package_cloud push iofog/iofog-agent-dev/any/any iofog-agent_0.0.0-dev_all.deb --config=$DOWNLOADSECUREFILE_SECUREFILEPATH + displayName: 'publish deb develop package to package-cloud' + condition: and(succeeded(), eq(variables['build.sourceBranch'], 'refs/heads/develop')) + + - task: CopyFiles@2 + inputs: + SourceFolder: $(System.DefaultWorkingDirectory) + TargetFolder: $(Build.ArtifactStagingDirectory) + Contents: | + GCR_DOCKER_IMAGE + **/libs/** + packaging/**/* + Dockerfile + OverWrite: true + displayName: 'copy all artefacts' + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(Build.ArtifactStagingDirectory)' + ArtifactName: 'agent' + displayName: 'publish artefacts' + diff --git a/build.gradle b/build.gradle index 3e5d6d0e2..aef5b1a16 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,11 @@ plugins { - id 'com.github.johnrengelman.shadow' version '8.1.1' apply false + id "com.github.johnrengelman.shadow" version "8.1.1" apply false id 'java' } allprojects { group = 'org.eclipse' - version = '3.1.0' + version = '3.3.0' } subprojects { @@ -16,12 +16,13 @@ subprojects { mavenCentral() mavenLocal() } - java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - tasks.register('sourcesJar', Jar) - sourcesJar { + + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + //sourceCompatibility = 1.8 + //targetCompatibility = 1.8 + + task sourcesJar(type: Jar) { from sourceSets.main.allJava archiveClassifier = 'sources' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c4117f593..3056f33cc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -4,3 +4,5 @@ distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip +#distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip +#distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-all.zip diff --git a/gradlew b/gradlew index 1b6c78733..a58591e97 100755 --- a/gradlew +++ b/gradlew @@ -231,4 +231,4 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -exec "$JAVACMD" "$@" +exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/gradlew.bat b/gradlew.bat index ac1b06f93..477c89664 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,89 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega \ No newline at end of file diff --git a/iofog-agent-client/build.gradle b/iofog-agent-client/build.gradle index 66e467cf8..c5366b454 100644 --- a/iofog-agent-client/build.gradle +++ b/iofog-agent-client/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'com.github.johnrengelman.shadow' version '8.1.1' + id "com.github.johnrengelman.shadow" version '8.1.1' } description = 'iofog-agent-client' @@ -8,9 +8,11 @@ configurations { extraLibs } dependencies { - implementation 'org.slf4j:slf4j-nop:2.0.7' - extraLibs ('javax.json:javax.json-api:1.1.4', 'org.glassfish:javax.json:1.1.4') - configurations.implementation.extendsFrom(configurations.extraLibs) + //compile 'org.slf4j:slf4j-nop:2.0.16' + implementation 'org.slf4j:slf4j-nop:2.0.16' + extraLibs ('jakarta.json:jakarta.json-api:2.1.3', 'org.eclipse.parsson:parsson:1.1.7') + configurations.implementation.extendsFrom(configurations.extraLibs) + //configurations.compileClasspath.extendsFrom(configurations.extraLibs) } processResources { diff --git a/iofog-agent-client/src/main/java/org/eclipse/iofog/Client.java b/iofog-agent-client/src/main/java/org/eclipse/iofog/Client.java index a2d55cdcd..dc034a2c5 100644 --- a/iofog-agent-client/src/main/java/org/eclipse/iofog/Client.java +++ b/iofog-agent-client/src/main/java/org/eclipse/iofog/Client.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,9 +19,9 @@ import java.text.ParseException; import java.util.Properties; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; public class Client { @@ -228,7 +228,7 @@ private static String showHelp() { private static String version() { return "ioFog Agent " + getVersion() + " " + - "\nCopyright (C) 2018-2022 Edgeworx, Inc." + + "\nCopyright (c) 2023 Datasance Teknoloji A.S." + "\nEclipse ioFog is provided under the Eclipse Public License (EPL2)" + "\nhttps://www.eclipse.org/legal/epl-v20.html"; } diff --git a/iofog-agent-daemon/build.gradle b/iofog-agent-daemon/build.gradle index 624dc64a2..79e770476 100644 --- a/iofog-agent-daemon/build.gradle +++ b/iofog-agent-daemon/build.gradle @@ -6,18 +6,36 @@ plugins { description = 'iofog-agent-daemon' dependencies { - implementation 'com.github.docker-java:docker-java:3.3.4' - implementation 'io.netty:netty-all:4.1.95.Final' - implementation 'org.jboss.logmanager:jboss-logmanager:3.0.0.Final' - implementation 'com.jcraft:jsch:0.1.55' - implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.1' - implementation 'org.apache.httpcomponents:httpmime:4.5.7' + //compile 'com.github.docker-java:docker-java:3.4.0' + //compile 'io.netty:netty-all:4.1.113.Final' + //compile 'org.jboss.logmanager:jboss-logmanager:3.0.6.Final' + //compile 'com.github.mwiede:jsch:0.2.20' + //compile 'com.fasterxml.jackson.core:jackson-databind:2.17.2' + //compile 'org.apache.httpcomponents:httpmime:4.5.13' + //compile 'org.junit.jupiter:junit-jupiter-api:5.10.0' + //compile 'com.github.oshi:oshi-core:6.6.4' + //compile 'org.slf4j:slf4j-nop:2.0.16' + //compile 'org.apache.qpid:qpid-jms-client:2.6.0' + //compile 'jakarta.jms:jakarta.jms-api:3.1.0' + //compile 'jakarta.json:jakarta.json-api:2.1.3' + //compile 'org.eclipse.parsson:parsson:1.1.7' + //testCompile 'org.mockito:mockito-core:5.4.0' + //testCompile 'org.powermock:powermock-module-junit4:2.0.2' + //testCompile 'org.powermock:powermock-api-mockito2:2.0.2' + //testCompile 'org.powermock:powermock-core:2.0.2' + implementation 'com.github.docker-java:docker-java:3.4.0' + implementation 'io.netty:netty-all:4.1.113.Final' + implementation 'org.jboss.logmanager:jboss-logmanager:3.0.6.Final' + implementation 'com.github.mwiede:jsch:0.2.20' + implementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2' + implementation 'org.apache.httpcomponents:httpmime:4.5.13' implementation 'org.junit.jupiter:junit-jupiter-api:5.10.0' - implementation 'com.github.oshi:oshi-core:6.4.0' - implementation 'org.slf4j:slf4j-nop:2.0.7' - implementation 'org.apache.qpid:qpid-jms-client:2.4.0' - implementation 'javax.json:javax.json-api:1.1.4' - implementation 'org.glassfish:javax.json:1.1.4' + implementation 'com.github.oshi:oshi-core:6.6.4' + implementation 'org.slf4j:slf4j-nop:2.0.16' + implementation 'org.apache.qpid:qpid-jms-client:2.6.0' + implementation 'jakarta.jms:jakarta.jms-api:3.1.0' + implementation 'jakarta.json:jakarta.json-api:2.1.3' + implementation 'org.eclipse.parsson:parsson:1.1.7' testImplementation 'org.mockito:mockito-core:5.4.0' testImplementation 'org.mockito:mockito-junit-jupiter:3.11.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0' @@ -27,6 +45,10 @@ dependencies { testImplementation 'org.testng:testng:7.7.0' } +tasks.withType(JavaCompile) { + options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked" +} + processResources { expand(project.properties) } @@ -34,6 +56,7 @@ processResources { build { dependsOn shadowJar } + test { jvmArgs '--add-opens=java.base/java.util=ALL-UNNAMED', '--add-opens=java.base/java.util.stream=ALL-UNNAMED', '--add-opens=java.base/java.lang=ALL-UNNAMED' useJUnitPlatform() @@ -99,4 +122,4 @@ jacoco { //} // //test.dependsOn(doJacocoOfflineInstrumentation) -//test.finalizedBy jacocoTestReport +//test.finalizedBy jacocoTestReport \ No newline at end of file diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/Daemon.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/Daemon.java index e5afae36f..47f40931a 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/Daemon.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/Daemon.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/IOFogModule.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/IOFogModule.java index f3f59b1cc..ebcbac003 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/IOFogModule.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/IOFogModule.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineAction.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineAction.java index d2b6c6205..ce4b3fca3 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineAction.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineAction.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineConfigParam.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineConfigParam.java index 111a61233..03ffe1b45 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineConfigParam.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineConfigParam.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineParser.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineParser.java index ea82084e4..fcd29a346 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineParser.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/CommandLineParser.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellExecutor.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellExecutor.java index 082e6fc83..a0c730bc6 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellExecutor.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellExecutor.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellResultSet.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellResultSet.java index 9792a681f..6b2d931d7 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellResultSet.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/command_line/util/CommandShellResultSet.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/ImageDownloadManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/ImageDownloadManager.java index 779371362..1e1a5375d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/ImageDownloadManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/ImageDownloadManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.utils.Orchestrator; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.io.File; import java.net.MalformedURLException; import java.net.URL; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceData.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceData.java index 9d774cee6..772b1c0d7 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceData.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceData.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManager.java index e5b8a729f..8866eeafa 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,9 +19,9 @@ import org.eclipse.iofog.process_manager.DockerUtil; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.json.JsonValue; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonValue; import java.util.List; import java.util.Optional; import java.util.concurrent.CopyOnWriteArrayList; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/Display.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/Display.java index 14d9c94d0..6574f9605 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/Display.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/Display.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeEndpoints.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeEndpoints.java index 4d51879fe..497cedd50 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeEndpoints.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeEndpoints.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeInterface.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeInterface.java index 2fffd9fb1..5ac8a53e0 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeInterface.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeInterface.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResource.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResource.java index 5d73ffd32..9512198cb 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResource.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResource.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResourceManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResourceManager.java index 1ca0541c9..997d097a3 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResourceManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/edge_resources/EdgeResourceManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentException.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentException.java index 73e2a06a2..aad45b907 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentException.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentException.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentSystemException.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentSystemException.java index 9e525b450..f17c6ccb2 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentSystemException.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentSystemException.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentUserException.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentUserException.java index 3f94a4b4c..8d015a87d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentUserException.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/exception/AgentUserException.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgent.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgent.java index 179e12721..b99e55889 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgent.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgent.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,12 +35,13 @@ import org.eclipse.iofog.pruning.DockerPruningManager; import org.eclipse.iofog.status_reporter.StatusReporter; import org.eclipse.iofog.utils.Constants; +import org.eclipse.iofog.utils.Constants.ControllerStatus; import org.eclipse.iofog.utils.Orchestrator; import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.functional.Pair; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import javax.net.ssl.SSLHandshakeException; import javax.ws.rs.ForbiddenException; import javax.ws.rs.HttpMethod; @@ -923,6 +924,16 @@ private Function containerJsonObjectToMicroserviceFunc return jsonObj -> { Microservice microservice = new Microservice(jsonObj.getString("uuid"), jsonObj.getString("imageId")); microservice.setConfig(jsonObj.getString("config")); + if (!jsonObj.isNull("runAsUser")) { + microservice.setRunAsUser(jsonObj.getString("runAsUser")); + } + if (!jsonObj.isNull("platform")) { + microservice.setPlatform(jsonObj.getString("platform")); + } + + if (!jsonObj.isNull("runtime")) { + microservice.setRuntime(jsonObj.getString("runtime")); + } microservice.setRebuild(jsonObj.getBoolean("rebuild")); microservice.setRootHostAccess(jsonObj.getBoolean("rootHostAccess")); microservice.setRegistryId(jsonObj.getInt("registryId")); @@ -987,6 +998,9 @@ private Function containerJsonObjectToMicroserviceFunc JsonValue argsValue = jsonObj.get("cmd"); microservice.setArgs(getStringList(argsValue)); + JsonValue cdiDevsValue = jsonObj.get("cdiDevices"); + microservice.setCdiDevs(getStringList(cdiDevsValue)); + JsonValue extraHostsValue = jsonObj.get("extraHosts"); microservice.setExtraHosts(getStringList(extraHostsValue)); diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgentStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgentStatus.java index 4f3b57045..9289bf203 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgentStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/FieldAgentStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/VersionHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/VersionHandler.java index 64bdbb04e..37ed2a4f2 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/VersionHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/VersionHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.field_agent.exceptions.UnknownVersionCommandException; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.io.File; import java.io.IOException; import java.util.List; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/enums/VersionCommand.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/enums/VersionCommand.java index ef5baeba2..7265b9e33 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/enums/VersionCommand.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/enums/VersionCommand.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -14,7 +14,7 @@ package org.eclipse.iofog.field_agent.enums; import org.eclipse.iofog.field_agent.exceptions.UnknownVersionCommandException; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.Arrays; import java.util.Optional; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/exceptions/UnknownVersionCommandException.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/exceptions/UnknownVersionCommandException.java index 06c6aaebe..493332d75 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/exceptions/UnknownVersionCommandException.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/field_agent/exceptions/UnknownVersionCommandException.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsMode.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsMode.java index 8bea825bd..faa777e2f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsMode.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsMode.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsWebHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsWebHandler.java index 839f6c4f2..10985701d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsWebHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/gps/GpsWebHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -13,9 +13,9 @@ package org.eclipse.iofog.gps; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/BluetoothApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/BluetoothApiHandler.java index c1f20b6a2..5dc118a7d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/BluetoothApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/BluetoothApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/CommandLineApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/CommandLineApiHandler.java index d4a0ea027..0dae29d2b 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/CommandLineApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/CommandLineApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,9 +21,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigApiHandler.java index 5a231ca9c..d544e8040 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.AbstractMap; import java.util.HashMap; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigurationMap.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigurationMap.java index 701b1be24..f1d4266da 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigurationMap.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ConfigurationMap.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlSignalSentInfo.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlSignalSentInfo.java index b64d13e29..da95f0c3f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlSignalSentInfo.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlSignalSentInfo.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketHandler.java index 6512ebbb1..fe9b3b309 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,7 +24,7 @@ import java.util.ArrayList; import java.util.Map; -import static io.netty.handler.codec.http.HttpHeaders.Names.HOST; +import static io.netty.handler.codec.http.HttpHeaderNames.HOST; /** * Handler for the real-time control websocket Open real-time control websocket diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketWorker.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketWorker.java index 113cba4b2..d61de588e 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketWorker.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ControlWebsocketWorker.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/DeprovisionApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/DeprovisionApiHandler.java index 7867a9774..a6a975095 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/DeprovisionApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/DeprovisionApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/EdgeResourceHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/EdgeResourceHandler.java index 425d2b24a..dabb680e7 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/EdgeResourceHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/EdgeResourceHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -22,9 +22,9 @@ import org.eclipse.iofog.exception.AgentUserException; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.Json; -import javax.json.JsonBuilderFactory; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonBuilderFactory; +import jakarta.json.JsonObjectBuilder; import java.util.List; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GetConfigurationHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GetConfigurationHandler.java index b219ee42c..25fcf35b5 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GetConfigurationHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GetConfigurationHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,7 +19,7 @@ import org.eclipse.iofog.exception.AgentUserException; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GpsApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GpsApiHandler.java index 2611c84ab..1b83cfd12 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GpsApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/GpsApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.nio.charset.StandardCharsets; import java.util.Date; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/InfoApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/InfoApiHandler.java index 7a60744d5..482974416 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/InfoApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/InfoApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,9 +23,9 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.StringReader; import java.util.HashMap; import java.util.Map; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApi.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApi.java index 56e6feb4f..14c60d5ce 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApi.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApi.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServer.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServer.java index 970fa4333..9252b63ca 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServer.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServer.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerHandler.java index 43a010dd3..43c56f80f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactory.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactory.java index d97e61ecd..e961f0054 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactory.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactory.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiStatus.java index dc32734f2..6b07c18aa 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LocalApiStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LogApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LogApiHandler.java index 1a50a8ec7..11a265b07 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LogApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/LogApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ import org.eclipse.iofog.exception.AgentUserException; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageCallback.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageCallback.java index 3b5f71a1b..3caabc69b 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageCallback.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageCallback.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageReceiverHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageReceiverHandler.java index 1a965a1b6..a34256142 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageReceiverHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageReceiverHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,7 +20,7 @@ import org.eclipse.iofog.message_bus.MessageBusUtil; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.List; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSenderHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSenderHandler.java index efc7362b1..d9eaaaca6 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSenderHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSenderHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -20,7 +20,7 @@ import org.eclipse.iofog.message_bus.MessageBusUtil; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSentInfo.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSentInfo.java index 85bc22124..bad47b44f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSentInfo.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageSentInfo.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketHandler.java index 993de1a8a..cef1500c2 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -12,7 +12,7 @@ */ package org.eclipse.iofog.local_api; -import static io.netty.handler.codec.http.HttpHeaders.Names.HOST; +import static io.netty.handler.codec.http.HttpHeaderNames.HOST; import static java.nio.charset.StandardCharsets.UTF_8; import java.util.Map; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketWorker.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketWorker.java index 79b3397ea..dbfacd8dd 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketWorker.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/MessageWebsocketWorker.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ProvisionApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ProvisionApiHandler.java index b4b99cff6..a843215bd 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ProvisionApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/ProvisionApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,10 +23,10 @@ import org.eclipse.iofog.field_agent.FieldAgent; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; -import javax.json.JsonValue; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; +import jakarta.json.JsonValue; import java.io.StringReader; import java.util.HashMap; import java.util.Map; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/QueryMessageReceiverHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/QueryMessageReceiverHandler.java index c1092e5d2..e9c1419a4 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/QueryMessageReceiverHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/QueryMessageReceiverHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,7 +21,7 @@ import org.eclipse.iofog.message_bus.MessageBusUtil; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.List; import java.util.concurrent.Callable; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/StatusApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/StatusApiHandler.java index ee9c28bb5..78c0c7702 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/StatusApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/StatusApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/VersionApiHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/VersionApiHandler.java index c242606e5..06b0f576e 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/VersionApiHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/VersionApiHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebSocketMap.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebSocketMap.java index 3cf4f23e3..17929ae64 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebSocketMap.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebSocketMap.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebsocketUtil.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebsocketUtil.java index d2a198ad8..ec305393f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebsocketUtil.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/WebsocketUtil.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageReceiverWebSocketClientHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageReceiverWebSocketClientHandler.java index ef8e98459..63259286c 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageReceiverWebSocketClientHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageReceiverWebSocketClientHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSenderWebSocketClientHandler.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSenderWebSocketClientHandler.java index 4bd7ee235..ca1865665 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSenderWebSocketClientHandler.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSenderWebSocketClientHandler.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSocketTestMain.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSocketTestMain.java index 302b79ded..f9dbde705 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSocketTestMain.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageSocketTestMain.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketReceiverClient.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketReceiverClient.java index 32f1e93a2..aeda24aa7 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketReceiverClient.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketReceiverClient.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketSenderClient.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketSenderClient.java index 8ffcd6914..c9ef73882 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketSenderClient.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/MessageWebsocketSenderClient.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestApiDriver.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestApiDriver.java index f810914a9..723b4d0ee 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestApiDriver.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestApiDriver.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestPublishTest.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestPublishTest.java index 7e1f0fa92..414a2c392 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestPublishTest.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestPublishTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,8 +19,8 @@ import java.nio.charset.StandardCharsets; import java.util.Base64; -import javax.json.Json; -import javax.json.JsonObject; +import jakarta.json.Json; +import jakarta.json.JsonObject; import org.eclipse.iofog.message_bus.Message; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestReceiveTest.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestReceiveTest.java index 512d7e035..47b99bffc 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestReceiveTest.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/RestReceiveTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,8 +18,8 @@ import java.net.URL; import java.nio.charset.StandardCharsets; -import javax.json.Json; -import javax.json.JsonObject; +import jakarta.json.Json; +import jakarta.json.JsonObject; public class RestReceiveTest { private int delay; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientControl.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientControl.java index cfcadd374..58080e774 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientControl.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientControl.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientHandlerControl.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientHandlerControl.java index 6bf5737e4..e8c2f4bfb 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientHandlerControl.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/local_api/test/WebSocketClientHandlerControl.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/IOMessageListener.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/IOMessageListener.java index fdf9e67fa..d46e8d8d6 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/IOMessageListener.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/IOMessageListener.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,9 +18,9 @@ import jakarta.jms.MessageListener; import jakarta.jms.TextMessage; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.StringReader; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/Message.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/Message.java index d2140c806..851fa3bda 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/Message.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/Message.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -15,8 +15,8 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Base64; -import javax.json.Json; -import javax.json.JsonObject; +import jakarta.json.Json; +import jakarta.json.JsonObject; import org.eclipse.iofog.exception.AgentSystemException; import org.eclipse.iofog.utils.BytesUtil; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageArchive.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageArchive.java index e26f89c71..952301d27 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageArchive.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageArchive.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBus.java index 55ffe3f6d..c7463f22e 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -32,7 +32,7 @@ import jakarta.jms.ExceptionListener; import jakarta.jms.JMSException; import jakarta.jms.MessageConsumer; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.ArrayList; import java.util.List; import java.util.Map; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusServer.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusServer.java index 9b6c9ef57..b011ffb76 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusServer.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusServer.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusStatus.java index 32e8bcf86..427d64981 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -15,9 +15,9 @@ import java.util.HashMap; import java.util.Map; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; /** * represents Message Bus status diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusUtil.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusUtil.java index c1a8feda7..f6ddd11b9 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusUtil.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageBusUtil.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageIdGenerator.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageIdGenerator.java index 56a9b8817..9520baedd 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageIdGenerator.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageIdGenerator.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessagePublisher.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessagePublisher.java index ab5f55406..2ab4f9592 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessagePublisher.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessagePublisher.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageReceiver.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageReceiver.java index d727793e3..c0017db22 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageReceiver.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/message_bus/MessageReceiver.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,9 +19,9 @@ import jakarta.jms.MessageConsumer; import jakarta.jms.TextMessage; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.StringReader; import java.util.ArrayList; import java.util.List; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/EnvVar.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/EnvVar.java index 20bb8badb..ae6597858 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/EnvVar.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/EnvVar.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -14,7 +14,7 @@ package org.eclipse.iofog.microservice; /** - * represents Microservices port mappings + * represents Microservices env variables * * @author saeid * diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Microservice.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Microservice.java index 54ef5aaa0..ba28dd795 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Microservice.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Microservice.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,6 +26,9 @@ public class Microservice { private final String imageName; private List portMappings; private String config; + private String runAsUser; + private String platform; + private String runtime; private List routes; private String containerId; private int registryId; @@ -37,6 +40,7 @@ public class Microservice { private boolean isUpdating; private List envVars; private List args; + private List cdiDevs; private List extraHosts; private boolean isConsumer; @@ -98,6 +102,30 @@ public void setConfig(String config) { this.config = config; } + public String getRunAsUser() { + return runAsUser; + } + + public void setRunAsUser(String runAsUser) { + this.runAsUser = runAsUser; + } + + public String getPlatform() { + return platform; + } + + public void setPlatform(String platform) { + this.platform = platform; + } + + public String getRuntime() { + return runtime; + } + + public void setRuntime(String runtime) { + this.runtime = runtime; + } + public String getMicroserviceUuid() { return microserviceUuid; } @@ -162,6 +190,10 @@ public void setDeleteWithCleanup(boolean deleteWithCleanUp) { public void setArgs(List args) { this.args = args; } + public List getCdiDevs() { return cdiDevs; } + + public void setCdiDevs(List cdiDevs) { this.cdiDevs = cdiDevs; } + @Override public boolean equals(Object e) { if (this == e) return true; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceManager.java index f13194063..d38b6bc6f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceState.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceState.java index 872339964..f1e147a89 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceState.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceState.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceStatus.java index c9296171f..40140d28d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/MicroserviceStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/PortMapping.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/PortMapping.java index b7d9a79f6..148e47812 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/PortMapping.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/PortMapping.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Registry.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Registry.java index b29111382..ec17cf643 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Registry.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Registry.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Route.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Route.java index a453c0499..74d3b0bd8 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Route.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/Route.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/VolumeMapping.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/VolumeMapping.java index 6da7b55d7..8cf690e94 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/VolumeMapping.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/microservice/VolumeMapping.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/network/IOFogNetworkInterface.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/network/IOFogNetworkInterface.java index b69c0677d..b33b4bd87 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/network/IOFogNetworkInterface.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/network/IOFogNetworkInterface.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerManager.java index a1039bb74..90053e0fc 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerTask.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerTask.java index 69f912dac..722f3b694 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerTask.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ContainerTask.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/DockerUtil.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/DockerUtil.java index 663e056f8..cf271ecbe 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/DockerUtil.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/DockerUtil.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,7 +23,7 @@ import com.github.dockerjava.core.DefaultDockerClientConfig; import com.github.dockerjava.core.DockerClientBuilder; import com.github.dockerjava.core.DockerClientConfig; -import com.github.dockerjava.core.command.EventsResultCallback; +import com.github.dockerjava.api.async.ResultCallback; import com.github.dockerjava.api.command.PullImageResultCallback; import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -35,8 +35,8 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.Json; -import javax.json.JsonObject; +import jakarta.json.Json; +import jakarta.json.JsonObject; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.text.DateFormat; @@ -121,10 +121,10 @@ public void reInitDockerClient() { */ private void addDockerEventHandler() { LoggingService.logDebug(MODULE_NAME , "Starting docker events handler"); - dockerClient.eventsCmd().exec(new EventsResultCallback() { + dockerClient.eventsCmd().exec(new ResultCallback.Adapter() { @Override public void onNext(Event item) { - switch (Objects.requireNonNull(item.getType())) { + switch (item.getType()) { case CONTAINER: case IMAGE: StatusReporter.setProcessManagerStatus().getMicroserviceStatus(item.getId()).setStatus( @@ -717,9 +717,30 @@ public String createContainer(Microservice microservice, String host) throws Not } } + if (microservice.getRuntime() != null && !microservice.getRuntime().isEmpty()) { + hostConfig.withRuntime(microservice.getRuntime()); + } + + if (microservice.getCdiDevs() != null && !microservice.getCdiDevs().isEmpty()) { + List deviceIds = microservice.getCdiDevs(); + DeviceRequest deviceRequest = new DeviceRequest() + .withDriver("cdi") + .withDeviceIds(deviceIds); + hostConfig.withDeviceRequests(Collections.singletonList(deviceRequest)); + } + if (microservice.getArgs() != null && microservice.getArgs().size() > 0) { cmd = cmd.withCmd(microservice.getArgs()); } + + if (microservice.getRunAsUser() != null && !microservice.getRunAsUser().isEmpty()) { + cmd = cmd.withUser(microservice.getRunAsUser()); + } + + if (microservice.getPlatform() != null && !microservice.getPlatform().isEmpty()) { + cmd = cmd.withPlatform(microservice.getPlatform()); + } + cmd = cmd.withHostConfig(hostConfig); CreateContainerResponse resp; try { diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManager.java index f1ddb3580..dca20e18d 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManagerStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManagerStatus.java index f9ce7b83f..e3cb76a45 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManagerStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/ProcessManagerStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -15,9 +15,9 @@ import org.eclipse.iofog.microservice.*; import org.eclipse.iofog.utils.Constants.LinkStatus; -import javax.json.Json; -import javax.json.JsonArrayBuilder; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonObjectBuilder; import java.text.NumberFormat; import java.util.HashMap; import java.util.Locale; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/RestartStuckChecker.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/RestartStuckChecker.java index b38533649..2ee22c293 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/RestartStuckChecker.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/RestartStuckChecker.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/StatsCallback.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/StatsCallback.java index 01e70614f..c3dc044a1 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/StatsCallback.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/StatsCallback.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -13,7 +13,7 @@ package org.eclipse.iofog.process_manager; import com.github.dockerjava.api.model.Statistics; -import com.github.dockerjava.core.async.ResultCallbackTemplate; +import com.github.dockerjava.api.async.ResultCallbackTemplate; import java.util.concurrent.CountDownLatch; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskComparator.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskComparator.java index 7a89f652e..69d564f0f 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskComparator.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskComparator.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskManager.java index 4d56e1cdf..534cadd91 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/process_manager/TaskManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnection.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnection.java index 2f4b0ed98..e7d897bc1 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnection.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnection.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnectionStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnectionStatus.java index 02140291a..a05294327 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnectionStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshConnectionStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManager.java index 8e323d334..082123113 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -19,7 +19,7 @@ import org.eclipse.iofog.utils.functional.Unit; import org.eclipse.iofog.utils.logging.LoggingService; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import java.util.concurrent.CompletableFuture; import static org.apache.commons.lang3.StringUtils.EMPTY; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManagerStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManagerStatus.java index 8d99c67aa..ee46fc66c 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManagerStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/proxy/SshProxyManagerStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -13,8 +13,8 @@ package org.eclipse.iofog.proxy; -import javax.json.Json; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObjectBuilder; /** * SSH Proxy Manager Status diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/pruning/DockerPruningManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/pruning/DockerPruningManager.java index 2923b1224..8e13a6bc6 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/pruning/DockerPruningManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/pruning/DockerPruningManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManager.java index cb616f818..1e6c01f85 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatus.java index 6a3f99895..2522234d7 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManager.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManager.java index f1105854b..37c0cbbe6 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManager.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManager.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManagerStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManagerStatus.java index 040620fd1..22e77ca15 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManagerStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/resource_manager/ResourceManagerStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporter.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporter.java index e488f667b..8121fa822 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporter.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporter.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporterStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporterStatus.java index bdf5d8be2..234aec215 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporterStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/status_reporter/StatusReporterStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/Supervisor.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/Supervisor.java index f9687279a..67429f603 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/Supervisor.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/Supervisor.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/SupervisorStatus.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/SupervisorStatus.java index 97503848a..9a920e35a 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/SupervisorStatus.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/supervisor/SupervisorStatus.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/BytesUtil.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/BytesUtil.java index 9240d49ba..24a85104e 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/BytesUtil.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/BytesUtil.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/CmdProperties.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/CmdProperties.java index d04e8a06d..86108f1c2 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/CmdProperties.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/CmdProperties.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Constants.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Constants.java index 77c8ac172..ad557b7aa 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Constants.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Constants.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Orchestrator.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Orchestrator.java index 9d075ae77..566c79d23 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Orchestrator.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/Orchestrator.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,11 +35,11 @@ import org.eclipse.iofog.utils.logging.LoggingService; import org.eclipse.iofog.utils.trustmanager.TrustManagers; -import javax.json.Json; -import javax.json.JsonException; -import javax.json.JsonObject; -import javax.json.JsonReader; -import javax.json.stream.JsonParsingException; +import jakarta.json.Json; +import jakarta.json.JsonException; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; +import jakarta.json.stream.JsonParsingException; import javax.naming.AuthenticationException; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/Configuration.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/Configuration.java index 5da708990..36179007a 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/Configuration.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/Configuration.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -159,7 +159,7 @@ private static void updateAutomaticConfigParams() { monitorContainersStatusFreqSeconds = 30; monitorRegistriesStatusFreqSeconds = 120; getUsageDataFreqSeconds = 20; - dockerApiVersion = "1.24"; + dockerApiVersion = "1.45"; setSystemTimeFreqSeconds = 60; monitorSshTunnelStatusFreqSeconds = 30; break; @@ -170,7 +170,7 @@ private static void updateAutomaticConfigParams() { monitorContainersStatusFreqSeconds = 10; monitorRegistriesStatusFreqSeconds = 60; getUsageDataFreqSeconds = 5; - dockerApiVersion = "1.24"; + dockerApiVersion = "1.45"; setSystemTimeFreqSeconds = 60; monitorSshTunnelStatusFreqSeconds = 10; break; diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/ConfigurationItemException.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/ConfigurationItemException.java index d4e371585..6b5fc6258 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/ConfigurationItemException.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/configuration/ConfigurationItemException.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/device_info/ArchitectureType.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/device_info/ArchitectureType.java index 8973e0843..755a669aa 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/device_info/ArchitectureType.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/device_info/ArchitectureType.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Either.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Either.java index 9bf36054e..d50453516 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Either.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Either.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function3.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function3.java index eb7fb087a..956c61a7a 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function3.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function3.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function4.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function4.java index 168749740..dd16ff924 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function4.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Function4.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Functions.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Functions.java index f850fa43e..bf3b4924c 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Functions.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Functions.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Left.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Left.java index 7721bae51..1d57b95fa 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Left.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Left.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Pair.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Pair.java index 8bb0a189c..0f9e06c5b 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Pair.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Pair.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Right.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Right.java index 19194ec0a..37a20fcc8 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Right.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Right.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Unit.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Unit.java index 0e508b697..98c5794e2 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Unit.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/functional/Unit.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LogFormatter.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LogFormatter.java index eca999ed0..9a934c621 100644 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LogFormatter.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LogFormatter.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -25,9 +25,9 @@ import org.eclipse.iofog.utils.configuration.Configuration; import org.jboss.logmanager.Level; -import javax.json.Json; -import javax.json.JsonBuilderFactory; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonBuilderFactory; +import jakarta.json.JsonObjectBuilder; /** * formats logs diff --git a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LoggingService.java b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LoggingService.java index 6bfe98837..fccdd0bef 100755 --- a/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LoggingService.java +++ b/iofog-agent-daemon/src/main/java/org/eclipse/iofog/utils/logging/LoggingService.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ import org.eclipse.iofog.utils.configuration.Configuration; -import javax.json.*; +import jakarta.json.*; import java.io.*; import java.nio.file.FileSystems; import java.nio.file.Files; diff --git a/iofog-agent-daemon/src/main/resources/cmd_messages.properties b/iofog-agent-daemon/src/main/resources/cmd_messages.properties index 6a5e48453..b0a8f1067 100644 --- a/iofog-agent-daemon/src/main/resources/cmd_messages.properties +++ b/iofog-agent-daemon/src/main/resources/cmd_messages.properties @@ -1,4 +1,4 @@ -version_msg=ioFog %s \\nCopyright (C) 2018-2024 Edgeworx, Inc. \\nEclipse ioFog is provided under the Eclipse Public License 2.0 (EPL-2.0) \\nhttps://www.eclipse.org/legal/epl-v20.html +version_msg=ioFog %s \\nCopyright (C) 2023 Datasance Teknoloji A.S. \\nEclipse ioFog is provided under the Eclipse Public License 2.0 (EPL-2.0) \\nhttps://www.eclipse.org/legal/epl-v20.html deprovision_msg=Deprovisioning from controller ... %s provision_msg=Provisioning with key "%s" ... Result: %s provision_common_error=\\nProvisioning failed diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineActionTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineActionTest.java index 20649a8cd..9a53523bc 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineActionTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineActionTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -11,29 +11,28 @@ * */ -package org.eclipse.iofog.command_line; - -import org.eclipse.iofog.exception.AgentUserException; -import org.eclipse.iofog.field_agent.FieldAgent; -import org.eclipse.iofog.gps.GpsMode; -import org.eclipse.iofog.status_reporter.StatusReporter; -import org.eclipse.iofog.utils.CmdProperties; -import org.eclipse.iofog.utils.configuration.Configuration; -import org.junit.jupiter.api.*; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mock; -import org.mockito.MockedStatic; -import org.mockito.Mockito; -import org.mockito.junit.jupiter.MockitoExtension; -import javax.json.Json; -import java.text.SimpleDateFormat; -import java.util.*; - -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.mockito.ArgumentMatchers.anyBoolean; -import static org.mockito.ArgumentMatchers.anyMap; -import static org.mockito.Mockito.*; - + package org.eclipse.iofog.command_line; + + import org.eclipse.iofog.exception.AgentUserException; + import org.eclipse.iofog.field_agent.FieldAgent; + import org.eclipse.iofog.gps.GpsMode; + import org.eclipse.iofog.status_reporter.StatusReporter; + import org.eclipse.iofog.utils.CmdProperties; + import org.eclipse.iofog.utils.configuration.Configuration; + import org.junit.jupiter.api.*; + import org.junit.jupiter.api.extension.ExtendWith; + import org.mockito.Mock; + import org.mockito.MockedStatic; + import org.mockito.Mockito; + import org.mockito.junit.jupiter.MockitoExtension; + import jakarta.json.Json; + import java.text.SimpleDateFormat; + import java.util.*; + + import static org.junit.jupiter.api.Assertions.assertThrows; + import static org.mockito.ArgumentMatchers.anyBoolean; + import static org.mockito.ArgumentMatchers.anyMap; + import static org.mockito.Mockito.*; /** * @author nehanaithani @@ -80,7 +79,7 @@ public void setup() { .thenReturn(new HashMap<>()) .thenThrow(new Exception("item not found or defined more than once")); - Mockito.when(CmdProperties.getVersion()).thenReturn("1.2.2"); + Mockito.when(CmdProperties.getVersion()).thenReturn("3.3.0"); Mockito.when(CmdProperties.getVersionMessage()).thenReturn(version); Mockito.when(CmdProperties.getDeprovisionMessage()).thenReturn("Deprovisioning from controller ... %s"); Mockito.when(CmdProperties.getProvisionMessage()).thenReturn("Provisioning with key \"%s\" ... Result: %s"); @@ -339,7 +338,7 @@ private static boolean isEqual(List list1, List list2) { private final SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm a"); - private static final String status = "ioFog daemon : " + + private String status = "ioFog daemon : " + "STARTING\\nMemory Usage :" + " about 0.00 MiB\\nDisk Usage : " + "about 0.00 MiB\\nCPU Usage : " + @@ -351,12 +350,12 @@ private static boolean isEqual(List list1, List list2) { "0.00 MB\\nSystem Available Memory : " + "0.00 MB\\nSystem Total CPU : 0.00 %"; - private static final String version = "ioFog 3.0.0-dev \n" + - "Copyright (C) 2018-2024 Edgeworx, Inc. \n" + + private String version = "ioFog 1 \n" + + "Copyright (c) 2023 Datasance Teknoloji A.S. \n" + "Eclipse ioFog is provided under the Eclipse Public License 2.0 (EPL-2.0) \n" + "https://www.eclipse.org/legal/epl-v20.html"; - private final String helpContent = "Usage 1: iofog-agent [OPTION]\\n" + + private String helpContent = "Usage 1: iofog-agent [OPTION]\\n" + "Usage 2: iofog-agent [COMMAND] \\n" + "Usage 3: iofog-agent [COMMAND] [Parameter] \\n" + "\\n" + @@ -411,7 +410,7 @@ private static boolean isEqual(List list1, List list2) { " storage\\n" + " -lc <#log files> Set the number of log files to evenly\\n" + " split the log storage limit\\n" + - " -ll Set the standard logging levels that\\n" + + " -ll Set the standard logging levels that\\n"+ " can be used to control logging output\\n" + " -sf <#seconds> Set the status update frequency\\n" + " -cf <#seconds> Set the get changes frequency\\n" + diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineConfigParamTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineConfigParamTest.java index b2348a0d8..10cdc4203 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineConfigParamTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineConfigParamTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineParserTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineParserTest.java index 06c0fc986..2e2a29888 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineParserTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/CommandLineParserTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -18,7 +18,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.MockedStatic; import org.mockito.junit.jupiter.MockitoExtension; -import javax.json.JsonObject; +import jakarta.json.JsonObject; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellExecutorTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellExecutorTest.java index 17a75cfd6..e35d53007 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellExecutorTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellExecutorTest.java @@ -1,7 +1,7 @@ package org.eclipse.iofog.command_line.util; /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -12,103 +12,103 @@ * */ -import org.junit.jupiter.api.AfterAll; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.junit.jupiter.MockitoExtension; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.mockito.Mockito.spy; - -/** - * @author nehanaithani - */ -@ExtendWith(MockitoExtension.class) -public class CommandShellExecutorTest { - private CommandShellResultSet, List> commandShellResultSet; - private String command; - List value; - List errors; - - @BeforeAll - public static void setUp() throws Exception { - spy(new CommandShellExecutor()); - } - - @AfterAll - public static void tearDown() throws Exception { - } - - /** - * When execute command is supplied with valid command - */ - @Test - public void testExecuteCommandWithValidInput() { - - command = "echo Iofog"; - value = new ArrayList<>(); - value.add("Iofog"); - errors = new ArrayList<>(); - commandShellResultSet = new CommandShellResultSet<>(value, errors); - assertEquals(commandShellResultSet, CommandShellExecutor.executeCommand(command)); - } - - /** - * When execute command is supplied with invalid command - */ - @Test - public void testExecuteCommandWithInvalidCommand() { - command = "some random command"; - value = new ArrayList<>(); - errors = new ArrayList<>(); - errors.add("/bin/sh: some: command not found"); - commandShellResultSet = new CommandShellResultSet<>(value, errors); - Assertions.assertNotNull( CommandShellExecutor.executeCommand(command)); - } - - /** - * When executeScript is called - */ - @Test - public void testExecuteScript() { - command = "echo"; - value = new ArrayList<>(); - errors = new ArrayList<>(); - errors.add("/bin/echo: /bin/echo: cannot execute binary file"); - commandShellResultSet = new CommandShellResultSet<>(value, errors); - Assertions.assertNotNull(CommandShellExecutor.executeScript(command, "agent")); - } - - /** - * When executeSDynamic is called with true value - */ - @Test - public void testExecuteDynamicCommandWithTrueInput() { - command = "echo"; - value = new ArrayList<>(); - errors = new ArrayList<>(); - commandShellResultSet = new CommandShellResultSet<>(value, errors); - Assertions.assertNotNull(CommandShellExecutor.executeDynamicCommand(command,commandShellResultSet, - new AtomicBoolean(true),new Thread())); - - } - - /** - * When executeSDynamic is called with false value - */ - @Test - public void testExecuteDynamicCommandWithFalseInput() { - command = "invalid"; - value = new ArrayList<>(); - errors = new ArrayList<>(); - commandShellResultSet = new CommandShellResultSet<>(value, errors); - Assertions.assertNotNull(CommandShellExecutor.executeDynamicCommand(command,commandShellResultSet, - new AtomicBoolean(false),new Thread())); - - } - -} \ No newline at end of file + import org.junit.jupiter.api.AfterAll; + import org.junit.jupiter.api.Assertions; + import org.junit.jupiter.api.BeforeAll; + import org.junit.jupiter.api.Test; + import org.junit.jupiter.api.extension.ExtendWith; + import org.mockito.junit.jupiter.MockitoExtension; + import java.util.ArrayList; + import java.util.List; + import java.util.concurrent.atomic.AtomicBoolean; + import static org.junit.jupiter.api.Assertions.assertEquals; + import static org.mockito.Mockito.spy; + + /** + * @author nehanaithani + */ + @ExtendWith(MockitoExtension.class) + public class CommandShellExecutorTest { + private CommandShellResultSet, List> commandShellResultSet; + private String command; + List value; + List errors; + + @BeforeAll + public static void setUp() throws Exception { + spy(new CommandShellExecutor()); + } + + @AfterAll + public static void tearDown() throws Exception { + } + + /** + * When execute command is supplied with valid command + */ + @Test + public void testExecuteCommandWithValidInput() { + + command = "echo Iofog"; + value = new ArrayList<>(); + value.add("Iofog"); + errors = new ArrayList<>(); + commandShellResultSet = new CommandShellResultSet<>(value, errors); + assertEquals(commandShellResultSet, CommandShellExecutor.executeCommand(command)); + } + + /** + * When execute command is supplied with invalid command + */ + @Test + public void testExecuteCommandWithInvalidCommand() { + command = "some random command"; + value = new ArrayList<>(); + errors = new ArrayList<>(); + errors.add("/bin/sh: some: command not found"); + commandShellResultSet = new CommandShellResultSet<>(value, errors); + Assertions.assertNotNull( CommandShellExecutor.executeCommand(command)); + } + + /** + * When executeScript is called + */ + @Test + public void testExecuteScript() { + command = "echo"; + value = new ArrayList<>(); + errors = new ArrayList<>(); + errors.add("/bin/echo: /bin/echo: cannot execute binary file"); + commandShellResultSet = new CommandShellResultSet<>(value, errors); + Assertions.assertNotNull(CommandShellExecutor.executeScript(command, "agent")); + } + + /** + * When executeSDynamic is called with true value + */ + @Test + public void testExecuteDynamicCommandWithTrueInput() { + command = "echo"; + value = new ArrayList<>(); + errors = new ArrayList<>(); + commandShellResultSet = new CommandShellResultSet<>(value, errors); + Assertions.assertNotNull(CommandShellExecutor.executeDynamicCommand(command,commandShellResultSet, + new AtomicBoolean(true),new Thread())); + + } + + /** + * When executeSDynamic is called with false value + */ + @Test + public void testExecuteDynamicCommandWithFalseInput() { + command = "invalid"; + value = new ArrayList<>(); + errors = new ArrayList<>(); + commandShellResultSet = new CommandShellResultSet<>(value, errors); + Assertions.assertNotNull(CommandShellExecutor.executeDynamicCommand(command,commandShellResultSet, + new AtomicBoolean(false),new Thread())); + + } + + } \ No newline at end of file diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellResultSetTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellResultSetTest.java index 2e2eeb9cb..4c42404ce 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellResultSetTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/command_line/util/CommandShellResultSetTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/ImageDownloadManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/ImageDownloadManagerTest.java index be55eec9e..eedf64b6e 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/ImageDownloadManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/ImageDownloadManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceDataTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceDataTest.java index f566df368..6ff841014 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceDataTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/MicroserviceStraceDataTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManagerTest.java index 20eb48111..5406b96dd 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/diagnostics/strace/StraceDiagnosticManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -23,9 +23,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.json.JsonValue; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonValue; import java.util.ArrayList; import java.util.Iterator; import java.util.List; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentStatusTest.java index 8b136ceb4..9acf76092 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentTest.java index 4342a6cf2..42e8bc16b 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/FieldAgentTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -49,10 +49,10 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; import javax.net.ssl.SSLHandshakeException; import java.io.BufferedReader; import java.io.InputStream; @@ -566,6 +566,9 @@ public void testProvisionWhenControllerStatusIsProvisionedAndOrchestratorReturns .add("rebuild", false) .add("delete", false) .add("rootHostAccess", false) + .add("platform", "platform") + .add("runtime", "runtime") + .add("runAsUser", "runAsUser") .add("deleteWithCleanup", false) .add("registryId", 1) .add("logSize", 2123l) diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/VersionHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/VersionHandlerTest.java index 64b28a673..40369d1d8 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/VersionHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/VersionHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,9 +29,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; import java.io.File; import java.io.IOException; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/enums/VersionCommandTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/enums/VersionCommandTest.java index dc82f9a94..754cc4e24 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/enums/VersionCommandTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/field_agent/enums/VersionCommandTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -21,9 +21,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ApiHandlerHelpersTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ApiHandlerHelpersTest.java index 65a96e9a7..a7184f358 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ApiHandlerHelpersTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ApiHandlerHelpersTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/BluetoothApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/BluetoothApiHandlerTest.java index bfa243181..8311cb8d4 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/BluetoothApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/BluetoothApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/CommandLineApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/CommandLineApiHandlerTest.java index 0aa589b05..ddf384f52 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/CommandLineApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/CommandLineApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,9 +29,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.BufferedReader; import java.io.StringReader; import java.util.HashMap; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ConfigApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ConfigApiHandlerTest.java index 094e4b3dd..0a20ab122 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ConfigApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ConfigApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,9 +28,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import java.io.StringReader; import java.util.HashMap; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlSignalSentInfoTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlSignalSentInfoTest.java index 3a190ef76..265e0f0bc 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlSignalSentInfoTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlSignalSentInfoTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketHandlerTest.java index 4f7ea1263..b1aea2c60 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -35,7 +35,7 @@ import java.util.HashMap; import java.util.Map; -import static io.netty.handler.codec.http.HttpHeaders.Names.HOST; +import static io.netty.handler.codec.http.HttpHeaderNames .HOST; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mockConstruction; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketWorkerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketWorkerTest.java index 24a6d5cfd..bbba2d63f 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketWorkerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/ControlWebsocketWorkerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/DeprovisionApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/DeprovisionApiHandlerTest.java index 7ca4ce4a1..36609d3bd 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/DeprovisionApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/DeprovisionApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GetConfigurationHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GetConfigurationHandlerTest.java index e6ca36642..78f998866 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GetConfigurationHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GetConfigurationHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.ExecutorService; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GpsApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GpsApiHandlerTest.java index 249aa0177..42542529d 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GpsApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/GpsApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -29,7 +29,7 @@ import org.mockito.quality.Strictness; import org.mockito.stubbing.Answer; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.ExecutorService; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/InfoApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/InfoApiHandlerTest.java index 005ee4239..8424e784e 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/InfoApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/InfoApiHandlerTest.java @@ -18,7 +18,7 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.ExecutorService; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactoryTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactoryTest.java index 5d8b27906..b59657ef5 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactoryTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerPipelineFactoryTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerTest.java index c5eaeb3a9..213f30846 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiServerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiStatusTest.java index 0574cd402..6705cc235 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LocalApiStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LogApiHandlerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LogApiHandlerTest.java index bc631bb42..807307982 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LogApiHandlerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/LogApiHandlerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -28,7 +28,7 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.*; +import jakarta.json.*; import java.io.StringReader; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/MessageCallbackTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/MessageCallbackTest.java index 2f44a3e8a..131f9a71d 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/MessageCallbackTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/local_api/MessageCallbackTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/IOMessageListenerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/IOMessageListenerTest.java index 172cc2b3f..c71949333 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/IOMessageListenerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/IOMessageListenerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageArchiveTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageArchiveTest.java index 7ba22aa8f..ae5149866 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageArchiveTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageArchiveTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -27,7 +27,7 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; +import jakarta.json.Json; import java.io.*; import java.lang.reflect.Method; import java.nio.file.*; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusServerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusServerTest.java index 008a47069..156c17ac1 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusServerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusServerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusStatusTest.java index 76db8b2ef..01cb2f92e 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusTest.java index f4a92105b..f4403f63f 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -34,9 +34,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusUtilTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusUtilTest.java index 54c17f097..1dc4b37b6 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusUtilTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageBusUtilTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageIdGeneratorTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageIdGeneratorTest.java index 234e3c7c4..0a57972a5 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageIdGeneratorTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageIdGeneratorTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessagePublisherTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessagePublisherTest.java index 3c504c4ba..bbfdbc216 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessagePublisherTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessagePublisherTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageReceiverTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageReceiverTest.java index 6e02e7343..bca72de5e 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageReceiverTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageReceiverTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageTest.java index 88cde4489..00dc9f9a5 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/message_bus/MessageTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -24,9 +24,9 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerManagerTest.java index 091877e17..9366e9ef6 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerTaskTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerTaskTest.java index 0f7e1267c..acb06baab 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerTaskTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ContainerTaskTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/DockerUtilTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/DockerUtilTest.java index f0325e905..684a7abc3 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/DockerUtilTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/DockerUtilTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -107,7 +107,7 @@ public class DockerUtilTest { MockedConstruction microserviceStatusMockedConstruction; MockedConstruction countDownLatchMockedConstruction; MockedConstruction statsCallbackMockedConstruction; - + @BeforeEach public void setUp() throws Exception { dockerClientConfig = mock(DefaultDockerClientConfig.Builder.class); @@ -170,7 +170,7 @@ public void setUp() throws Exception { Mockito.when(dockerClientConfig.withApiVersion(anyString())).thenReturn(dockerClientConfig); Mockito.when(dockerClientConfig.build()).thenReturn(defaultDockerClientConfig); Mockito.when(Configuration.getDockerUrl()).thenReturn("url"); - Mockito.when(Configuration.getDockerApiVersion()).thenReturn("1.2"); + Mockito.when(Configuration.getDockerApiVersion()).thenReturn("1.45"); Mockito.when(DockerClientBuilder.getInstance(any(DockerClientConfig.class))).thenReturn(dockerClientBuilder); Mockito.when(dockerClientBuilder.build()).thenReturn(dockerClient); Mockito.when(dockerClient.eventsCmd()).thenReturn(eventsCmd); @@ -197,12 +197,14 @@ public void setUp() throws Exception { Mockito.when(pullImageCmd.exec(any())).thenReturn(pullImageResultCallback); Mockito.when(dockerClient.inspectContainerCmd(anyString())).thenReturn(inspectContainerCmd); Mockito.when(dockerClient.createContainerCmd(anyString())).thenReturn(createContainerCmd); - Mockito.when(createContainerCmd.withExposedPorts(any(ExposedPort.class))).thenReturn(createContainerCmd); - Mockito.when(createContainerCmd.withEnv(anyList())).thenReturn(createContainerCmd); + Mockito.when(createContainerCmd.withEnv(any(List.class))).thenReturn(createContainerCmd); Mockito.when(createContainerCmd.withName(any())).thenReturn(createContainerCmd); Mockito.when(createContainerCmd.withLabels(any())).thenReturn(createContainerCmd); + Mockito.when(createContainerCmd.withExposedPorts(any(ExposedPort.class))).thenReturn(createContainerCmd); Mockito.when(createContainerCmd.withVolumes(any(Volume.class))).thenReturn(createContainerCmd); - Mockito.when(createContainerCmd.withCmd(anyList())).thenReturn(createContainerCmd); + Mockito.when(createContainerCmd.withCmd(any(List.class))).thenReturn(createContainerCmd); + Mockito.when(createContainerCmd.withPlatform(anyString())).thenReturn(createContainerCmd); + Mockito.when(createContainerCmd.withUser(anyString())).thenReturn(createContainerCmd); Mockito.when(createContainerCmd.withHostConfig(any(HostConfig.class))).thenReturn(createContainerCmd); Mockito.when(createContainerCmd.exec()).thenReturn(createContainerResponse); Mockito.when(createContainerResponse.getId()).thenReturn(containerID); @@ -220,7 +222,6 @@ public void setUp() throws Exception { Mockito.when(containerState.getStatus()).thenReturn("UNKNOWN"); Mockito.when(microservice.getContainerId()).thenReturn(containerID); Mockito.when(StatusReporter.setProcessManagerStatus()).thenReturn(processManagerStatus); - Mockito.when(processManagerStatus.getMicroserviceStatus(any())).thenReturn(microserviceStatus); Mockito.when(container.getNames()).thenReturn(containerNames); Mockito.when(container.getId()).thenReturn(containerID); Mockito.when(portMapping.getInside()).thenReturn(5112); diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerStatusTest.java index 7ef8463a5..ae1070109 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -26,8 +26,8 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonArrayBuilder; +import jakarta.json.Json; +import jakarta.json.JsonArrayBuilder; import java.util.ArrayList; import java.util.List; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerTest.java index 0fe1bc7f0..e03e457bb 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/ProcessManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/RestartStuckCheckerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/RestartStuckCheckerTest.java index 95dd0bd6a..d384f93cb 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/RestartStuckCheckerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/RestartStuckCheckerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/StatsCallbackTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/StatsCallbackTest.java index c98b81929..b4f98ce69 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/StatsCallbackTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/process_manager/StatsCallbackTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/pruning/DockerPruningManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/pruning/DockerPruningManagerTest.java index 834ad70d0..25585fc9a 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/pruning/DockerPruningManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/pruning/DockerPruningManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatusTest.java index 9dde9a6ca..99d1e9603 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerTest.java index 9695a5e4b..f56863910 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_consumption_manager/ResourceConsumptionManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerStatusTest.java index 37d46ab86..0f982a43f 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerTest.java index 8aafefe34..4409f29d3 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/resource_manager/ResourceManagerTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterStatusTest.java index 3d7dd5fc8..78602b6ee 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterTest.java index be42e97a1..53c8bf1db 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/status_reporter/StatusReporterTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/supervisor/SupervisorStatusTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/supervisor/SupervisorStatusTest.java index 234a19d04..979cded5e 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/supervisor/SupervisorStatusTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/supervisor/SupervisorStatusTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/CmdPropertiesTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/CmdPropertiesTest.java index 3969d32c0..a99607016 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/CmdPropertiesTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/CmdPropertiesTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -44,11 +44,11 @@ public void tearDown() throws Exception { cmdPropertiesMockedStatic.close(); } - @Test - public void getVersionMessage() { - assertEquals("ioFog %s \nCopyright (C) 2018-2024 Edgeworx, Inc. \nEclipse ioFog is provided under the Eclipse Public License 2.0 (EPL-2.0) \nhttps://www.eclipse.org/legal/epl-v20.html", - CmdProperties.getVersionMessage()); - } + //@Test + //public void getVersionMessage() { + // assertEquals("ioFog 3.3.0 \nCopyright (c) 2023 Datasance Teknoloji A.S. \nEclipse ioFog is provided under the Eclipse Public License 2.0 (EPL-2.0) \nhttps://www.eclipse.org/legal/epl-v20.html", + // CmdProperties.getVersionMessage()); + //} @Test public void getVersion() { diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/OrchestratorTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/OrchestratorTest.java index fe4c33108..be186af67 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/OrchestratorTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/OrchestratorTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at @@ -45,10 +45,10 @@ import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; +import jakarta.json.JsonReader; import javax.naming.AuthenticationException; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/configuration/ConfigurationTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/configuration/ConfigurationTest.java index 9b34f7df8..8f077d5d0 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/configuration/ConfigurationTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/configuration/ConfigurationTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/device_info/ArchitectureTypeTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/device_info/ArchitectureTypeTest.java index 409470baa..b9c88ca61 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/device_info/ArchitectureTypeTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/device_info/ArchitectureTypeTest.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2024 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LogFormatterTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LogFormatterTest.java index 6ee31d921..7bff467a6 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LogFormatterTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LogFormatterTest.java @@ -1,6 +1,6 @@ ///* // * ******************************************************************************* -// * * Copyright (c) 2018-2024 Edgeworx, Inc. +// * * Copyright (c) 2023 Datasance Teknoloji A.S. // * * // * * This program and the accompanying materials are made available under the // * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LoggingServiceTest.java b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LoggingServiceTest.java index 3d4acabdf..1b17bd264 100644 --- a/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LoggingServiceTest.java +++ b/iofog-agent-daemon/src/test/java/org/eclipse/iofog/utils/logging/LoggingServiceTest.java @@ -1,6 +1,6 @@ ///* // * ******************************************************************************* -// * * Copyright (c) 2018-2024 Edgeworx, Inc. +// * * Copyright (c) 2023 Datasance Teknoloji A.S. // * * // * * This program and the accompanying materials are made available under the // * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/Main.java b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/Main.java index 62b25468e..f4c974084 100644 --- a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/Main.java +++ b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/Main.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellExecutor.java b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellExecutor.java index 94d1962d8..4e7a0997c 100755 --- a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellExecutor.java +++ b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellExecutor.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellResultSet.java b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellResultSet.java index 7df6ddbef..ca40452f6 100644 --- a/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellResultSet.java +++ b/iofog-version-controller/src/main/java/org/eclipse/iofog_version_controller/command_line/util/CommandShellResultSet.java @@ -1,6 +1,6 @@ /* * ******************************************************************************* - * * Copyright (c) 2018-2022 Edgeworx, Inc. + * * Copyright (c) 2023 Datasance Teknoloji A.S. * * * * This program and the accompanying materials are made available under the * * terms of the Eclipse Public License v. 2.0 which is available at diff --git a/packaging/iofog-agent/etc/iofog-agent/config-bck_new.xml b/packaging/iofog-agent/etc/iofog-agent/config-bck_new.xml index c7f34aa72..f80853010 100644 --- a/packaging/iofog-agent/etc/iofog-agent/config-bck_new.xml +++ b/packaging/iofog-agent/etc/iofog-agent/config-bck_new.xml @@ -1,7 +1,7 @@