stop exporting experimental database models

This commit is contained in:
Jimmy Zelinskie 2016-08-31 16:08:01 -04:00
parent c35413d4f6
commit 783c9e7a73

View file

@ -1173,5 +1173,12 @@ class BitTorrentPieces(BaseModel):
)
is_model = lambda x: inspect.isclass(x) and issubclass(x, BaseModel) and x is not BaseModel
beta_classes = set([ManifestLayerScan, Tag, BlobPlacementLocation, ManifestLayer, ManifestList,
BitTorrentPieces, MediaType, Label, ManifestBlob, BlobUploading, Blob,
ManifestLayerDockerV1, BlobPlacementLocationPreference, ManifestListManifest,
Manifest, DerivedImage, BlobPlacement])
is_model = lambda x: (inspect.isclass(x) and
issubclass(x, BaseModel) and
x is not BaseModel and
x not in beta_classes)
all_models = [model[1] for model in inspect.getmembers(sys.modules[__name__], is_model)]