Cloud Foundry CLI

SERVICES

List available offerings in the marketplace

cf marketplace
cf m

 
To view descriptions of individual plans of a given service
cf marketplace -s <SERVICE>

 
Note: 用這道指令來檢查, service是否被enable, True if FAILED / False if OK
 

 

SERVICES ADMIN

List service brokers

cf service-brokers

 

 
List service access settings

cf service-access

 
List service access settings - access for plans of a particular broker
cf service-access -b <BROKER>

 
List service access settings - access for service name of a particular service offering
cf service-access -e <SERVICE>

 

 
Enable access to a service or service plan for one or all orgs

cf enable-service-access <SERVICE>

 
Note: 用這道指令來enable SERVICE
 

 
Disable access to a service or service plan for one or all orgs

cf disable-service-access <SERVICE>

 
Note: 用這道指令來disable SERVICE
 

 


 

Note

現在有一個broker被啟用,名稱為 test-service

ubuntu@ossapi-20160219-102522:~$ cf service-access
Getting service access as admin...
broker: test-service
   service            plan     access   orgs
   broker-example-1   Plan A   all
   broker-example-1   Plan B   all

ubuntu@ossapi-20160219-102522:~$ cf service-access -b test-service
Getting service access for broker test-service as admin...
broker: test-service
   service            plan     access   orgs
   broker-example-1   Plan A   all
   broker-example-1   Plan B   all

ubuntu@ossapi-20160219-102522:~$ cf service-access -e broker-example-1
Getting service access for service broker-example-1 as admin...
broker: test-service
   service            plan     access   orgs
   broker-example-1   Plan A   all
   broker-example-1   Plan B   all
ubuntu@ossapi-20160219-102522:~$ cf m -s broker-example-1
Getting service plan information for service broker-example-1 as admin...
OK

service plan   description        free or paid
Plan A         Undefined Plan 1   free
Plan B         Undefined Plan 2   free
ubuntu@ossapi-20160219-102522:~$ cf services
Getting services in org test / space test as admin...
OK

No services found
ubuntu@ossapi-20160219-102522:~$ cf m
Getting services from marketplace in org test / space test as admin...
OK

service            plans            description
broker-example-1   Plan A, Plan B   An broker example with MySQL application

 

 
`cf disable-service-access broker-example-1`,之後

ubuntu@ossapi-20160219-102522:~$ cf disable-service-access broker-example-1
Disabling access to all plans of service broker-example-1 for all orgs as admin...
OK

 
ubuntu@ossapi-20160219-102522:~$ cf m -s broker-example-1
Getting service plan information for service broker-example-1 as admin...
FAILED
Service offering broker-example-1 not found
ubuntu@ossapi-20160219-102522:~$ echo $?
1
ubuntu@ossapi-20160219-102522:~$ cf m
Getting services from marketplace in org test / space test as admin...
OK

No service offerings found
ubuntu@ossapi-20160219-102522:~$ cf services
Getting services in org test / space test as admin...
OK

No services found
ubuntu@ossapi-20160219-102522:~$ cf service-access
Getting service access as admin...
broker: test-service
   service            plan     access   orgs
   broker-example-1   Plan A   none
   broker-example-1   Plan B   none

##
blue|##
##
blue|##
##
blue|##
##
blue|##
##blue|##

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License