Implement ModifyInstanceAttribute #44

Merged
merged 3 commits into from Mar 25, 2015

Conversation

Projects
None yet
2 participants
Member

axw commented Mar 24, 2015

This PR introduces the ModifyInstanceAttribute action, for a subset of possible attributes. We currently support altering SourceDestCheck and BlockDeviceMappings.

axw added some commits Mar 24, 2015

Implement ModifyInstanceAttribute
For now, the test server only handles
SourceDestCheck and BlockDeviceMappings.
+ if req.SourceDestCheck != nil {
+ params["SourceDestCheck.Value"] = fmt.Sprint(*req.SourceDestCheck)
+ }
+ if req.BlockDeviceMappings != nil {
@dimitern

dimitern Mar 24, 2015

Member

The way this is written implies you could set both SourceDestCheck and BlockDeviceMappings, but according to the AWS API docs you can only set one at a time.

@axw

axw Mar 25, 2015

Member

Yeah, I'm relying on the server to return an error. I don't think it's really worth adding code here to check as well.

ec2/volumes_test.go
+ // Nothing to do.
+ return
+ }
+ c.Assert(err, IsNil, Commentf("%v LEFT RUNNING!!!", id))
@dimitern

dimitern Mar 24, 2015

Member

I know this is probably a copy/paste thing, but the comment could be better when we're talking about deleting volumes.

@axw

axw Mar 25, 2015

Member

Reworded.

Member

dimitern commented Mar 24, 2015

Great work! LGTM with a couple of suggestions. Thanks for doing the SourceDestCheck flag and tests!

axw added a commit that referenced this pull request Mar 25, 2015

@axw axw merged commit 661b136 into go-amz:v3 Mar 25, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment