Reference Guide

Table Of Contents
. . .
State state = appService.state(APP_ID);
switch (state) {
case INSTALLING:
case ENABLING:
installDebian();
installMonitorTask = taskExecutorService.scheduleWithFixedDelay(new
InstallMonitor(),
Measure.valueOf(61, SI.SECOND),
Measure.valueOf(60, SI.SECOND));
break;
case UPGRADING:
upgradeDebian();
break;
case RESOLVED:
case ACTIVE:
validateDebian();
break;
// should not be in these states at start up
case NEW:
case STAGED:
case UPGRADE_STAGED:
case CANCELING:
case DISABLING:
case DISABLED:
case UNINSTALLING:
throw new Exception(E_START_STATE + state);
}
AdminRest Interactions
You use the AdminRest class to interact with the AdminResource to upload and install a debian
package on the local server (loopback address). Do not use the AdminResource for any other
purpose.
The debian file must first be uploaded to the admin process space. The business logic of the
AdminRest API copies the debian file delivered with the application zip (from the
/opt/sdn/config/apps/<app id>/<app version>/unzipped directory) to the admin upload
directory (var/lib/sdn/uploads). This call will occur synchronously, and throws an I/O exception
132