From dede0343675abab8741fa28455dccc921cd21501 Mon Sep 17 00:00:00 2001 From: TangBin Date: Mon, 15 Oct 2018 18:36:32 +0800 Subject: [PATCH] bugfix --- pkg/util/aws/eip.go | 2 +- pkg/util/aws/region.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/util/aws/eip.go b/pkg/util/aws/eip.go index 5920d48da5..6e1eee3b14 100644 --- a/pkg/util/aws/eip.go +++ b/pkg/util/aws/eip.go @@ -130,7 +130,7 @@ func (region *SRegion) AllocateEIP(bwMbps int) (*SEipAddress, error) { return nil, nil } -func (self *SRegion) CreateEIP(name string, bwMbps int) (cloudprovider.ICloudEIP, error) { +func (self *SRegion) CreateEIP(name string, bwMbps int, chargeType string) (cloudprovider.ICloudEIP, error) { eip, err := self.ec2Client.AllocateAddress(&ec2.AllocateAddressInput{}) if err != nil { log.Errorf("AllocateEipAddress fail %s", err) diff --git a/pkg/util/aws/region.go b/pkg/util/aws/region.go index d7c93548de..611e1b49eb 100644 --- a/pkg/util/aws/region.go +++ b/pkg/util/aws/region.go @@ -73,9 +73,14 @@ func (self *SRegion) fetchIVpcs() error { self.ivpcs = make([]cloudprovider.ICloudVpc, 0) for _, vpc := range vpcs.Vpcs { + tags := make(map[string]string, 0) + for _, tag := range vpc.Tags { + tags[*tag.Key] = *tag.Value + } + self.ivpcs = append(self.ivpcs, &SVpc{region: self, CidrBlock: *vpc.CidrBlock, - Tags: vpc.Tags, + Tags: tags, IsDefault: *vpc.IsDefault, RegionId: self.RegionId, Status: *vpc.State,