Implement Image Functionality
Implement the Image
concept from OpenTAP REST-API. An Image is a set of OpenTAP packages and a set of repositories. This concept allows to:
- Verify that the specified set of packages and repositories is resolvable.
- Install the image packages to a location
- CLI Action to install image packages to a location
class ImageSpecifier
{
List<PackageSpecifier> Packages { get; set; }
List<string> Repositories { get; set; }
static ImageSpecifier FromFile(string filePath);
static ImageSpecifier FromImage(Image image);
ImageResolution Resolve();
//Image ToImage();
}
class Image
{
string Id { get; }
ReadOnlyCollection<IPackageIdentifer> Packages { get; }
ReadOnlyCollection<string> Repositories { get; }
}
class ImageResolution
{
public Image image { get; }
public bool Valid { get; }
List<ResolutionException> { get; }
}
ConflictingPackagesException : ResolutionException{
PackageSpecifier packageA
PackageSpecifier packageB
ConflictType conflict
}
MissingPackageException : ResolutionException{
PackageSpecifier package
}
enum ConflictType{
OS,
Arch
Version
}
Edited by Dave Heintz