Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CODENVY-560 : Introduce new type for providing docker recipes and rem…
…ove InstanceKey #1 new docker recipe type currently we have type:"dockerfile", location: "http://path-to-recipe" now we could provide type:"dockerfile", content: "FROM codenvy/foo\nENV FLORENT=TRUE\" and type:"image", location or content: "codenvy/foo" #2 InstanceKey Up to now, InstanceKey was used to perform snapshot recovery. But machine source is a way to provide this information. So remove InstanceKey and replace it by MachineSource (and DockerMachineSource instead of DockerInstanceKey) InstanceProvider: void removeInstanceSnapshot(InstanceKey instanceKey) --> void removeInstanceSnapshot(MachineSource machineSource) Instance: InstanceKey saveToSnapshot(String owner) --> MachineSource saveToSnapshot(String owner) #3 InstanceProvider model To avoid also that MachineManager "knows" the inner type, the recipe handling is moved to the instance provider implementation And as the snapshot handling is with MachineSource (included in MachineConfig included in Machine), no need to give extra InstanceKey parameter Replace two previous methods Instance createInstance(Recipe recipe, Machine machine, LineConsumer creationLogsOutput) Instance createInstance(InstanceKey instanceKey, Machine machine, LineConsumer creationLogsOutput) throws NotFoundException, InvalidInstanceSnapshotException, MachineException; by only one: createInstance(Machine machine, LineConsumer creationLogsOutput) Change-Id: Ia7ea97bc1a44059b4892f5db387f54f2e1709fa3 Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
- Loading branch information