Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Commits on Dec 23, 2014
Dimiter Naydenov
Upgraded AWS API version to 2014-10-01 (latest); Fixed and improved l…
…ive tests; Improved ec2test server responses
Commits on Jan 06, 2015
Dimiter Naydenov
Reverted IPPerm.SourceIP modifications and fixed ec2test server's Des…
…cribeSecurityGroups response XML to serialized multiple source IPs properly
Commits on Jan 09, 2015
Dimiter Naydenov
Merge pull request #3 from dimitern/v2-dev
Upgraded AWS API version to 2014-10-01 (latest)
Commits on Jan 11, 2015
Dimiter Naydenov
Merge pull request #13 from dimitern/v2
Renaming v2-dev to v2, adding docs and travis CI config from v1
Commits on Jan 12, 2015
Dimiter Naydenov
Merge pull request #14 from dimitern/v2-fix-flaky-test
Fixed TestIPPerms failing more frequently using go 1.4
Commits on Jan 13, 2015
axw
ec2, ec2/ec2test: add InstanceBlockDeviceMapping
This PR introduces the InstanceBlockDeviceMapping data type
and adds the BlockDeviceMappings field to the Instance data
type, enabling users to query instances' block device mappings.

The test server is updated to create volumes for each non-virtual
block device mapping. The volumes are not yet backed by any model,
so attempts to query those resources will fail that is implemented.
axw
Merge pull request #15 from axw/instanceblockdevicemapping
ec2, ec2/ec2test: add InstanceBlockDeviceMapping
Commits on Jan 14, 2015
Dimiter Naydenov
Commits on Jan 19, 2015
Commits on Jan 20, 2015
Dimiter Naydenov
Merge pull request #20 from dimitern/v2-ec2test-describenetworkinterf…
…aces-filtering

Improved NetworkInterfaces() filtering support for ec2test
Commits on Jan 28, 2015
ec2: add EBSOptimized option to RunInstances
Allowing users to specify this option when running new instances.
Dimiter Naydenov
Merge pull request #23 from fsouza/ebs-optimized-run-instances
ec2: add EBSOptimized option to RunInstances
Commits on Feb 22, 2015
Dimiter Naydenov
Merge pull request #28 from dimitern/sync-to-v1
Sync relevant changes from v1
Showing with 1,444 additions and 465 deletions.
  1. +20 −0 .travis.yml
  2. +24 −0 AUTHORS.md
  3. +100 −0 CONTRIBUTING.md
  4. +36 −4 README.md
  5. +1 −1 aws/attempt_test.go
  6. +1 −1 aws/aws_test.go
  7. +78 −0 ec2/blockdevicemappings_test.go
  8. +70 −64 ec2/ec2.go
  9. +12 −10 ec2/ec2_test.go
  10. +12 −7 ec2/ec2i_test.go
  11. +154 −104 ec2/ec2t_test.go
  12. +375 −91 ec2/ec2test/server.go
  13. +5 −2 ec2/export_test.go
  14. +5 −5 ec2/networkinterfaces.go
  15. +273 −54 ec2/networkinterfaces_test.go
  16. +2 −2 ec2/privateips.go
  17. +2 −2 ec2/privateips_test.go
  18. +69 −50 ec2/responses_test.go
  19. +25 −3 ec2/subnets.go
  20. +35 −10 ec2/subnets_test.go
  21. +3 −3 ec2/vpc.go
  22. +2 −2 ec2/vpc_test.go
  23. +1 −1 exp/mturk/export_test.go
  24. +1 −1 exp/mturk/mturk.go
  25. +3 −3 exp/mturk/mturk_test.go
  26. +1 −1 exp/mturk/sign.go
  27. +2 −2 exp/mturk/sign_test.go
  28. +1 −1 exp/sdb/export_test.go
  29. +1 −1 exp/sdb/sdb.go
  30. +3 −3 exp/sdb/sdb_test.go
  31. +1 −1 exp/sdb/sign.go
  32. +2 −2 exp/sdb/sign_test.go
  33. +1 −1 exp/sns/sign.go
  34. +1 −1 exp/sns/sns.go
  35. +3 −3 exp/sns/sns_test.go
  36. +6 −1 iam/iam.go
  37. +8 −3 iam/iam_test.go
  38. +8 −3 iam/iami_test.go
  39. +8 −3 iam/iamt_test.go
  40. +6 −1 iam/iamtest/server.go
  41. +5 −0 iam/responses_test.go
  42. +6 −1 iam/sign.go
  43. +6 −1 s3/export_test.go
  44. +5 −0 s3/multi.go
  45. +6 −1 s3/multi_test.go
  46. +5 −0 s3/responses_test.go
  47. +1 −1 s3/s3.go
  48. +8 −3 s3/s3_test.go
  49. +8 −3 s3/s3i_test.go
  50. +8 −3 s3/s3t_test.go
  51. +1 −1 s3/s3test/server.go
  52. +6 −1 s3/sign.go
  53. +7 −2 s3/sign_test.go
  54. +5 −0 testutil/http.go
  55. +6 −1 testutil/suite.go
View
@@ -0,0 +1,20 @@
+sudo: false
+language: go
+
+go:
+ - 1.2
+ - 1.4
+
+install:
+ - go get gopkg.in/check.v1
+
+before_script:
+ - export DEFAULT_TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR
+ - export TRAVIS_BUILD_DIR=$HOME/gopath/src/gopkg.in/amz.v2
+ - mkdir -p $TRAVIS_BUILD_DIR
+ - mv -vfT $DEFAULT_TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR
+
+script:
+ - go build ./...
+ - go test -v ./...
+ - FIXED=$(go fmt ./... | wc -l); if [ $FIXED -gt 0 ]; then echo "gofmt - $FIXED file(s) not formatted correctly, please run gofmt to fix this." && exit 1; fi
View
@@ -0,0 +1,24 @@
+goamz Authors
+=============
+
+This file contains a list of people who contributed relevant code to the project.
+
+Anyone with knowledge of Amazon Web Services API who wants to get
+involved in the project maintenance, code reviews, issues triage, and
+helping goamz users and community members in general, please consider
+contacting one of the project's [maintainers](https://github.com/orgs/go-amz/people) and request to become one. Check [CONTRIBUTING.md](CONTRIBUTING.md) for details.
+
+Please, keep the list sorted.
+
+Full name | E-mail | GitHub account
+----------|--------|---------------
+Andrew Wilkins | andrew.wilkins {at} canonical.com | [@axw](http://github.com/axw)
+Dave Cheney | dave.cheney {at} canonical.com | [@davecheney](http://github.com/davecheney)
+Dimiter Naydenov | dimiter.naydenov {at} canonical.com | [@dimitern](http://github.com/dimitern)
+Francisco Souza | f {at} souza.cc | [@fsouza](https://github.com/fsouza)
+Gustavo Niemeyer | gustavo.niemeyer {at} canonical.com | [@niemeyer](http://github.com/niemeyer) (project founder)
+Ian Booth | ian.booth {at} canonical.com | [@wallyworld](http://github.com/wallyworld)
+Katherine Cox-Buday | katherine.cox-buday {at} canonical.com | [@katco-](http://github.com/katco-)
+Martin Packman | martin.packman {at} canonical.com | [@bz2](http://github.com/bz2)
+Nathan Youngman | git {at} nathany.com | [@nathany](https://github.com/nathany)
+Roger Peppe | roger.peppe {at} canonical.com | [@rogpeppe](http://github.com/rogpeppe)
View
@@ -0,0 +1,100 @@
+Contributing to goamz
+=====================
+
+We encourage everyone who is familiar with the [Amazon Web Services
+API](http://aws.amazon.com/documentation/) and is willing to support
+and improve the project to become a contributor. Current list of
+official maintainers can be found on the [go-amz People](https://github.com/orgs/go-amz/people) list. Current and past contributors list is in the [AUTHORS.md](AUTHORS.md) file.
+
+This file contains instructions and guidelines for contributors.
+
+Code of conduct
+---------------
+
+We are committed to providing a friendly, safe and welcoming environment
+for all users and community members. Please, review the [Ubuntu Code of Conduct](https://launchpad.net/codeofconduct/1.1),
+which covers the most important aspects we expect from contributors:
+
+ * Be considerate - treat others nicely, everybody can provide valuable contributions.
+ * Be respectful of others, even if you don't agree with them. Keep an open mind.
+ * Be collaborative - this is essential in an open source community.
+ * When we disagree, we consult others - it's important to solve disagreements constructively.
+ * When unsure, ask for help.
+ * Step down considerately - if you need to leave the project, minimize disruption.
+
+Ways to contribute
+------------------
+
+There are several ways to contribute to the project:
+
+ * Join the [goamz Google Group](https://groups.google.com/forum/#!forum/goamz) to ask questions and get help.
+ * Report [issues](https://github.com/go-amz/amz/issues/new) you might have.
+ * Please, make sure there is no existing [known issue](https://github.com/go-amz/amz/issues) when reporting a new one.
+ * Propose a patch or a bug fix by opening a [pull request](https://help.github.com/articles/creating-a-pull-request/). Check GitHub help on [how to collaborate](https://help.github.com/categories/collaborating/).
+ * Give feedback for [known issues](https://github.com/go-amz/amz/issues/) or proposed [pull requests](https://github.com/go-amz/amz/pulls).
+
+For some of those things you will need a [GitHub account](https://github.com/signup/free), if you don't have one.
+
+Contributing a patch
+--------------------
+
+Found a bug or want to suggest an improvement?
+Great! Here are the steps anyone can follow to propose a bug fix or patch.
+
+ * [Fork](https://help.github.com/articles/fork-a-repo/) the go-amz/amz repository.
+ * If you think you found a bug, please check the existing [issues](https://github.com/go-amz/amz/issues) to see if it's a known problem.
+ * Otherwise, [open a new issue](https://github.com/go-amz/amz/issues/new) for it.
+ * Clone your forked repository locally:
+```
+$ git clone https://github.com/<your-github-username>/amz
+```
+ * For the unit tests, you will need [gocheck](https://github.com/go-check/check):
+```
+$ go get gopkg.in/check.v1
+```
+ * Create a feature branch for your contribution. Make your changes there.
+ * It's recommended to try keeping your changes as small as possible.
+ * Split bigger changes in several pull request to make the code review easier.
+ * Be sure to write tests for your code changes and run them before proposing:
+```
+$ go test -gocheck.v
+```
+ * Push your feature branch to your fork.
+ * Open a pull request with a description of your change.
+ * A maintainer should notice your pull request and do a code review. You can also ask a [maintainer](https://github.com/orgs/go-amz/people) for review.
+ * Reply to comments, fix issues, push your changes.
+ * Depending on the size of the patch, this process can be repeated a few times.
+ * Once you get an approval and the CI tests pass, ask a maintainer to merge your patch.
+
+Becoming an official maintainer
+-------------------------------
+
+Thanks for considering becoming a maintainer of goamz! It's not
+required to be a maintainer to contribute, but if you find yourself
+frequently proposing patches and can dedicate some of your time to
+help, please consider following the following procedure.
+
+ * You need a [GitHub account](https://github.com/signup/free) if you don't have one.
+ * Review and sign the Canonical [Contributor License Agreement](http://www.ubuntu.com/legal/contributors/).
+ * For any questions about the CLA, you might find the [CLA FAQ](http://www.ubuntu.com/legal/contributors/licence-agreement-faq) page useful.
+ * Request to become a maintainer by contacting the [existing maintainers](https://github.com/orgs/go-amz/people).
+ * You're welcome to add your name to the [AUTHORS.md](AUTHORS.md) list once approved.
+
+General guidelines
+------------------
+
+The following list is not exhaustive or in any particular order. It
+providers things to keep in mind when contributing to goamz. Be
+reasonable and considerate and please ask for help, if something is
+not clear.
+
+ * Commit early, commit often.
+ * Use `git rebase` before proposing your changes to squash minor commits. Let's keep the commit log cleaner.
+ * **Do not** rebase commits you already pushed, even when in your own fork. Others might depend on them.
+ * Write new tests and update existing ones when changing the code. All changes should have tests, when possible.
+ * Use `go fmt` to format your code before pushing.
+ * Document exported types, functions, constants, variables, etc.
+ * See the excellent [Effective Go](http://golang.org/doc/effective_go.html) style guide, which we use.
+ * When reporting issues, provide the necessary information to reproduce the issue.
+
+Thanks for your interest in goamz!
View
@@ -3,20 +3,25 @@ goamz
Go package to interact with Amazon Web Services
+[![Build Status](https://travis-ci.org/go-amz/amz.svg?branch=v2)](https://travis-ci.org/go-amz/amz)
+[![GoDoc](https://godoc.org/gopkg.in/amz.v2?status.png)](http://godoc.org/gopkg.in/amz.v2)
+
+**NOTE**: This is a stable branch, which is NOT compatible with the original goamz source from [Launchpad](https://launchpad.net/goamz/trunk). If you want the same features as in the original source, except for the changed import paths, use the `v1` branch.
+
Instructions
------------
Install the package with:
- go get gopkg.in/amz.v1/...
+ go get gopkg.in/amz.v2/...
Import it with:
- import "gopkg.in/amz.v1/<package>"
+ import "gopkg.in/amz.v2/<package>"
Example:
- import "gopkg.in/amz.v1/ec2"
+ import "gopkg.in/amz.v2/ec2"
and use _ec2_ as the package name inside the code.
The same applies to the other sub-packages: _aws_, _s3_, etc.
@@ -27,4 +32,31 @@ For more details, visit the project page:
and the API documentation:
-* https://gopkg.in/amz.v1
+* https://gopkg.in/amz.v2
+
+Users Group
+-----------
+
+In addition to contacting directly one of the [maintainers](https://github.com/orgs/go-amz/people), users are encouraged to discuss goamz topics on the project's [Google Group](https://groups.google.com/forum/#!forum/goamz).
+
+Issues
+------
+
+Please report bugs by opening an [issue](https://github.com/go-amz/amz/issues).
+
+Contributing
+------------
+
+Contributors are most welcome!
+Please have a look at [CONTRIBUTING.md](CONTRIBUTING.md) for details.
+
+Authors
+-------
+
+List of people who made relevant contributions to goamz can be found in [AUTHORS.md](AUTHORS.md).
+
+License
+-------
+
+goamz is licensed under LGPLv3, but includes an exception that allows
+linking code statically. See the [LICENSE](LICENSE) for details.
View
@@ -5,7 +5,7 @@ import (
. "gopkg.in/check.v1"
- "gopkg.in/amz.v1/aws"
+ "gopkg.in/amz.v2/aws"
)
func (S) TestAttemptTiming(c *C) {
View
@@ -7,7 +7,7 @@ import (
. "gopkg.in/check.v1"
- "gopkg.in/amz.v1/aws"
+ "gopkg.in/amz.v2/aws"
)
func Test(t *testing.T) {
@@ -0,0 +1,78 @@
+//
+// goamz - Go packages to interact with the Amazon Web Services.
+//
+// https://wiki.ubuntu.com/goamz
+//
+// Copyright (c) 2015 Canonical Ltd.
+//
+
+package ec2_test
+
+import (
+ "time"
+
+ . "gopkg.in/check.v1"
+
+ "gopkg.in/amz.v2/aws"
+ "gopkg.in/amz.v2/ec2"
+)
+
+// Block device mapping tests run against either a local test server or
+// live on EC2.
+
+func (s *ServerTests) TestBlockDeviceMappings(c *C) {
+ blockDeviceMappings := []ec2.BlockDeviceMapping{{
+ DeviceName: "/dev/sda1",
+ VolumeSize: 8,
+ DeleteOnTermination: true,
+ }, {
+ VirtualName: "ephemeral0",
+ DeviceName: "/dev/sdb",
+ }}
+
+ instList, err := s.ec2.RunInstances(&ec2.RunInstances{
+ ImageId: imageId,
+ InstanceType: "t1.micro",
+ BlockDeviceMappings: blockDeviceMappings,
+ })
+ c.Assert(err, IsNil)
+ inst := instList.Instances[0]
+ c.Assert(inst, NotNil)
+ instId := inst.InstanceId
+ defer terminateInstances(c, s.ec2, []string{instId})
+
+ // Block device mappings are not (typically?) included in the initial
+ // RunInstanceResp, so we must periodically DescribeInstances.
+ testAttempt := aws.AttemptStrategy{
+ Total: 5 * time.Minute,
+ Delay: 5 * time.Second,
+ }
+ var list *ec2.InstancesResp
+ done := false
+ for a := testAttempt.Start(); !done && a.Next(); {
+ c.Logf("waiting for block device mappings to be processed")
+ list, err = s.ec2.Instances([]string{instId}, nil)
+ if err != nil {
+ c.Fatalf("Instances returned: %v", err)
+ return
+ }
+ inst = list.Reservations[0].Instances[0]
+ if len(inst.BlockDeviceMappings) == 0 {
+ c.Logf("BlockDeviceMappings is empty, retrying")
+ continue
+ }
+ done = true
+ }
+ if !done {
+ c.Fatalf("timeout while waiting for block device mappings")
+ }
+
+ // There should be one item for /dev/sda1; ephemeral devices
+ // should not show up.
+ c.Assert(inst.BlockDeviceMappings, HasLen, 1)
+ c.Assert(inst.BlockDeviceMappings[0].DeviceName, Equals, "/dev/sda1")
+ c.Assert(inst.BlockDeviceMappings[0].DeleteOnTermination, Equals, true)
+ c.Assert(inst.BlockDeviceMappings[0].AttachTime, Not(Equals), "")
+ c.Assert(inst.BlockDeviceMappings[0].Status, Not(Equals), "")
+ c.Assert(inst.BlockDeviceMappings[0].VolumeId, Not(Equals), "")
+}
Oops, something went wrong.

No commit comments for this range