Reference Guide
Table Of Contents
- 1 Introduction
- 2 Establishing Your Test and Development Environments
- 3 Developing Applications
- Introduction
- Authentication
- REST API
- Audit Logging
- Alert Logging
- Configuration
- High Availability
- OpenFlow
- Metrics Framework
- GUI
- SKI Framework - Overview
- SKI Framework - Navigation Tree
- SKI Framework - Hash Navigation
- SKI Framework - View Life-Cycle
- SKI Framework - Live Reference Application
- UI Extension
- Introduction
- Controller Teaming
- Distributed Coordination Service
- Persistence
- Backup and Restore
- Device Driver Framework
- 4 Application Security
- 5 Including Debian Packages with Applications
- 6 Sample Application
- Application Description
- Creating Application Development Workspace
- Application Generator (Automatic Workspace Creation)
- Creating Eclipse Projects
- Updating Project Dependencies
- Building the Application
- Installing the Application
- Application Code
- 7 Testing Applications
- 8 Built-In Applications
- Appendix A
- Appendix B
- Bibliography
. . .
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