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

add loadbalancer_id to LbPoolV2Builder #1143

Merged
merged 1 commit into from
Feb 22, 2018
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
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,12 @@ public interface LbPoolV2Builder extends Buildable.Builder<LbPoolV2Builder, LbPo
* @return LbPoolV2Builder
*/
LbPoolV2Builder listenerId(String listenerId);

/**
* The load balancer this pool will be provisioned on. A tenant can only create pool on
* load balancers authorized by policy (e.g. her own load balancers).
* @param loadbalancerId
* @return LbPoolV2Builder
*/
LbPoolV2Builder loadbalancerId(String loadbalancerId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public class OctaviaLbPoolV2 implements LbPoolV2 {
@JsonProperty("listener_id")
private String listenerId;

@JsonProperty("loadbalancer_id")
private String loadbalancerId;

private List<ListItem> listeners;

private List<ListItem> members;
Expand Down Expand Up @@ -160,6 +163,7 @@ public String toString(){
.add("sessionPersistence", sessionPersistence)
.add("adminStateUp", adminStateUp)
.add("listenerId", listenerId)
.add("loadbalancerId", loadbalancerId)
.add("listeners", listeners)
.add("members", members)
.add("healthMonitorId", healthMonitorId)
Expand Down Expand Up @@ -260,6 +264,15 @@ public LbPoolV2Builder listenerId(String listenerId){
m.listenerId = listenerId;
return this;
}

/**
* {@inheritDoc}
*/
@Override
public LbPoolV2Builder loadbalancerId(String loadbalancerId){
m.loadbalancerId = loadbalancerId;
return this;
}
}

public static class LbPoolsV2 extends ListResult<OctaviaLbPoolV2> {
Expand Down