Merge lp:~mwhudson/launchpad/ec2-land-instance-type-option into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: 14308
Proposed branch: lp:~mwhudson/launchpad/ec2-land-instance-type-option
Merge into: lp:launchpad
Diff against target: 26 lines (+4/-1)
2 files modified
lib/devscripts/ec2test/builtins.py (+1/-0)
lib/devscripts/ec2test/instance.py (+3/-1)
To merge this branch: bzr merge lp:~mwhudson/launchpad/ec2-land-instance-type-option
Reviewer Review Type Date Requested Status
Martin Pool (community) Approve
Review via email: mp+82349@code.launchpad.net

Commit message

[r=mbp] [r=mbp, mwhudson][no-qa] allow ec2 land to take the instance type options

Description of the change

This was even more trivial than I expected it to be.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

It might be cleaner to just leave it up to aws to decide if what you asked for is valid or not. But, this is certainly welcome.

review: Approve
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

On Wed, 16 Nov 2011 05:15:28 -0000, Martin Pool <email address hidden> wrote:
> It might be cleaner to just leave it up to aws to decide if what you asked for is valid or not. But, this is certainly welcome.

Yeah, that would be possible, although having the possibilities
documented is nice. I wonder if there is some way of asking amazon what
image types are currently supported (other than scraping the
runinstances documentation)...

Revision history for this message
Martin Pool (mbp) wrote :

On 17 November 2011 09:08, Michael Hudson-Doyle
<email address hidden> wrote:
> On Wed, 16 Nov 2011 05:15:28 -0000, Martin Pool <email address hidden> wrote:
>> It might be cleaner to just leave it up to aws to decide if what you asked for is valid or not.  But, this is certainly welcome.
>
> Yeah, that would be possible, although having the possibilities
> documented is nice.  I wonder if there is some way of asking amazon what
> image types are currently supported (other than scraping the
> runinstances documentation)...

Not that I can see in a brief look.

--
Martin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/devscripts/ec2test/builtins.py'
2--- lib/devscripts/ec2test/builtins.py 2011-09-07 13:38:46 +0000
3+++ lib/devscripts/ec2test/builtins.py 2011-11-16 04:32:27 +0000
4@@ -334,6 +334,7 @@
5
6 takes_options = [
7 debug_option,
8+ instance_type_option,
9 Option('dry-run', help="Just print the equivalent ec2 test command."),
10 Option('print-commit', help="Print the full commit message."),
11 Option(
12
13=== modified file 'lib/devscripts/ec2test/instance.py'
14--- lib/devscripts/ec2test/instance.py 2011-11-13 21:23:00 +0000
15+++ lib/devscripts/ec2test/instance.py 2011-11-16 04:32:27 +0000
16@@ -25,7 +25,9 @@
17
18
19 DEFAULT_INSTANCE_TYPE = 'c1.xlarge'
20-AVAILABLE_INSTANCE_TYPES = ('m1.large', 'm1.xlarge', 'c1.xlarge')
21+AVAILABLE_INSTANCE_TYPES = (
22+ 'm1.large', 'm1.xlarge', 'm2.xlarge', 'm2.2xlarge', 'm2.4xlarge',
23+ 'c1.xlarge', 'cc1.4xlarge', 'cc1.8xlarge')
24
25
26 class AcceptAllPolicy: