我正在使用 python cloud Foundry 客户端创建一个 Message Hub 服务实例:
$ pip install --user --quiet protobuf
$ pip install --user --quiet cloudfoundry-client
from cloudfoundry_client.client import CloudFoundryClient
target_endpoint = 'https://api.ng.bluemix.net'
client = CloudFoundryClient(target_endpoint, skip_verification=False)
client.init_with_user_credentials(
ibm_id,
ibm_id_password
)
mh_service = client.service_instances.create(
space_guid,
'my_mh2',
mh_plan_id
)
该服务已创建,但是当我使用管理控制台查看凭据时,它们是空的:
我在 python 客户端的集成测试代码中看到可以创建参数和标签:
client.service_instances.create(
'space_guid',
'name',
'plan_id',
parameters=dict(the_service_broker="wants this object"),
tags=['example']
)
因此,我猜我需要传递一些额外的东西来告诉 bluemix 为我创建一些默认凭据?