File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -660,6 +660,7 @@ Wait for a service instance to start
660660Enable access to a service or service plan for one or all orgs
661661
662662- `service` : _Required._ The marketplace service name to enable
663+ - `broker` : _Optional._ Enable access to a service from a particular service broker. Required when service name is ambiguous
663664- `access_org` : _Optional._ Enable access for a specified organization
664665- `plan` : _Optional._ Enable access to a specified service plan
665666
@@ -669,6 +670,7 @@ Enable access to a service or service plan for one or all orgs
669670 params:
670671 command: enable-service-access
671672 service: some-service
673+ broker: some-service-broker
672674 access_org: myorg
673675 plan: simple
674676` ` `
Original file line number Diff line number Diff line change @@ -91,15 +91,18 @@ it_can_enable_service_access() {
9191 local org=${1:? org null or not set}
9292 local space=${2:? space null or not set}
9393 local service=${3:? service null or not set}
94- local plan=${4:- }
95- local access_org=${5:- }
94+ local broker=${4:- }
95+ local plan=${5:- }
96+ local access_org=${6:- }
9697
9798 local params=$( jq -n \
9899 --arg service " $service " \
100+ --arg broker " $broker " \
99101 --arg plan " $plan " \
100102 --arg access_org " $access_org " \
101103 ' {
102104 command: "enable-service-access",
105+ broker: $broker,
103106 service: $service,
104107 plan: $plan,
105108 access_org: $access_org
Original file line number Diff line number Diff line change 11
22service_broker=$( get_option ' .service_broker' )
33service=$( get_option ' .service' )
4+ broker=$( get_option ' .broker' )
45plan=$( get_option ' .plan' )
56access_org=$( get_option ' .access_org' )
67
@@ -9,4 +10,4 @@ logger::info "Executing $(logger::highlight "$command"): $service"
910# backwards compatibility for deprecated 'service_broker' param (https://github.com/nulldriver/cf-cli-resource/issues/21)
1011service=${service:- $service_broker }
1112
12- cf::enable_service_access " $service " " $plan " " $access_org "
13+ cf::enable_service_access " $service " " $broker " " $ plan" " $access_org "
Original file line number Diff line number Diff line change @@ -617,10 +617,12 @@ function cf::create_service_broker() {
617617
618618function cf::enable_service_access() {
619619 local service=${1:? service null or not set}
620- local plan=${2:- }
621- local access_org=${3:- }
620+ local broker=${2:- }
621+ local plan=${3:- }
622+ local access_org=${4:- }
622623
623624 local args=(" $service " )
625+ [ -n " $broker " ] && args+=(-b " $broker " )
624626 [ -n " $plan " ] && args+=(-p " $plan " )
625627 [ -n " $access_org " ] && args+=(-o " $access_org " )
626628
You can’t perform that action at this time.
0 commit comments