Skip to content

Commit

Permalink
1.0.2 (#121)
Browse files Browse the repository at this point in the history
* fixed default controller url (#116)

* 1.0.1 (#118)

* fixed default controller url

* 1.0.1 version

* EWC-292 fixed iofog-agent info controller status when access token is expired/invalid

* build for dev env added

* fix travis

* renaming client (#120)

* renaming client

* 1.0.2
  • Loading branch information
Railag authored and dbusel committed Oct 31, 2018
1 parent 1a234e7 commit 1185d72
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 15 deletions.
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ jdk: openjdk8
stages:
- name: build
if: branch IN (develop, master)
- name: dev_deploy
if: branch = develop
- name: package_build
if: branch = master
if: branch IN (dev_package, master)

jobs:
include:
- stage: build
if: type IN (pull_request)
- stage: dev_deploy
if: type IN (push)
before_install:
- sudo apt-get install sshpass xml-twig-tools
script:
- mvn clean install
- sshpass -p $DEV_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP "service iofog-agent stop"
- sshpass -p $DEV_MACHINE_PASSWORD scp -o StrictHostKeyChecking=no daemon/target/iofog-agent-daemon-jar-with-dependencies.jar $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP:/usr/bin/iofog-agentd.jar
- sshpass -p $DEV_MACHINE_PASSWORD scp -o StrictHostKeyChecking=no client/target/iofog-agent-client-jar-with-dependencies.jar $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP:/usr/bin/iofog-agent.jar
- sshpass -p $DEV_MACHINE_PASSWORD ssh -o StrictHostKeyChecking=no $DEV_MACHINE_USERNAME@$DEV_MACHINE_IP "service iofog-agent start"
- stage: package_build
if: type IN (push)
before_install:
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>iofog-agent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
10 changes: 5 additions & 5 deletions client/src/org/eclipse/iofog/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ private static boolean sendCommandlineParameters(String... args) {
*/
private static String showHelp() {

return ("Usage 1: iofog [OPTION]\n" + "Usage 2: iofog [COMMAND] <Argument>\n"
+ "Usage 3: iofog [COMMAND] [Parameter] <Value>\n" + "\n"
return ("Usage 1: iofog-agent [OPTION]\n" + "Usage 2: iofog-agent [COMMAND] <Argument>\n"
+ "Usage 3: iofog-agent [COMMAND] [Parameter] <Value>\n" + "\n"
+ "Option GNU long option Meaning\n"
+ "====== =============== =======\n"
+ "-h, -? --help Show this message\n"
Expand Down Expand Up @@ -168,7 +168,7 @@ private static String showHelp() {
}

private static String version() {
return "ioFog 0.56 " +
return "ioFog Agent 1.0.0 " +
"\nCopyright (C) 2018 Edgeworx, Inc." +
"\nEclipse ioFog is provided under the Eclipse Public License (EPL2)" +
"\nhttps://www.eclipse.org/legal/epl-v20.html";
Expand All @@ -181,7 +181,7 @@ public static void main(String[] args) throws ParseException {
if (isAnotherInstanceRunning()) {
switch (args[0]) {
case "stop":
System.out.println("Enter \"service iofog stop\"");
System.out.println("Enter \"service iofog-agent stop\"");
break;
case "start":
System.out.println("iofog is already running.");
Expand All @@ -204,7 +204,7 @@ public static void main(String[] args) throws ParseException {
System.out.println(version());
break;
case "start":
System.out.println("Enter \"service iofog start\"");
System.out.println("Enter \"service iofog-agent start\"");
break;
default:
System.out.println("iofog is not running.");
Expand Down
2 changes: 1 addition & 1 deletion daemon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>iofog-agent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
10 changes: 5 additions & 5 deletions daemon/src/org/eclipse/iofog/field_agent/FieldAgentStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
*/
public class FieldAgentStatus {

private Constants.ControllerStatus contollerStatus;
private Constants.ControllerStatus controllerStatus;
private long lastCommandTime;
private boolean controllerVerified;

public FieldAgentStatus() {
contollerStatus = ControllerStatus.BROKEN;
controllerStatus = ControllerStatus.BROKEN;
}

public Constants.ControllerStatus getControllerStatus() {
return contollerStatus;
return controllerStatus;
}

public void setControllerStatus(Constants.ControllerStatus contollerStatus) {
this.contollerStatus = contollerStatus;
public void setControllerStatus(Constants.ControllerStatus controllerStatus) {
this.controllerStatus = controllerStatus;
}

public long getLastCommandTime() {
Expand Down
3 changes: 3 additions & 0 deletions daemon/src/org/eclipse/iofog/utils/Orchestrator.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.http.message.BasicHeader;
import org.eclipse.iofog.field_agent.enums.RequestType;
import org.eclipse.iofog.network.IOFogNetworkInterface;
import org.eclipse.iofog.status_reporter.StatusReporter;
import org.eclipse.iofog.utils.configuration.Configuration;
import org.eclipse.iofog.utils.trustmanager.X509TrustManagerImpl;

Expand Down Expand Up @@ -269,6 +270,8 @@ private JsonObject getJsonObject(Map<String, Object> queryParams, RequestType re
case 400:
throw new BadRequestException(errorMessage);
case 401:
logWarning(MODULE_NAME, "Invalid authentication ioFog token, switching controller state to broken");
StatusReporter.setFieldAgentStatus().setControllerStatus(Constants.ControllerStatus.BROKEN);
throw new AuthenticationException(errorMessage);
case 403:
throw new ForbiddenException(errorMessage);
Expand Down
2 changes: 1 addition & 1 deletion iofog_version_controller/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<parent>
<artifactId>iofog-agent</artifactId>
<groupId>org.eclipse</groupId>
<version>1.0.1</version>
<version>1.0.2</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse</groupId>
<artifactId>iofog-agent</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<name>iofog-agent</name>
<packaging>pom</packaging>

Expand Down

0 comments on commit 1185d72

Please sign in to comment.