Add TOSCA template to Glare
Add TOSCA template as an artifact available by default in Glare. Change-Id: Id02787e9bcf8694741cb57b843f0300d1a0c24b1
This commit is contained in:
parent
c782f55d67
commit
09230d1783
|
@ -34,7 +34,7 @@ LOG = logging.getLogger(__name__)
|
|||
registry_options = [
|
||||
cfg.ListOpt('enabled_artifact_types',
|
||||
default=['heat_templates', 'heat_environments',
|
||||
'murano_packages'],
|
||||
'murano_packages', 'tosca_templates'],
|
||||
item_type=types.String(),
|
||||
help=_("List of enabled artifact types that will be "
|
||||
"available to user")),
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright 2016 OpenStack Foundation
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# 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.
|
||||
|
||||
from oslo_versionedobjects import fields
|
||||
|
||||
from glare.objects import base
|
||||
from glare.objects.meta import attribute
|
||||
|
||||
|
||||
Field = attribute.Attribute.init
|
||||
Blob = attribute.BlobAttribute.init
|
||||
|
||||
|
||||
class TOSCATemplate(base.BaseArtifact):
|
||||
|
||||
fields = {
|
||||
'template_format': Field(fields.StringField,
|
||||
description="TOSCA template format."),
|
||||
'template': Blob(description="TOSCA template body.")
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def get_type_name(cls):
|
||||
return "tosca_templates"
|
Loading…
Reference in New Issue