智能边缘平台 IEF-查询部署列表:响应示例

时间:2024-04-15 09:12:47

响应示例

状态码: 200

ok

{
  "count" : 1,
  "deployments" : [ {
    "id" : "3e64d98a-37c5-43a6-9bfe-052b9083e362",
    "name" : "app-test",
    "replicas" : 1,
    "ready_replicas" : 1,
    "description" : "this is a test app",
    "group_id" : "",
    "node_ids" : [ "29d20c18-c20c-4a45-a087-42c766fc5d97" ],
    "tags" : [ {
      "key" : "app",
      "value" : "test"
    } ],
    "api_version" : "v3",
    "source" : "userdefine",
    "project_id" : "bcd83056c918480f8f190844bd425b23",
    "created_at" : "2019-10-10T02:20:40.630Z",
    "updated_at" : "2019-10-10T02:20:40.630Z",
    "template" : {
      "configs" : {
        "host_network" : true,
        "host_pid" : true,
        "migration" : true,
        "restart_policy" : "Always",
        "toleration_seconds" : 300
      },
      "init_containers" : [ ],
      "containers" : [ {
        "name" : "container-0",
        "image_url" : "swr.cn-north-1.myhuaweicloud.com/ief-test/nginx:0705",
        "args" : [ "-c", "sleep 1000" ],
        "command" : [ "/bin/bash" ],
        "resources" : {
          "limits" : {
            "cpu" : "0.25",
            "memory" : "500",
            "gpu" : "500"
          },
          "requests" : {
            "cpu" : "0.25",
            "memory" : "500",
            "gpu" : "500"
          }
        },
        "envs" : [ {
          "name" : "CERT_PATH",
          "value" : "/opt/cert"
        } ],
        "ports" : [ {
          "container_port" : 80,
          "host_port" : 80
        } ],
        "privileged" : true,
        "readiness_probe" : {
          "http_get" : {
            "path" : "/",
            "port" : 80,
            "scheme" : "http"
          },
          "initial_delay_seconds" : 10,
          "timeout_seconds" : 10
        },
        "liveness_probe" : {
          "http_get" : {
            "path" : "/",
            "port" : 80,
            "scheme" : "http"
          },
          "initial_delay_seconds" : 10,
          "timeout_seconds" : 10
        },
        "version" : "1.0",
        "npu_type" : "",
        "volumes" : [ {
          "name" : "log-volume",
          "type" : "hostPath",
          "read_only" : false,
          "source" : "/var/IEF",
          "destination" : "/var/IEF"
        } ]
      } ]
    }
  } ]
}

状态码: 400

error

{
  "error_code" : "IEF.100001",
  "error_msg" : "PROJECT_ID not found"
}

状态码: 500

error

{
  "error_code" : "IEF.100158",
  "error_msg" : "Fail to extract gpu infomation"
}
support.huaweicloud.com/api-ief/ListDeployments.html