Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.

Commit

Permalink
allow patching on AMIs with different names (with formatting) and lim…
Browse files Browse the repository at this point in the history
…it only on platform. This allows 2012 machines to update to 2016.
  • Loading branch information
tl-jakecross committed Jan 24, 2018
1 parent 7da4e79 commit 39300f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions emcli/commands/cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,5 +225,5 @@ def validate_ami_compatibility(self, from_name=None, to_name=None):
if from_name is None:
raise ValueError('You must specify --from-ami if --to-ami is given')
if from_ami is not None and to_ami is not None:
if from_ami['AmiType'] != to_ami['AmiType']:
raise ValueError('AMI types for from_ami and to_ami must match')
if from_ami['Platform'] != to_ami['Platform']:
raise ValueError('AMI platforms must match')
4 changes: 2 additions & 2 deletions emcli/commands/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,6 @@ def validate_ami_compatibility(self, from_name=None, to_name=None):
if from_name is None:
raise ValueError('You must specify --from-ami if --to-ami is given')
if from_ami is not None and to_ami is not None:
if from_ami['AmiType'] != to_ami['AmiType']:
raise ValueError('AMI types for from_ami and to_ami must match')
if from_ami['Platform'] != to_ami['Platform']:
raise ValueError('AMI platforms must match')

0 comments on commit 39300f0

Please sign in to comment.