- 论坛徽章:
- 0
|
本帖最后由 mir620 于 2017-04-25 10:02 编辑
文件内容如下:
[
{
"id": "1a313",
"type": "project",
"links": {
"self": "http://192.168.1.88:8090/v1/projects/1a313",
"agents": "http://192.168.1.88:8090/v1/projects/1a313/agents",
"auditLogs": "http://192.168.1.88:8090/v1/projects/1a313/auditlogs",
"typeDocumentations": "http://192.168.1.88:8090/v1/projects/1a313/typedocumentations",
"virtualMachines": "http://192.168.1.88:8090/v1/projects/1a313/virtualmachines",
"hostStats": "http://192.168.1.88:8090/v1/projects/1a313/projects/1a313/hoststats"
},
"actions": {
"update": "http://192.168.1.88:8090/v1/projects/1a313/?action=update",
"deactivate": "http://192.168.1.88:8090/v1/projects/1a313/?action=deactivate",
"setmembers": "http://192.168.1.88:8090/v1/projects/1a313/?action=setmembers",
"delete": "http://192.168.1.88:8090/v1/projects/1a313/?action=delete"
},
"baseType": "account",
"name": "tools",
"state": "active",
"allowSystemRole": false,
"created": "2017-03-07T08:00:16Z",
"createdTS": 1488873616000,
"data": {
"fields": {
"virtualMachine": false,
"orchestration": "cattle",
"allowSystemRole": false,
"members": [
{
"externalId": "1a1",
"externalIdType": "rancher_id",
"role": "owner"
}
],
"servicesPortRange": {
"endPort": 65535,
"startPort": 49153
},
"createdStackIds": [
76,
77,
78,
79
]
}
},
"description": "机房内网外所需的工具软件,负责人:董朝军",
"kind": "project",
"kubernetes": false,
"members": [
{
"type": "projectMember",
"externalId": "1a1",
"externalIdType": "rancher_id",
"role": "owner"
}
],
"mesos": false,
"publicDns": false,
"removeTime": null,
"removed": null,
"servicesPortRange": {
"type": "servicesPortRange",
"endPort": 65535,
"startPort": 49153
},
"swarm": false,
"transitioning": "no",
"transitioningMessage": null,
"transitioningProgress": null,
"uuid": "657c0658-8ace-4abd-805b-e8b4da3f1c57",
"virtualMachine": false
},
{
"id": "1a1150",
"type": "project",
"links": {
"self": "http://192.168.1.88:8090/v1/projects/1a1150",
"agents": "http://192.168.1.88:8090/v1/projects/1a1150/agents"
"hostStats": "http://192.168.1.88:8090/v1/projects/1a1150/projects/1a1150/hoststats"
},
"actions": {
"update": "http://192.168.1.88:8090/v1/projects/1a1150/?action=update",
"deactivate": "http://192.168.1.88:8090/v1/projects/1a1150/?action=deactivate",
"setmembers": "http://192.168.1.88:8090/v1/projects/1a1150/?action=setmembers",
"delete": "http://192.168.1.88:8090/v1/projects/1a1150/?action=delete"
},
"baseType": "account",
"name": "build-test",
"state": "active",
"allowSystemRole": false,
"created": "2017-04-08T02:01:33Z",
"createdTS": 1491616893000,
"data": {
"fields": {
"virtualMachine": false,
"orchestration": "cattle",
"allowSystemRole": false,
"members": [
{
"externalId": "1a276",
"externalIdType": "rancher_id",
"role": "owner"
}
],
"servicesPortRange": {
"endPort": 65535,
"startPort": 49153
},
"createdStackIds": [
237,
238,
239,
240
],
"startedStackIds": [
237,
238,
239,
240
]
}
},
"description": "云平台版本验证",
"kind": "project",
"kubernetes": false,
"members": [
{
"type": "projectMember",
"externalId": "1a276",
"externalIdType": "rancher_id",
"role": "owner"
}
],
"mesos": false,
"publicDns": false,
"removeTime": null,
"removed": null,
"servicesPortRange": {
"type": "servicesPortRange",
"endPort": 65535,
"startPort": 49153
},
"swarm": false,
"transitioning": "no",
"transitioningMessage": null,
"transitioningProgress": null,
"uuid": "8ea508bc-b068-469e-ab23-cf1889f07a26",
"virtualMachine": false
}
]
目前上面的内容包含2个环境一个 test 和一个build-test环境, 现在已经知道 "uuid": "8ea508bc-b068-469e-ab23-cf1889f07a26", 如何可以取到到 "name": "build-test", 说白了就是如何根据“8ea508bc-b068-469e-ab23-cf1889f07a26”取到“build-test” 现网的环境可能更多 目前这个只列举2个环境的数据出来
|
|