magnum/contrib/templates/example/setup.py
Andrew Melton 3a8ab855a8 Add Template Definitions
The idea here is to provide a way for magnum to discover and interact
with templates meant to build bays. Template definition discovery is
done through python entry_points, and each class lists the bay_types
it can provide. Each template definition contains a mapping of magnum
object attributes and heat template parameters/outputs.

This will be useful for not only allowing different CoEs, OSes, and
platforms. But can also provide the discovery mechanism for templates
once they are pulled into their own repository.

Partial-Implements: bp multiple-bay-templates

Change-Id: Ia596657856cd861c94e58dcd65acae0677a36d73
2015-04-09 08:47:15 -07:00

38 lines
1.1 KiB
Python

#!/usr/bin/env python
# Copyright (c) 2015 Rackspace Inc.
#
# 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.
import setuptools
setuptools.setup(
name="ExampleTemplate",
version="0.1",
packages=['example_template'],
install_requires=['magnum'],
package_data={
'example_template': ['example.yaml']
},
author="Me",
author_email="me@example.com",
description="This is an Example Template",
license="Apache",
keywords="magnum template example",
entry_points={
'magnum.template_definitions': [
'example_template = example_template:ExampleTemplate'
]
}
)