Skip to content

Commit

Permalink
Merge branch 'master' into add-test-tag
Browse files Browse the repository at this point in the history
  • Loading branch information
runzexia authored Dec 22, 2017
2 parents 4bbe36e + a58b1e4 commit 9201bc3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion qingcloud/resource_qingcloud_eip_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ func getEIPResourceMap(data *qc.EIP) map[string]interface{} {
return a
}
func waitEipLease(d *schema.ResourceData, meta interface{}) error {
if !d.IsNewResource() {
return nil
}
clt := meta.(*QingCloudClient).eip
input := new(qc.DescribeEIPsInput)
input.EIPs = []*string{qc.String(d.Id())}
Expand All @@ -104,7 +107,7 @@ func waitEipLease(d *schema.ResourceData, meta interface{}) error {
return err
}
//wait for lease info
WaitForLease(output.EIPSet[0].CreateTime)
WaitForLease(output.EIPSet[0].StatusTime)
return nil
}

Expand Down
5 changes: 4 additions & 1 deletion qingcloud/resource_qingcloud_instance_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,9 @@ func updateInstanceVolume(d *schema.ResourceData, meta interface{}) error {
}

func waitInstanceLease(d *schema.ResourceData, meta interface{}) error {
if !d.IsNewResource() {
return nil
}
clt := meta.(*QingCloudClient).instance
input := new(qc.DescribeInstancesInput)
input.Instances = []*string{qc.String(d.Id())}
Expand All @@ -410,7 +413,7 @@ func waitInstanceLease(d *schema.ResourceData, meta interface{}) error {
return err
}
//wait for lease info
WaitForLease(output.InstanceSet[0].CreateTime)
WaitForLease(output.InstanceSet[0].StatusTime)
return nil
}

Expand Down
3 changes: 3 additions & 0 deletions qingcloud/resource_qingcloud_loadbalancer_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ func isLoadBalancerDeleted(lbSet []*qc.LoadBalancer) bool {
}

func waitLoadBalancerLease(d *schema.ResourceData, meta interface{}) error {
if !d.IsNewResource() {
return nil
}
clt := meta.(*QingCloudClient).loadbalancer
input := new(qc.DescribeLoadBalancersInput)
input.LoadBalancers = []*string{qc.String(d.Id())}
Expand Down
5 changes: 4 additions & 1 deletion qingcloud/resource_qingcloud_volume_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func changeVolumeSize(d *schema.ResourceData, meta interface{}) error {
}

func waitVolumeLease(d *schema.ResourceData, meta interface{}) error {
if !d.IsNewResource() {
return nil
}
clt := meta.(*QingCloudClient).volume
input := new(qc.DescribeVolumesInput)
input.Volumes = []*string{qc.String(d.Id())}
Expand All @@ -97,6 +100,6 @@ func waitVolumeLease(d *schema.ResourceData, meta interface{}) error {
return err
}
//wait for lease info
WaitForLease(output.VolumeSet[0].CreateTime)
WaitForLease(output.VolumeSet[0].StatusTime)
return nil
}
3 changes: 3 additions & 0 deletions qingcloud/resource_qingcloud_vpc_help.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func applyRouterUpdate(routerId *string, meta interface{}) error {
}

func waitRouterLease(d *schema.ResourceData, meta interface{}) error {
if !d.IsNewResource() {
return nil
}
clt := meta.(*QingCloudClient).router
input := new(qc.DescribeRoutersInput)
input.Routers = []*string{qc.String(d.Id())}
Expand Down

0 comments on commit 9201bc3

Please sign in to comment.