Search in sources :

Example 6 with Change

use of com.yahoo.vespa.hosted.controller.application.Change in project vespa by vespa-engine.

the class ApplicationSerializer method changeFromSlime.

private Change changeFromSlime(Inspector object) {
    if (!object.valid())
        return Change.empty();
    Inspector versionFieldValue = object.field(versionField);
    Change change = Change.empty();
    if (versionFieldValue.valid())
        change = Change.of(Version.fromString(versionFieldValue.asString()));
    if (object.field(applicationBuildNumberField).valid())
        change = change.with(applicationVersionFromSlime(object));
    if (// A deploy object with no fields -> unknown application change
    !change.isPresent())
        change = Change.empty();
    return change;
}
Also used : Inspector(com.yahoo.slime.Inspector) Change(com.yahoo.vespa.hosted.controller.application.Change)

Aggregations

Change (com.yahoo.vespa.hosted.controller.application.Change)6 ApplicationId (com.yahoo.config.provision.ApplicationId)5 Application (com.yahoo.vespa.hosted.controller.Application)5 Version (com.yahoo.component.Version)3 Inspector (com.yahoo.slime.Inspector)3 Controller (com.yahoo.vespa.hosted.controller.Controller)3 Deployment (com.yahoo.vespa.hosted.controller.application.Deployment)3 DeploymentJobs (com.yahoo.vespa.hosted.controller.application.DeploymentJobs)3 Duration (java.time.Duration)3 List (java.util.List)3 Optional (java.util.Optional)3 DeploymentSpec (com.yahoo.config.application.api.DeploymentSpec)2 Environment (com.yahoo.config.provision.Environment)2 ApplicationController (com.yahoo.vespa.hosted.controller.ApplicationController)2 TenantId (com.yahoo.vespa.hosted.controller.api.identifiers.TenantId)2 ApplicationPackage (com.yahoo.vespa.hosted.controller.application.ApplicationPackage)2 ApplicationVersion (com.yahoo.vespa.hosted.controller.application.ApplicationVersion)2 JobType (com.yahoo.vespa.hosted.controller.application.DeploymentJobs.JobType)2 JobStatus (com.yahoo.vespa.hosted.controller.application.JobStatus)2 Collections (java.util.Collections)2