mirror of https://github.com/helm/helm
parent
db35ed5a20
commit
63f0f7bce0
@ -0,0 +1,7 @@
|
||||
{% import 'helpers/common.jinja' as common %}
|
||||
resources:
|
||||
- name: {{ common.GenerateMachineName("myFrontend", "prod") }}
|
||||
type: compute.v1.instance
|
||||
properties:
|
||||
description: '{{ imports[properties["description-file"]]|replace("\n","\n\n ") }}'
|
||||
machineSize: big
|
@ -0,0 +1,8 @@
|
||||
imports: ["jinja_multilinefile.jinja", "helpers/common.jinja", "multiline.txt"]
|
||||
|
||||
resources:
|
||||
- name: jinja_multilinefile_name
|
||||
type: jinja_multilinefile.jinja
|
||||
properties:
|
||||
description-file: multiline.txt
|
||||
|
@ -0,0 +1,42 @@
|
||||
config:
|
||||
resources:
|
||||
- name: myFrontend-prod
|
||||
properties:
|
||||
description: '-----BEGIN TEST CERT-----
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Thelastlineisntalways65characters.Notsurewhy...
|
||||
|
||||
-----END TEST CERT-----
|
||||
|
||||
'
|
||||
machineSize: big
|
||||
type: compute.v1.instance
|
||||
layout:
|
||||
resources:
|
||||
- name: jinja_multilinefile_name
|
||||
properties:
|
||||
description-file: multiline.txt
|
||||
resources:
|
||||
- name: myFrontend-prod
|
||||
type: compute.v1.instance
|
||||
type: jinja_multilinefile.jinja
|
@ -0,0 +1,13 @@
|
||||
-----BEGIN TEST CERT-----
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
Thelastlineisntalways65characters.Notsurewhy...
|
||||
-----END TEST CERT-----
|
@ -0,0 +1,22 @@
|
||||
# Copyright 2014 Google Inc. All Rights Reserved.
|
||||
|
||||
"""Constructs a VM."""
|
||||
|
||||
# Verify that both ways of hierarchical imports work.
|
||||
from helpers import common
|
||||
import helpers.extra.common2
|
||||
|
||||
|
||||
def GenerateConfig(evaluation_context):
|
||||
"""Generates config of a VM."""
|
||||
|
||||
resource = {}
|
||||
resource['name'] = common.GenerateMachineName('myFrontend', 'prod')
|
||||
resource['type'] = 'compute.v1.instance'
|
||||
resource['properties'] = {
|
||||
'description': evaluation_context.imports[
|
||||
evaluation_context.properties['description-file']],
|
||||
'machineSize': helpers.extra.common2.GenerateMachineSize()
|
||||
}
|
||||
|
||||
return {'resources': [resource]}
|
@ -0,0 +1,8 @@
|
||||
imports: ["python_multilinefile.py", "helpers/common.py", "helpers/common2.py", "helpers/__init__.py", "multiline.txt"]
|
||||
|
||||
resources:
|
||||
- name: python_multilinefile_name
|
||||
type: python_multilinefile.py
|
||||
properties:
|
||||
description-file: multiline.txt
|
||||
|
@ -0,0 +1,42 @@
|
||||
config:
|
||||
resources:
|
||||
- name: myFrontend-prod
|
||||
properties:
|
||||
description: '-----BEGIN TEST CERT-----
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Lotsof65characterlineswillfollow.Onlyseveralmorecharacterstogo!!
|
||||
|
||||
Thelastlineisntalways65characters.Notsurewhy...
|
||||
|
||||
-----END TEST CERT-----
|
||||
|
||||
'
|
||||
machineSize: big
|
||||
type: compute.v1.instance
|
||||
layout:
|
||||
resources:
|
||||
- name: python_multilinefile_name
|
||||
properties:
|
||||
description-file: multiline.txt
|
||||
resources:
|
||||
- name: myFrontend-prod
|
||||
type: compute.v1.instance
|
||||
type: python_multilinefile.py
|
Loading…
Reference in new issue