Search in sources :

Example 1 with InstalledPackages

use of de.cinovo.cloudconductor.agent.executors.InstalledPackages in project cloudconductor-agent-redhat by cinovo.

the class PackageHandler method reportInstalledPackages.

private PackageStateChanges reportInstalledPackages() throws ExecutionError {
    PackageState installedPackages;
    PackageHandler.LOGGER.debug("Starting to report packages");
    IExecutor<List<PackageVersion>> execute = new InstalledPackages().execute();
    PackageHandler.LOGGER.debug("Found packages to report");
    installedPackages = new PackageState(execute.getResult());
    try {
        return ServerCom.notifyInstalledPackages(installedPackages);
    } catch (CloudConductorException e) {
        PackageHandler.LOGGER.error("Error reporting installed packages: ", e);
        throw new ExecutionError(e);
    }
}
Also used : CloudConductorException(de.cinovo.cloudconductor.api.lib.exceptions.CloudConductorException) ExecutionError(de.cinovo.cloudconductor.agent.exceptions.ExecutionError) InstalledPackages(de.cinovo.cloudconductor.agent.executors.InstalledPackages) PackageState(de.cinovo.cloudconductor.api.model.PackageState) List(java.util.List)

Aggregations

ExecutionError (de.cinovo.cloudconductor.agent.exceptions.ExecutionError)1 InstalledPackages (de.cinovo.cloudconductor.agent.executors.InstalledPackages)1 CloudConductorException (de.cinovo.cloudconductor.api.lib.exceptions.CloudConductorException)1 PackageState (de.cinovo.cloudconductor.api.model.PackageState)1 List (java.util.List)1