Fixing TestAccLBV1Pool_basic

This commit is contained in:
Joe Topjian 2015-05-09 22:43:40 +00:00
parent de74f3e586
commit 5535a9ba32
3 changed files with 9 additions and 3 deletions

View File

@ -51,6 +51,7 @@ func resourceLBPoolV1() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
"member": &schema.Schema{
Type: schema.TypeSet,
@ -178,10 +179,10 @@ func resourceLBPoolV1Update(d *schema.ResourceData, meta interface{}) error {
}
var updateOpts pools.UpdateOpts
if d.HasChange("name") {
// If either option changed, update both.
// Gophercloud complains if one is empty.
if d.HasChange("name") || d.HasChange("lb_method") {
updateOpts.Name = d.Get("name").(string)
}
if d.HasChange("lb_method") {
updateOpts.LBMethod = d.Get("lb_method").(string)
}

View File

@ -37,11 +37,13 @@ func resourceNetworkingNetworkV2() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
},
"tenant_id": &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
},
}

View File

@ -42,6 +42,7 @@ func resourceNetworkingSubnetV2() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
},
"allocation_pools": &schema.Schema{
Type: schema.TypeList,
@ -64,6 +65,7 @@ func resourceNetworkingSubnetV2() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: false,
Computed: true,
},
"ip_version": &schema.Schema{
Type: schema.TypeInt,
@ -74,6 +76,7 @@ func resourceNetworkingSubnetV2() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
ForceNew: false,
Computed: true,
},
"dns_nameservers": &schema.Schema{
Type: schema.TypeSet,