Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update stups_auto_configuration.py #577

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion delivery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ notifications:
pipeline:
- id: build
type: script
overlay: ci/python
vm_config:
type: linux
image: cdp-runtime/python-3.6
commands:
- desc: "Install dependencies"
cmd: pip install -r requirements.txt
Expand Down
10 changes: 1 addition & 9 deletions senza/components/stups_auto_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@


def component_stups_auto_configuration(definition, configuration, args, info, force, account_info):
for channel in taupage.CHANNELS.values():
most_recent_image = taupage.find_image(args.region, channel)
if most_recent_image:
configuration = ensure_keys(configuration, "Images", channel.image_mapping, args.region)
configuration["Images"][channel.image_mapping][args.region] = most_recent_image.id
elif channel == taupage.DEFAULT_CHANNEL:
# Require at least one image from the stable channel
raise Exception('No Taupage AMI found')

configuration = ensure_keys(configuration, "Images", taupage.DEFAULT_CHANNEL.image_mapping, args.region)
component_subnet_auto_configuration(definition, configuration, args, info, force, account_info)

return definition