Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/openstack: Add lb_provider argument to lb_pool_v1 resource #6919

Merged
merged 2 commits into from
Jun 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 78 additions & 78 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions builtin/providers/openstack/resource_openstack_lb_pool_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func resourceLBPoolV1() *schema.Resource {
Required: true,
ForceNew: false,
},
"lb_provider": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},
"tenant_id": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -116,6 +122,7 @@ func resourceLBPoolV1Create(d *schema.ResourceData, meta interface{}) error {
SubnetID: d.Get("subnet_id").(string),
LBMethod: d.Get("lb_method").(string),
TenantID: d.Get("tenant_id").(string),
Provider: d.Get("lb_provider").(string),
}

log.Printf("[DEBUG] Create Options: %#v", createOpts)
Expand Down Expand Up @@ -182,6 +189,7 @@ func resourceLBPoolV1Read(d *schema.ResourceData, meta interface{}) error {
d.Set("protocol", p.Protocol)
d.Set("subnet_id", p.SubnetID)
d.Set("lb_method", p.LBMethod)
d.Set("lb_provider", p.Provider)
d.Set("tenant_id", p.TenantID)
d.Set("monitor_ids", p.MonitorIDs)
d.Set("member_ids", p.MemberIDs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestAccLBV1Pool_basic(t *testing.T) {
Config: testAccLBV1Pool_basic,
Check: resource.ComposeTestCheckFunc(
testAccCheckLBV1PoolExists(t, "openstack_lb_pool_v1.pool_1", &pool),
resource.TestCheckResourceAttr("openstack_lb_pool_v1.pool_1", "lb_provider", "haproxy"),
),
},
resource.TestStep{
Expand Down Expand Up @@ -144,6 +145,7 @@ var testAccLBV1Pool_basic = fmt.Sprintf(`
protocol = "HTTP"
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
lb_method = "ROUND_ROBIN"
lb_provider = "haproxy"
}`,
OS_REGION_NAME, OS_REGION_NAME, OS_REGION_NAME)

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading