Exemplo n.º 1
0
func (s *AmazonServerSuite) SetUpSuite(c *C) {
	if !*amazon {
		c.Skip("AmazonServerSuite tests not enabled")
	}
	s.srv.SetUp(c)
	s.ServerTests.elb = elb.New(s.srv.auth, aws.USEast)
}
Exemplo n.º 2
0
func (s *AmazonClientSuite) SetUpSuite(c *gocheck.C) {
	if !*amazon {
		c.Skip("AmazonClientSuite tests not enabled")
	}
	s.srv.SetUp(c)
	s.elb = elb.New(s.srv.auth, aws.USEast)
	s.ec2 = ec2.New(s.srv.auth, aws.USEast)
}
Exemplo n.º 3
0
func NewAnnouncer() (sk *Announcer, err error) {
	sk = &Announcer{}
	b, err := aws.GetMetaData("placement/availability-zone")
	if err != nil {
		return nil, err
	}
	sk.RegionId = string(b[:len(b)-1])
	b, err = aws.GetMetaData("instance-id")
	if err != nil {
		return nil, err
	}
	sk.InstanceId = string(b)

	if sk.RegionId == "" {
		sk.RegionId = aws.USEast.Name
	}
	auth, err := aws.GetAuth("", "", "", time.Time{})
	if err != nil {
		return nil, err
	}
	sk.elb = elb.New(auth, aws.Regions[sk.RegionId])
	return
}
Exemplo n.º 4
0
func (s *LocalServerSuite) SetUpSuite(c *C) {
	s.srv.SetUp(c)
	s.ServerTests.elb = elb.New(s.srv.auth, s.srv.region)
	s.clientTests.elb = elb.New(s.srv.auth, s.srv.region)
}
Exemplo n.º 5
0
func (s *S) SetUpSuite(c *C) {
	s.HTTPSuite.SetUpSuite(c)
	auth := aws.Auth{AccessKey: "abc", SecretKey: "123"}
	s.elb = elb.New(auth, aws.Region{ELBEndpoint: testServer.URL})
}
Exemplo n.º 6
0
func (s *S) SetUpSuite(c *C) {
	s.HTTPSuite.SetUpSuite(c)
	auth := aws.NewAuth("abc", "123", "", time.Time{})
	s.elb = elb.New(auth, aws.Region{ELBEndpoint: testServer.URL})
}