change interfaces_class to interface_classes

according to the newset SECoP syntax
accept both namings on the client side

Change-Id: I23abfa163d189044d997b715c912359158c16e42
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21478
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
2019-10-29 15:21:18 +01:00
committed by Enrico Faulhaber
parent 98f87f1306
commit 1768aaefaa
4 changed files with 12 additions and 10 deletions

View File

@ -74,8 +74,8 @@ class Module(HasProperties, metaclass=ModuleMeta):
default='user', extname='visibility'),
'implementation': Property('Internal name of the implementation class of the module', StringType(),
extname='implementation'),
'interface_class': Property('Offical highest Interface-class of the module', ArrayOf(StringType()),
extname='interface_class'),
'interface_classes': Property('Offical highest Interface-class of the module', ArrayOf(StringType()),
extname='interface_classes'),
# what else?
}
@ -111,10 +111,10 @@ class Module(HasProperties, metaclass=ModuleMeta):
myclassname = '%s.%s' % (mycls.__module__, mycls.__name__)
self.properties['implementation'] = myclassname
# list of all 'secop' modules
self.properties['interface_class'] = [
self.properties['interface_classes'] = [
b.__name__ for b in mycls.__mro__ if b.__module__.startswith('secop.modules')]
# list of only the 'highest' secop module class
self.properties['interface_class'] = [[
self.properties['interface_classes'] = [[
b.__name__ for b in mycls.__mro__ if b.__module__.startswith('secop.modules')][0]]
# handle Features