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, Type: schema.TypeString,
Optional: true, Optional: true,
ForceNew: true, ForceNew: true,
Computed: true,
}, },
"member": &schema.Schema{ "member": &schema.Schema{
Type: schema.TypeSet, Type: schema.TypeSet,
@ -178,10 +179,10 @@ func resourceLBPoolV1Update(d *schema.ResourceData, meta interface{}) error {
} }
var updateOpts pools.UpdateOpts 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) updateOpts.Name = d.Get("name").(string)
}
if d.HasChange("lb_method") {
updateOpts.LBMethod = d.Get("lb_method").(string) updateOpts.LBMethod = d.Get("lb_method").(string)
} }

View File

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

View File

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