【问题标题】:Can't access 'plans' section when creating service broker in Pivotal Cloud Foundry在 Pivotal Cloud Foundry 中创建服务代理时无法访问“计划”部分
【发布时间】:2017-06-02 15:18:32
【问题描述】:

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 端点吗?或者我们是否需要从上面链接的文档中实现其他端点?任何帮助将不胜感激。

【问题讨论】:

    标签: java cloud-foundry


    【解决方案1】:

    这最终成为 PCF 版本问题。需要 247 版,但有 246 版。

    【讨论】:

    • 我在 PCF Dev 0.26.0 (CF 1.10.0) 上也看到了同样的问题。你介意解释一下你是如何解决这个问题的吗?版本号246、247不是很清楚。
    • 我可以使用 CLI 解决这个问题。这可能是 PCF UI 中的问题。
    • 我的版本控制可能不正确 - 管理员告诉我我们在“二点四十六”。他本来可以说 2.46。
    猜你喜欢
    • 2016-10-05
    • 2021-08-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-25
    • 2018-02-14
    • 1970-01-01
    • 2017-09-26
    相关资源
    最近更新 更多