Service Broker API的文档:
https://docs.pivotal.io/pivotalcf/1-10/services/api.html#authentication
上述文档声称实现/ v2 / catalog以返回类似于以下内容的json:
{
"services": [{
"name": "fake-service",
"id": "acb56d7c-XXXX-XXXX-XXXX-feb140a59a66",
"description": "fake service",
"tags": ["no-sql", "relational"],
"requires": ["route_forwarding"],
"bindable": true,
"metadata": {
"provider": {
"name": "The name"
},
"listing": {
"imageUrl": "http://example.com/cat.gif",
"blurb": "Add a blurb here",
"longDescription": "A long time ago, in a galaxy far far away..."
},
"displayName": "The Fake Broker"
},
"dashboard_client": {
"id": "398e2f8e-XXXX-XXXX-XXXX-19a71ecbcf64",
"secret": "277cabb0-XXXX-XXXX-XXXX-7822c0a90e5d",
"redirect_uri": "http://localhost:1234"
},
"plan_updateable": true,
"plans": [{
"name": "fake-plan-1",
"id": "d3031751-XXXX-XXXX-XXXX-a42377d3320e",
"description": "Shared fake Server, 5tb persistent disk, 40 max concurrent connections",
"max_storage_tb": 5,
"metadata": {
"costs":[
{
"amount":{
"usd":99.0
},
"unit":"MONTHLY"
},
{
"amount":{
"usd":0.99
},
"unit":"1GB of messages over 20GB"
}
],
"bullets": [
"Shared fake server",
"5 TB storage",
"40 concurrent connections"
],
}
}, {
"name": "fake-plan-2",
"id": "0f4008b5-XXXX-XXXX-XXXX-dace631cd648",
"description": "Shared fake Server, 5tb persistent disk, 40 max concurrent connections. 100 async",
"max_storage_tb": 5,
"metadata": {
"costs":[
{
"amount":{
"usd":199.0
},
"unit":"MONTHLY"
},
{
"amount":{
"usd":0.99
},
"unit":"1GB of messages over 20GB"
}
],
"bullets": [
"40 concurrent connections"
]
}
}]
}]
}
我已在PCF应用程序中成功创建了此端点并运行了命令:
cf create-service-broker p-service myemail@whatever.com somethingSecure http://broker.url.com --space-scoped
Creating service broker p-service in org ourOrg / space dev as myemail@whatever.com...
OK
然后我可以在我们的组织中看到服务代理。但是,当我点击代理查看“计划”部分时,我在控制台中收到以下错误,页面没有指向。
Uncaught (in promise) TypeError: Cannot read property 'name' of undefined
at t.value (application.js:20)
at p._renderValidatedComponentWithoutOwnerOrContext (react.js:13)
at p._renderValidatedComponent (react.js:13)
at performInitialMount (react.js:13)
at p.mountComponent (react.js:13)
at Object.mountComponent (react.js:15)
at h.mountChildren (react.js:14)
at h._createInitialChildren (react.js:13)
at h.mountComponent (react.js:13)
at Object.mountComponent (react.js:15)
react.js:15 Uncaught (in promise) TypeError: Cannot read property 'getHostNode' of null
at Object.getHostNode (react.js:15)
at p.getHostNode (react.js:13)
at Object.getHostNode (react.js:15)
at Object.updateChildren (react.js:13)
at h._reconcilerUpdateChildren (react.js:14)
at h._updateChildren (react.js:14)
at h.updateChildren (react.js:14)
at h._updateDOMChildren (react.js:14)
at h.updateComponent (react.js:13)
at h.receiveComponent (react.js:13)
工作服务代理是/ v2 / catalog api端点的唯一要求是什么?或者我们是否需要从上面链接的文档中实现其他端点?任何帮助将不胜感激。
答案 0 :(得分:0)
这最终成为PCF版本问题。需要版本247但版本为246。