Rename oci_model to appr_model

This commit is contained in:
Joseph Schorr 2018-05-23 17:08:00 -04:00
parent f0d4841155
commit 6622f27c93
19 changed files with 222 additions and 171 deletions

View file

@ -3,7 +3,7 @@ from collections import defaultdict
from datetime import datetime, timedelta
from auth.permissions import ReadRepositoryPermission
from data import model, oci_model
from data import model, appr_model
from endpoints.api.repository_models_interface import RepositoryDataInterface, RepositoryBaseElement, Repository, \
ApplicationRepository, ImageRepositoryRepository, Tag, Channel, Release, Count
@ -142,10 +142,9 @@ class PreOCIModel(RepositoryDataInterface):
repo.namespace_user.organization, repo.namespace_user.removed_tag_expiration_s, None, None,
False, False, False)
# Note: This is *temporary* code for the new OCI model stuff.
if base.kind_name == 'application':
channels = oci_model.channel.get_repo_channels(repo)
releases = oci_model.release.get_release_objs(repo)
channels = appr_model.channel.get_repo_channels(repo)
releases = appr_model.release.get_release_objs(repo)
releases_channels_map = defaultdict(list)
return ApplicationRepository(
base, [_create_channel(channel, releases_channels_map) for channel in channels], [