addition to the existing 'pyang' checker. Added modal overlay displays showing the yang check results every place the yin/yang symbol is shown (red or green) to indicate the presencee and result of yang checks. Added a Yang Validation: line in the document meta-information section on the document's page in the datatracker. Added the result of the xym extaction to the yang check results, to make extration failures visible. Added the version of the used xym, pyang, and yanglint commands to the check results. Added an action to move successfully extracted and validated modules to the module library directories immediately on submission. Added the xym and pyang repositories as svn:external components, rather than listing them in requirements.txt, as there has been delays of many months between essential features in the repositories, and an actual release. We may get occasional buildbot failures if broken code is pulled in from the repository, but better that than the functionality failure of severely outdated componets. Added a new management command to re-run yang validation for active drafts for which yang modules were found at submission time, in order to pick up imported models which may have arrived in the model libraries after the draft's submission. Run daily from bin/daily. Added a table to hold version information for external commands. The yang checker output should include the version information of the used checkers, but seems unnecessary to run each command with its --version switch every time we check a module... Added a new management command to collect version information for external commands on demand. To be run daily from bin/daily. Added tests to verify that xym, pyang and yanglint information is available on the submission confirmation page, and updated the yang module contained in the test document to validate under both pyang and yanglint. Updated admin.py and resource.py files as needed. - Legacy-Id: 13630
58 lines
1.5 KiB
Python
58 lines
1.5 KiB
Python
# Autogenerated by the mkresources management command 2014-11-13 05:39
|
|
from ietf.api import ModelResource
|
|
from tastypie.fields import CharField
|
|
from tastypie.constants import ALL
|
|
from tastypie.cache import SimpleCache
|
|
|
|
from django.contrib.auth.models import User
|
|
from django.contrib.contenttypes.models import ContentType
|
|
|
|
from ietf import api
|
|
from ietf.utils.models import DumpInfo, VersionInfo
|
|
|
|
|
|
class UserResource(ModelResource):
|
|
username = CharField()
|
|
class Meta:
|
|
cache = SimpleCache()
|
|
queryset = User.objects.all()
|
|
serializer = api.Serializer()
|
|
|
|
|
|
class ContentTypeResource(ModelResource):
|
|
username = CharField()
|
|
class Meta:
|
|
cache = SimpleCache()
|
|
queryset = ContentType.objects.all()
|
|
serializer = api.Serializer()
|
|
|
|
|
|
class DumpInfoResource(ModelResource):
|
|
class Meta:
|
|
cache = SimpleCache()
|
|
queryset = DumpInfo.objects.all()
|
|
serializer = api.Serializer()
|
|
#resource_name = 'dumpinfo'
|
|
filtering = {
|
|
"date": ALL,
|
|
"host": ALL,
|
|
}
|
|
api.utils.register(DumpInfoResource())
|
|
|
|
|
|
class VersionInfoResource(ModelResource):
|
|
class Meta:
|
|
queryset = VersionInfo.objects.all()
|
|
serializer = api.Serializer()
|
|
cache = SimpleCache()
|
|
#resource_name = 'versioninfo'
|
|
filtering = {
|
|
"id": ALL,
|
|
"time": ALL,
|
|
"command": ALL,
|
|
"switch": ALL,
|
|
"version": ALL,
|
|
"used": ALL,
|
|
}
|
|
api.utils.register(VersionInfoResource())
|