| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
import os |
| 17 |
|
| 18 |
from magnum.drivers.common import template_def |
| 19 |
|
| 20 |
|
| 21 |
class ExampleTemplate(template_def.BaseTemplateDefinition): |
| 22 |
provides = [ |
| 23 |
{'server_type': 'vm', 'os': 'example', 'coe': 'example_coe'}, |
| 24 |
{'server_type': 'vm', 'os': 'example2', 'coe': 'example_coe'}, |
| 25 |
] |
| 26 |
|
| 27 |
def __init__(self): |
| 28 |
super(ExampleTemplate, self).__init__() |
| 29 |
|
| 30 |
self.add_output('server_address', |
| 31 |
cluster_attr='api_address') |
| 32 |
self.add_output('node_addresses', |
| 33 |
cluster_attr='node_addresses') |
| 34 |
|
| 35 |
def template_path(self): |
| 36 |
return os.path.join(os.path.dirname(__file__), 'example.yaml') |