文档首页 > > API参考> API> 边缘节点管理> 注册边缘节点

注册边缘节点

分享
更新时间: 2019/08/23 GMT+08:00

功能介绍

该API用于注册一个边缘节点。

接口调用成功后,您可以将响应消息体中node.package字段使用base64解码成tar.gz文件,并下载边缘核心软件纳管边缘节点,具体方法请参见https://console.huaweicloud.com/ief2.0/#/app/coreSoftware

URI

POST /v2/{project_id}/edgemgr/nodes
表1 参数描述

名称

是否必选

描述

project_id

项目ID,获取方法请参见获取项目ID

请求消息

请求参数
表2 参数描述

参数

是否必选

类型

描述

name

String

边缘节点名称,只允许中文字符、英文字母、数字、下划线、中划线,最大长度64

Name为必填字段,且本账号中唯一。

description

String

边缘节点描述,最大长度255,不允许^ ~ # $ % & * < > ( ) [ ] { } ' " \

enable_gpu

Boolean

边缘节点是否开启GPU,默认为false

log_configs

表2 object

边缘设备日志配置

device_infos

表3 object

关联设备信息

请求示例:

{
    "node": {
        "name": "node_test7",
        "description": "This is a test node",
        "enable_gpu": false,
        "log_configs": [
            {
                "component": "app",
                "type": "local",
                "level": "debug",
                "size": 100,
                "rotate_num": 5,
                "rotate_period": "daily"
            }
        ],
        "device_infos": [
            {
                "relation": "cameraDevice",
                "comment": "Factory",
                "device_ids": [
                    "e90f14d8-207a-4ce2-8160-e5a9aca2c480"
                ]
            }
        ]
    }
}

响应消息

响应参数:
表3 参数描述

参数

类型

描述

node

表1 object

边缘节点详细信息

响应参数示例:

{
    "node": {
        "edged_version": null,
        "ca": "Certificate: ...",
        "updated_at": null,
        "device_infos": [
            {
                "comment": "Factory",
                "device_ids": [
                    "                             e90f14d8-207a-4ce2-8160-e5a9aca2c480"
                ],
                "relation": "cameraDevice"
            }
        ],
        "upgrade_history": [],
        "pause_docker_image": "cfe-pause:3.4.5",
        "ief_node_version": null,
        "id": "59710cd5-2ade-4b87-b2f8-5752f308a25b",
        "device_num": null,
        "certificate": "...",
        "gpu_num": null,
        "os_version": null,
        "state": "UNCONNECTED",
        "memory": null,
        "project_id": "{project_id}",
        "private_key": "...",
        "os_name": null,
        "description": "This is a test node",
        "master_url": "",
        "gpu_info": [],
        "arch": null,
        "host_ips": [],
        "enable_gpu": false,
        "name": "node_test7",
        "deployment_num": null,
        "package": "...",
        "container_runtime_version": null,
        "created_at": "2018-11-08T04:03:43.215561",
        "cpu": null,
        "host_name": null,
        "os_type": null,
        "log_configs": [
            {
                "level": "off",
                "rotate_num": null,
                "component": "app",
                "rotate_period": null,
                "type": "LTS",
                "id": "79a1d6fb-4411-4e7e-8d15-b3d5c1b8612b",
                "size": null
            },
            {
                "level": null,
                "rotate_num": 5,
                "component": "system",
                "rotate_period": "daily",
                "type": "local",
                "id": "7e6419ac-05e8-4264-a082-f0824cbcd3bb",
                "size": 50
            },
            {
                "level": "off",
                "rotate_num": null,
                "component": "system",
                "rotate_period": null,
                "type": "LTS",
                "id": "b5150a39-325a-4872-8b1c-d4585424875e",
                "size": null
            },
            {
                "level": "on",
                "rotate_num": 5,
                "component": "app",
                "rotate_period": "daily",
                "type": "local",
                "id": "4a19d570-05b6-49e5-9851-cc25f33eb1c3",
                "size": 100
            }
        ]
    }
}

状态码

状态码请参见状态码

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!

非常感谢您的反馈,我们会继续努力做到更好!

反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

跳转到云社区