Implement meta-classes for UI hints
The following meta-classes are implemented and placed to the core library: Title, Description, HelpText, Hidden, Section, Position. They can be attached to the different MuranoPL entities and used during the automatic UI definition generation. Also meta-class ModelBuilder is added for marking special static methods. Change-Id: I474d69b2cadb9b200e70d4d9daaef3e87d9cb3a5 Partially-implements: blueprint muranopl-forms
This commit is contained in:
parent
d68a913cd1
commit
6f04c2ba76
22
meta/io.murano/Classes/metadata/Description.yaml
Normal file
22
meta/io.murano/Classes/metadata/Description.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata
|
||||||
|
|
||||||
|
Name: Description
|
||||||
|
Usage: Meta
|
||||||
|
Inherited: true
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
text:
|
||||||
|
Contract: $.string().notNull()
|
22
meta/io.murano/Classes/metadata/HelpText.yaml
Normal file
22
meta/io.murano/Classes/metadata/HelpText.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata
|
||||||
|
|
||||||
|
Name: HelpText
|
||||||
|
Usage: Meta
|
||||||
|
Inherited: true
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
text:
|
||||||
|
Contract: $.string().notNull()
|
19
meta/io.murano/Classes/metadata/ModelBuilder.yaml
Normal file
19
meta/io.murano/Classes/metadata/ModelBuilder.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata
|
||||||
|
|
||||||
|
Name: ModelBuilder
|
||||||
|
Usage: Meta
|
||||||
|
Applies: Method
|
||||||
|
Inherited: true
|
28
meta/io.murano/Classes/metadata/Position.yaml
Normal file
28
meta/io.murano/Classes/metadata/Position.yaml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata
|
||||||
|
|
||||||
|
Name: Position
|
||||||
|
Usage: Meta
|
||||||
|
Applies: [Property, Argument]
|
||||||
|
Inherited: true
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
index:
|
||||||
|
Contract: $.int()
|
||||||
|
Default: null
|
||||||
|
|
||||||
|
section:
|
||||||
|
Contract: $.string()
|
||||||
|
Default: null
|
22
meta/io.murano/Classes/metadata/Title.yaml
Normal file
22
meta/io.murano/Classes/metadata/Title.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata
|
||||||
|
|
||||||
|
Name: Title
|
||||||
|
Usage: Meta
|
||||||
|
Inherited: true
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
text:
|
||||||
|
Contract: $.string().notNull()
|
19
meta/io.murano/Classes/metadata/forms/Hidden.yaml
Normal file
19
meta/io.murano/Classes/metadata/forms/Hidden.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata.forms
|
||||||
|
|
||||||
|
Name: Hidden
|
||||||
|
Usage: Meta
|
||||||
|
Applies: [Property, Argument]
|
||||||
|
Inherited: true
|
32
meta/io.murano/Classes/metadata/forms/Section.yaml
Normal file
32
meta/io.murano/Classes/metadata/forms/Section.yaml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
Namespaces:
|
||||||
|
=: io.murano.metadata.forms
|
||||||
|
|
||||||
|
Name: Section
|
||||||
|
Usage: Meta
|
||||||
|
Cardinality: Many
|
||||||
|
Applies: [Type, Method]
|
||||||
|
Inherited: true
|
||||||
|
|
||||||
|
Properties:
|
||||||
|
name:
|
||||||
|
Contract: $.string().notNull()
|
||||||
|
|
||||||
|
title:
|
||||||
|
Contract: $.string()
|
||||||
|
Default: $.name
|
||||||
|
|
||||||
|
index:
|
||||||
|
Contract: $.int()
|
||||||
|
Default: null
|
@ -69,4 +69,12 @@ Classes:
|
|||||||
io.murano.system.AwsSecurityGroupManager: system/AwsSecurityGroupManager.yaml
|
io.murano.system.AwsSecurityGroupManager: system/AwsSecurityGroupManager.yaml
|
||||||
io.murano.system.MistralClient: system/MistralClient.yaml
|
io.murano.system.MistralClient: system/MistralClient.yaml
|
||||||
|
|
||||||
|
io.murano.metadata.Description: metadata/Description.yaml
|
||||||
|
io.murano.metadata.HelpText: metadata/HelpText.yaml
|
||||||
|
io.murano.metadata.ModelBuilder: metadata/ModelBuilder.yaml
|
||||||
|
io.murano.metadata.Position: metadata/Position.yaml
|
||||||
|
io.murano.metadata.Title: metadata/Title.yaml
|
||||||
|
io.murano.metadata.forms.Hidden: metadata/forms/Hidden.yaml
|
||||||
|
io.murano.metadata.forms.Section: metadata/forms/Section.yaml
|
||||||
|
|
||||||
io.murano.test.TestFixture: test/TestFixture.yaml
|
io.murano.test.TestFixture: test/TestFixture.yaml
|
||||||
|
4
releasenotes/notes/meta-for-ui-72f5b58c6d17599f.yaml
Normal file
4
releasenotes/notes/meta-for-ui-72f5b58c6d17599f.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- The meta-classes Title, Description, HelpText, Hidden, Section, Position,
|
||||||
|
ModelBuilder are implemented and placed to the core library .
|
Loading…
Reference in New Issue
Block a user