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:
Valerii Kovalchuk 2016-06-13 17:49:40 +03:00
parent d68a913cd1
commit 6f04c2ba76
9 changed files with 176 additions and 0 deletions

View 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()

View 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()

View 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

View 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

View 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()

View 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

View 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

View File

@ -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

View File

@ -0,0 +1,4 @@
---
features:
- The meta-classes Title, Description, HelpText, Hidden, Section, Position,
ModelBuilder are implemented and placed to the core library .