-
Notifications
You must be signed in to change notification settings - Fork 344
API
Zheng Ya edited this page Sep 22, 2022
·
3 revisions
资源 | 操作 | HTTP Method |
---|---|---|
云平台 | 获取全部 | GET |
创建单个云平台 | GET | |
修改单个云平台 | PATCH | |
删除单个云平台 | DELETE |
-
URL:
/v2/domains/
-
Query string
字段 类型 支持多个 lcuuid string 否 name string 否 -
Response:
{ "OPT_STATUS": "SUCCESS", "DESCRIPTION": "", "DATA": [ { "ID": "XXXX", "NAME": "11111", "DISPLAY_NAME": "XXXX", "CLUSTER_ID": "XXXX", "TYPE": 11, "ENABLED": 1, "STATE": 4, "ERROR_MSG": "", "CONTROLLER_IP": "XXXX", "CONTROLLER_NAME": "XXXX", "VTAP_NAME": "", "VTAP_CTRL_IP": "", "VTAP_CTRL_MAC": "", "ICON_ID": 14, "K8S_ENABLED": 0, "CONFIG": { "controller_ip": "XXXX", "pod_net_ipv4_cidr_max_mask": 16, "pod_net_ipv6_cidr_max_mask": 64, "port_name_regex": "^(cni|flannel|cali|vxlan.calico|tunl|en[ospx])", "region_uuid": "XXXX", "vtap_id": "" }, "AZ_COUNT": 1, "REGION_COUNT": 1, "POD_CLUSTERS": null, "CREATED_AT": "2022-09-22 10:46:01", "SYNCED_AT": "", "LCUUID": "XXXX" } ] }
-
URL:
/v1/domains/
-
Body:
字段 类型 说明 TYPE int 类型,11:Kubernetes NAME string 名称 ICON_ID string 图例,14:Kubernetes CONFIG dict 见示例 -
Kubernetes:
-
Request:
{ "TYPE": 11, "NAME": "k8s", "ICON_ID": 14, "CONFIG": { "region_uuid": "XXXX", // 区域lcuuid "controller_ip": "XXXX", // 控制器IP "vtap_id": "", "pod_net_ipv4_cidr_max_mask": 16, "pod_net_ipv6_cidr_max_mask": 64, "port_name_regex": "^(cni|flannel|cali|vxlan.calico|tunl|en[ospx])" } }
-
Response:
{ "OPT_STATUS": "SUCCESS", "DESCRIPTION": "", "DATA": { "ID": "XXXX", "NAME": "k8s", "DISPLAY_NAME": "XXXX", "CLUSTER_ID": "XXXX", "TYPE": 11, "ENABLED": 1, "STATE": 1, "ERROR_MSG": "", "CONTROLLER_IP": "XXXX", "CONTROLLER_NAME": "XXXX", "VTAP_NAME": "", "VTAP_CTRL_IP": "", "VTAP_CTRL_MAC": "", "ICON_ID": 14, "K8S_ENABLED": 0, "CONFIG": { "controller_ip": "XXXX", "pod_net_ipv4_cidr_max_mask": 16, "pod_net_ipv6_cidr_max_mask": 64, "port_name_regex": "^(cni|flannel|cali|vxlan.calico|tunl|en[ospx])", "region_uuid": "XXXX", "vtap_id": "" }, "AZ_COUNT": 1, "REGION_COUNT": 1, "POD_CLUSTERS": null, "CREATED_AT": "2022-09-22 15:42:09", "SYNCED_AT": "", "LCUUID": "bd91953d-0dba-524e-ab99-ac74ef225e28" } }
-
-
URL:
/v1/domains/{lcuuid}/
-
Body:
字段 类型 说明 ENABLED int 类型,0:禁止,1:启动 NAME string 名称 ICON_ID string 图例,14:Kubernetes CONFIG dict 见示例 -
Kubernetes:
-
Request:
{ "NAME": "k8ss", "CONFIG": { "region_uuid": "YYYY", "controller_ip": "YYYY", "vtap_id": "", "pod_net_ipv4_cidr_max_mask": 8, "pod_net_ipv6_cidr_max_mask": 16, "port_name_regex": "^(cni|flannel|cali|vxlan.calico||en[ospx])" } }
-
Response:
{ "OPT_STATUS": "SUCCESS", "DESCRIPTION": "", "DATA": { "ID": "XXXX", "NAME": "k8ss", "DISPLAY_NAME": "XXXX", "CLUSTER_ID": "XXXX", "TYPE": 11, "ENABLED": 1, "STATE": 4, "ERROR_MSG": "", "CONTROLLER_IP": "YYYY", "CONTROLLER_NAME": "YYYY", "VTAP_NAME": "", "VTAP_CTRL_IP": "", "VTAP_CTRL_MAC": "", "ICON_ID": 14, "K8S_ENABLED": 0, "CONFIG": { "controller_ip": "YYYY", "pod_net_ipv4_cidr_max_mask": 8, "pod_net_ipv6_cidr_max_mask": 16, "port_name_regex": "^(cni|flannel|cali|vxlan.calico||en[ospx])", "region_uuid": "YYYY", "vtap_id": "" }, "AZ_COUNT": 1, "REGION_COUNT": 1, "POD_CLUSTERS": null, "CREATED_AT": "2022-09-22 15:42:09", "SYNCED_AT": "", "LCUUID": "bd91953d-0dba-524e-ab99-ac74ef225e28" } }
-
-
URL:
/v1/domains/{lcuuid}/
-
Response:
{ "OPT_STATUS": "SUCCESS", "DESCRIPTION": "", "DATA": { "LCUUID": "bd91953d-0dba-524e-ab99-ac74ef225e28" } }