Skip to content

Commit

Permalink
Better function naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Maddox committed Jan 31, 2014
1 parent 94a9567 commit a1f0e85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions gonzo/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def configure_instance(instance):
instance.create_dns_entry()


def generate_template(stack_type, stack_name, template_uri, template_params):
def generate_stack_template(stack_type, stack_name,
template_uri, template_params):
template_uri = config.get_namespaced_cloud_config_value(
'ORCHESTRATION_TEMPLATE_URIS', stack_type, override=template_uri)
if template_uri is None:
Expand All @@ -127,8 +128,8 @@ def launch_stack(stack_name, template_uri, template_params):

unique_stack_name = get_next_hostname(stack_name)

template = generate_template(stack_name, unique_stack_name,
template_uri, template_params)
template = generate_stack_template(stack_name, unique_stack_name,
template_uri, template_params)

cloud = get_current_cloud()
return cloud.launch_stack(unique_stack_name, template)
Expand Down
4 changes: 2 additions & 2 deletions gonzo/scripts/stack/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import json
from boto.exception import BotoServerError

from gonzo.backends import generate_template
from gonzo.backends import generate_stack_template
from gonzo.config import config_proxy as config
from gonzo.exceptions import CommandError
from gonzo.utils import csv_dict
Expand All @@ -30,7 +30,7 @@ def template(args):
except BotoServerError:
# Stack doesn't exist. Generate a new template.
stack_type = stack_name
template_ = generate_template(
template_ = generate_stack_template(
stack_type, stack_name, args.template_uri, args.template_params)

print template_
Expand Down

0 comments on commit a1f0e85

Please sign in to comment.